-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix lang
tests
#5292
base: develop
Are you sure you want to change the base?
Fix lang
tests
#5292
Conversation
The `setupLang` call has to happen _after_ the `AddTranslations` call. This was the case in all but one scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this. I have two questions inline because I'm not sure of the change
@@ -203,7 +203,5 @@ func updateLocalizer() { | |||
fyne.LogError("Failed to load user locales", err) | |||
all = []string{"en"} | |||
} | |||
str := closestSupportedLocale(all).LanguageString() | |||
setupLang(str) | |||
localizer = i18n.NewLocalizer(bundle, str) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure this was superfluous?
The intention was that it would replace whatever previous configuration was set up...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setupLang
does the exact same thing, see https://github.com/fyne-io/fyne/blob/develop/lang/lang.go#L196
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, sorry for missing that - I was on my mobile
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Description:
Fixes a bug in the
lang
tests forAddTranslations
on systems without English system locale.Checklist: