Refactor localization system and migrate to Fyne's built-in support

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.
This commit is contained in:
2025-06-01 15:20:33 +05:00
parent d69767f5e9
commit 3241b88158
40 changed files with 917 additions and 1869 deletions

View File

@@ -7,7 +7,6 @@ import (
"fyne.io/fyne/v2/widget"
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/convertor/view"
"git.kor-elf.net/kor-elf/gui-for-ffmpeg/kernel"
"github.com/nicksnyder/go-i18n/v2/i18n"
"image/color"
)
@@ -45,9 +44,7 @@ func NewView(app kernel.AppContract) *View {
}
func (v View) Main(formConversion view.ConversionContract) {
converterVideoFilesTitle := v.app.GetLocalizerService().GetMessage(&i18n.LocalizeConfig{
MessageID: "converterVideoFilesTitle",
})
converterVideoFilesTitle := v.app.GetLocalizerService().GetMessage("converterVideoFilesTitle")
v.app.GetWindow().SetContent(widget.NewCard(converterVideoFilesTitle, "", container.NewVScroll(formConversion.GetContent())))
formConversion.AfterViewContent()
}