-
-
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
Fall back to English if there is no sensible match #5043
Conversation
Hmm, I dunno.
It feels like defaulting to a language that the toolkit does not include is worse, because then the app has certain unhandled elements that the developer can’t fix?
I’m not sure that we should re-introduce the old behaviour for apps when English is not included, but if there is a better system that can be introduced I’d be open to that.
Mostly I’d like to resolve the immediate issue so that we can accept more translation packs.
…On 31 Jul 2024 at 16:08 +0100, Drew Weymouth ***@***.***>, wrote:
@dweymouth commented on this pull request.
In lang/lang.go:
> @@ -169,6 +169,7 @@ func init() {
bundle = i18n.NewBundle(language.English)
bundle.RegisterUnmarshalFunc("json", json.Unmarshal)
+ translated = []language.Tag{language.Make("en")} // the first item in this list will be the fallback if none match
This is kind-of assuming the app has supplied its own English translations, which to be fair is a pretty reasonable bet, but if not, it will lead to lots of "translation failure" logs since Fyne does supply an English translation and it will fail on all the strings unique to the app itself.
Do we want to track if the app developer has supplied their own english translation dictionary, and only if that's true, put english at the front?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
maybe #5026 could work? I added English as a default but it can be changed by the app developer in case the app itself has no english translation? I am just not 100% sure about the function names in my PR and if how i do it is even considered okay. I am even not sure if we really want to add fyne included translations at all. Question then is, how to handle apps that do have no translation pack at all. As then we definetly need to add the fyne core translation packs. 🤔 |
#5026 has to wait for Fyne 2.6, being a change that introduces new public APIs. So we do need this or a similar no-api fix in the meantime |
Fixes #5040
Checklist: