Repository navigation
i18n: ignore non-UTF-8 LANGUAGE and use next valid locale env - #10631
Closed
EriksRemess wants to merge 1 commit into
Closed
EriksRemess wants to merge 1 commit into
EriksRemess wants to merge 1 commit into
Conversation
pluiedev
reviewed
Feb 14, 2026
pluiedev
left a comment
Member
There was a problem hiding this comment.
The idea appears to be sound but I would have to investigate more on what the expected syntax for LANGUAGE is
| if ((try internal_os.getenv(alloc, "LANGUAGE"))) |language| { | ||
| defer language.deinit(alloc); | ||
| if (language.value.len > 0 and | ||
| std.mem.indexOf(u8, language.value, ".UTF-8") == null) |
Member
There was a problem hiding this comment.
I think std.mem.endsWith(u8, language.value, ".UTF-8") makes more sense here
Member
Author
There was a problem hiding this comment.
switched to .endsWith comparison
Member
Author
|
Looks like proper way would be not to include ".UTF-8" in .po file names. At least not on Linux. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently my Ubuntu 25.10 sets
LANGUAGE=lv:enwhich overrides otherwise valid locale settings likeLC_ALL=lv_LV.UTF-8; this change updatesensureLocalefunction to unsetLANGUAGEwhen it does not contain.UTF-8, then proceeds with normal locale initialization so a valid locale is applied.