-
Notifications
You must be signed in to change notification settings - Fork 151
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
Validate environment locale settings #6455
Validate environment locale settings #6455
Conversation
Assigned to Nordfriese |
Mirrored from Codeberg Works! And Thanks. |
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.
Mirrored from Codeberg
On Fri May 17 21:53:38 CEST 2024, Tóth András (tothxa) commented.
/* Check environment variables in order of precedence: | ||
* "LANGUAGE", "LC_ALL", "LC_MESSAGES", "LANG" | ||
* Each environment variable, if set and not empty, may be a preference list of any number of | ||
* languages separated by colons. We must skip entries that are not known to the translations |
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.
Mirrored from Codeberg
On Fri May 17 21:53:38 CEST 2024, Tóth András (tothxa) wrote:
Isn't a colon separated list only valid for LANGUAGE
?
Mirrored from Codeberg While we're at it, the testsuite should be changed to use plain |
Mirrored from Codeberg
This still results in masses of irrelevant log output about strings that can't be translated in the main menu alone. There's a lot of background scanning for maps and savegames that doesn't bother with correct textdomains, and installed add-ons without translations, and for languages that are not 100% complete it would be much worse…
IMO it doesn't hurt to perform the split for all variables. Since environment variables are freely modifiable I wouldn't say there's any "invalid" content possible at all, just unexpected usages :) |
Mirrored from Codeberg IIRC you've mentioned somewhere to use |
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.
Mirrored from Codeberg
On Sat May 25 11:33:34 CEST 2024, Tóth András (tothxa) approved this pull request:
Thank you!
Mirrored from Codeberg <@>bunnybot merge |
…s#6455) Co-authored-by: Benedikt Straub <benedikt-straub@web.de> Co-committed-by: Benedikt Straub <benedikt-straub@web.de>
Mirrored from Codeberg
Created on Fri May 17 18:41:31 CEST 2024 by Benedikt Straub (Nordfriese)
Type of change
Bugfix
Issue(s) closed
Fixes #6454
New behavior
C
locale aliases toen
LC_ALL=C
takes top precedencePossible regressions
System language detection ^^
Screenshots
If applicable, add screenshots to help explain the feature.
Additional context
Setting a locale understood by tinygettext but not used by Widelands (e.g.
cy
Welsh) is accepted and treated like a language with 0% completion. I don't think it's worth the effort making this extra distinction though.