Bug 470695 - Invalid Plasma<->GLibc locale matching heuristic
Summary: Invalid Plasma<->GLibc locale matching heuristic
Status: ASSIGNED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_regionandlang (show other bugs)
Version: 5.27.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Joshua Goins
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-06 08:29 UTC by jekhor@gmail.com
Modified: 2023-06-07 23:23 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jekhor@gmail.com 2023-06-06 08:29:51 UTC
SUMMARY
***
The Region and Language KCM has a strange heuristic for mapping Plasma language to GLibc locale in the KCMRegionAndLang::constructGlibcLocaleMap(). This algorithm can select almost unused locale variant instead of expected one. For example, it selects a be_BY@latin locale for Belarusian language instead of pure be_BY.
***

STEPS TO REPRODUCE
1. Run Region and Language KCM
2. Select a Belarusian ("беларуская") language
3. Apply changes
4. Check the ~/.config/plasma-localerc for LANG variable

OBSERVED RESULT
LANG=be_BY.UTF-8@latin

EXPECTED RESULT
LANG=be_BY.UTF-8

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.0-9-amd64 (64-bit)
Graphics Platform: X11
Comment 1 Joshua Goins 2023-06-07 23:23:07 UTC
Can confirm, we should have a better heuristic in this case. Thanks for pointing out the specific function that's the issue too!