Replaced the `i18n` and `toml` dependencies with Fyne's built-in language system for localization management. Updated the `Localizer` implementation to handle translations using JSON files and embed functionality. Simplified language selection and persisted settings via Fyne's preferences API.
18 lines
462 B
Go
18 lines
462 B
Go
package kernel
|
|
|
|
import (
|
|
"fyne.io/fyne/v2"
|
|
"fyne.io/fyne/v2/container"
|
|
"fyne.io/fyne/v2/widget"
|
|
)
|
|
|
|
func panicErrorLang(a fyne.App, err error) {
|
|
window := a.NewWindow("GUI for FFmpeg")
|
|
window.SetContent(container.NewVBox(
|
|
widget.NewLabel("Произошла ошибка!"),
|
|
widget.NewLabel("произошла ошибка при получении языковых переводах. \n\r"+err.Error()),
|
|
))
|
|
window.ShowAndRun()
|
|
panic(err.Error())
|
|
}
|