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

@@ -30,7 +30,6 @@ type App struct {
func NewApp(
metadata *fyne.AppMetadata,
localizerService LocalizerContract,
queue QueueListContract,
ffplayService FFplayContract,
convertorService ConvertorContract,
@@ -38,6 +37,12 @@ func NewApp(
app.SetMetadata(*metadata)
a := app.New()
localizerService, err := newLocalizer(a)
if err != nil {
panicErrorLang(a, err)
return nil
}
statusesText := GetBlockProgressbarStatusesText(localizerService)
blockProgressbarService := NewBlockProgressbar(statusesText, ffplayService)
rightTabsService := NewRightTabs(localizerService)