Summary: | The languages offered are either invalid or don't match glibc | ||
---|---|---|---|
Product: | [Applications] systemsettings | Reporter: | Andreas Schneider <asn> |
Component: | kcm_formats | Assignee: | Plasma Bugs List <plasma-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | dennis.lissov, hanyoung, nate |
Priority: | NOR | ||
Version First Reported In: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
See Also: | https://sourceware.org/bugzilla/show_bug.cgi?id=33190 | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Andreas Schneider
2025-07-20 07:01:22 UTC
According to Mike, the list is coming from libicu, but plasma sets it as glibc locales. Those need to be separated. kcm_formats writes the file `.config/plasma-localerc` with locales from libicu, however those are system variables which only work with glibc locales! You need to configure the plasma languages and what you export as locales for glibc seperately! `.config/plasma-localerc` ``` [Formats] LANG=en_US.UTF-8 LC_ADDRESS=de_DE.UTF-8 LC_MEASUREMENT=de_DE.UTF-8 LC_MONETARY=de_DE.UTF-8 LC_NAME=en_DK.UTF-8 LC_NUMERIC=de_DE.UTF-8 LC_PAPER=de_DE.UTF-8 LC_TELEPHONE=de_DE.UTF-8 LC_TIME=en_SE.UTF-8 ``` Currently, we just return all the language Qt locale offers, which is coming from icu. Maybe we need to filter out the locale unsupported by glibc? As for en_DK time format issue, there is little we can do. Because the definition is different between glib and icu for the same locale. I would like to use en_SE in KDE to display ISO8601 dates correctly. In order to achieve that, I think ~/.config/plasma-localerc needs a section for ICU formats a second for glibc formats! Only the glibc formats should be exported a environment variables then. If a user selects a language, lets say for date/time, KDE should do: stat /usr/lib/locale/<LANG>/LC_TIME if the file doesn't exist, set LC_TIME=C. This is the glibc default language. Other languages often require a glibc-lang package to be installed. Another solution is if the stat fails that you give the user a list of the directories in /usr/lib/locales and let him select one. Just some ideas how to fix this. Let me know what you think. > Only the glibc formats should be exported a environment variables then.
Both glibc and Qt read locale from the same environment variables, it's not possible to only export locale for one system.
Then KDE needs to filter out all languages not in glibc. This MR should fix it: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5706 FYI: I was able to add en_SE to glibc: https://sourceware.org/git/?p=glibc.git;a=commit;h=a6eb8285d9bfb7ec0875b85ca356e833ff964d4f That MR was merged; should this be marked as resolved now? (In reply to Nate Graham from comment #10) > That MR was merged; should this be marked as resolved now? Bugzilla no longer sync the information from invent.kde.org MRs? There have been some hiccups recently, but in general it works. Should this be marked as RESOLVED FIXED? (In reply to Nate Graham from comment #12) > There have been some hiccups recently, but in general it works. > > Should this be marked as RESOLVED FIXED? Yes please, thx |