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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user