Repository navigation
unix: Fix lang selection with an empty LANGUAGE env var - #984
Conversation
| let mut locales = BVec::empty(); | ||
|
|
||
| for key in ["LANGUAGE", "LC_ALL", "LANG"] { | ||
| for key in ["LANGUAGE", "LC_ALL", "LC_MESSAGES", "LANG"] { |
There was a problem hiding this comment.
I actually don't see how this does anything about LANGUAGES being empty :D
There was a problem hiding this comment.
Okay okay this one is a drive-by. Technically we need to respect LC_MESSAGES for UI localization.
There was a problem hiding this comment.
No i mean. To be fair. I don't see how "bail out when locales is populated" later is a fix for LANGUAGES being empty either. If LANGUAGES is empty, it's still going to go around the loop more times.
There was a problem hiding this comment.
I'm fine w/ the drive-by fixes in general
There was a problem hiding this comment.
Oh duh, when I wrote "empty" I was talking about the filter() chain in the iterator. The issue is when it contains BS like LANGUAGE=":". In fact it may even be worth a thought to not break at all. Another thing I was thinking about is filtering out locales like "C", but they already fall back to en-US since that doesn't match anything.
In any case, this PR is the most trivial of all of them haha.
There was a problem hiding this comment.
LOL, I get it. Yeah it's funny that I'm hung up on the simplest one
No description provided.