Created attachment 153802 [details] screenshot1 STEPS TO REPRODUCE 1. open 'Region & Language' KCM 2. observe the current language 3. choose another language and apply the change 4. revert to the initial language observed in the step 2 5. logout and login 6. open 'Region & Language' KCM OBSERVED RESULT UI language is the one applied in the step 4 but the KCM reports language and formats from some asian country. Please see the attached screenshots. EXPECTED RESULT the observed result should not occur SOFTWARE/OS VERSIONS Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.26.80 KDE Frameworks Version: 5.100.0 Qt Version: 5.15.7 Graphics Platform: Wayland
Created attachment 153803 [details] screenshot2
Well that's weird. Two questions: 1. In "4. revert to the initial language observed in the step 2", how do you revert it? By clicking the Defaults button, or actually by manually changing it back to the original language? 2. After step 4, what is the contents of ~/.config/plasma-localerc?
(In reply to Nate Graham from comment #2) > Well that's weird. Two questions: > 1. In "4. revert to the initial language observed in the step 2", how do you revert it? I click on 'Modify...' button, choose the original language and click on 'Apply' button. > 2. After step 4, what is the contents of ~/.config/plasma-localerc? $ cat ~/.config/plasma-localerc [Formats] LANG=ko_KR.UTF-8 [Translations] LANGUAGE=en_US
Well that makes no sense. I assume you never manually set Korean as the system language? Can you paste the contents of that file after every step in your steps to reproduce?
Contents after the steps 1 and 2: [Formats] LANG=en_US.UTF-8 [Translations] LANGUAGE=en_US Contents after the step 3: [Formats] LANG=pt_BR.UTF-8 [Translations] LANGUAGE=pt_BR Contents after the step 4: [Translations] LANGUAGE=en_US Contents after the steps 5 and 6: [Formats] LANG=ko_KR.UTF-8 [Translations] LANGUAGE=en_US
The default for Language is `$LANG`. It could be that you have "ko_KR.UTF-8" in your environment.
Indeed. Patrick, can you paste the output of: 1. `env | grep -i lang` 2. `cat /etc/locale.conf`
$ env | grep -i lang LANGUAGE=en_US LANG=ko_KR.UTF-8 $ cat /etc/locale.conf LANG=pt_BR.UTF-8 LC_ADDRESS=pt_BR.UTF-8 LC_IDENTIFICATION=pt_BR.UTF-8 LC_MEASUREMENT=pt_BR.UTF-8 LC_MONETARY=pt_BR.UTF-8 LC_NAME=pt_BR.UTF-8 LC_NUMERIC=pt_BR.UTF-8 LC_PAPER=pt_BR.UTF-8 LC_TELEPHONE=pt_BR.UTF-8 LC_TIME=pt_BR.UTF-8
And those are the values *before* you perform the steps to reproduce?
before the steps: $ env | grep -i lang LANGUAGE=en_US LANG=en_US.UTF-8 $ cat /etc/locale.conf LANG=pt_BR.UTF-8 LC_ADDRESS=pt_BR.UTF-8 LC_IDENTIFICATION=pt_BR.UTF-8 LC_MEASUREMENT=pt_BR.UTF-8 LC_MONETARY=pt_BR.UTF-8 LC_NAME=pt_BR.UTF-8 LC_NUMERIC=pt_BR.UTF-8 LC_PAPER=pt_BR.UTF-8 LC_TELEPHONE=pt_BR.UTF-8 LC_TIME=pt_BR.UTF-8
This is very confusing.
Created attachment 153973 [details] KCM and outputs I have just noticed that the KCM does not apply the formats settings correctly. Now I have both language and formats set to American English, but Dolphin reports file sizes like 5,5 MiB (portuguese - Brazil) instead of 5.5 Mib (american english). And I get these outputs: $ env | grep -i lang LANGUAGE=en_US LANG=en_US.UTF-8 $ cat /etc/locale.conf LANG=pt_BR.UTF-8 LC_ADDRESS=pt_BR.UTF-8 LC_IDENTIFICATION=pt_BR.UTF-8 LC_MEASUREMENT=pt_BR.UTF-8 LC_MONETARY=pt_BR.UTF-8 LC_NAME=pt_BR.UTF-8 LC_NUMERIC=pt_BR.UTF-8 LC_PAPER=pt_BR.UTF-8 LC_TELEPHONE=pt_BR.UTF-8 LC_TIME=pt_BR.UTF-8 Please see the attached screenshot.
Created attachment 154301 [details] translation of a newly created user account possibly related: as we can see in the screenshot attached to this comment, UI language is partially korean and partially english on a newly created user account. Operating System: KDE neon Unstable Edition KDE Plasma Version: 5.26.80 KDE Frameworks Version: 5.101.0 Qt Version: 5.15.7 Graphics Platform: Wayland
What's in `~/.config/plasma-localerc` for the new user account before opening the KCM?
(In reply to Nate Graham from comment #14) > What's in `~/.config/plasma-localerc` for the new user account before > opening the KCM? $ cat ~/.config/plasma-localerc [Formats] LANG=ko_KR.UTF-8
So you create a new user account, log in, immediately run `cat ~/.config/plasma-localerc`, and it tells you that LANG has been automatically set to Korean?
(In reply to Nate Graham from comment #16) > So you create a new user account, log in, immediately run `cat > ~/.config/plasma-localerc`, and it tells you that LANG has been > automatically set to Korean? Exactly.
Something seems broken on your system underneath any KDE software if that's the case, but I don't know what it is.
Could this bug be related to bug 409313 ? My neon unstable 22.04 is not a fresh install, it's neon unstable based on ubuntu 20.04 upgraded to the new base.
It's possible.
I was able to reproduce this with 100% reliability: Starting language: American English. ~/.config/plasma-localerc says: [Formats] LANG=en_US.UTF-8 [Translations] LANGUAGE=en_US Step 1: change language to Catalan and click Apply. ~/.config/plasma-localerc says: [Formats] LANG=ca_AD.UTF-8 [Translations] LANGUAGE=ca Step 2: change language to American English and click Apply. ~/.config/plasma-localerc says: [Formats] LANG=en_DK.UTF-8 [Translations] LANGUAGE=en_US Where did en_DK come from? /etc/locale.conf looks sane: LANG="en_US.UTF-8"
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4717
Git commit 5e2c176a6e386339ce17eb4fff9a137f34e1d323 by Akseli Lahtinen. Committed on 19/09/2024 at 10:47. Pushed by akselmo into branch 'master'. kcmregionandlang.cpp: Clear baseLocaleMap strings from ".UTF-8" and similar text When constructing the baseLocaleMap, we also have the .UTF-8 after the glibcLocale in the map. Later in "fullMatch" iterator this breaks the matching, since we're comparing for example "en_GB" to "en_GB.UTF-8". They're both the same thing, but since the strings do not match, we do not get the exact values and end up doing a lot of extra work to match the locale to closest possible one with heuristics, even though we have exact match already. Removing the .UTF-8 and other similar parts from the prefixedLocales list fixes the issue and allows full matching. FIXED-IN: 6.2.0 M +4 -2 kcms/region_language/kcmregionandlang.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/5e2c176a6e386339ce17eb4fff9a137f34e1d323
Git commit a247fd424e000b3be95298be4cd25bcb6ef9d8b6 by Akseli Lahtinen. Committed on 19/09/2024 at 13:53. Pushed by akselmo into branch 'Plasma/6.2'. kcmregionandlang.cpp: Clear baseLocaleMap strings from ".UTF-8" and similar text When constructing the baseLocaleMap, we also have the .UTF-8 after the glibcLocale in the map. Later in "fullMatch" iterator this breaks the matching, since we're comparing for example "en_GB" to "en_GB.UTF-8". They're both the same thing, but since the strings do not match, we do not get the exact values and end up doing a lot of extra work to match the locale to closest possible one with heuristics, even though we have exact match already. Removing the .UTF-8 and other similar parts from the prefixedLocales list fixes the issue and allows full matching. FIXED-IN: 6.2.0 (cherry picked from commit 5e2c176a6e386339ce17eb4fff9a137f34e1d323) 9abdfe55 kcmregionandlang.cpp: Clear baseLocaleMap items from UTF-8 and similar items Co-authored-by: Akseli Lahtinen <akselmo@akselmo.dev> M +4 -2 kcms/region_language/kcmregionandlang.cpp https://invent.kde.org/plasma/plasma-workspace/-/commit/a247fd424e000b3be95298be4cd25bcb6ef9d8b6
The bug persists on neon unstable. 1. create a new user account in Users KCM 2. log out 3. log in with the new user account 4. open System Settings Result: System Settings language is half english, half korean
Operating System: KDE neon Unstable Edition KDE Plasma Version: 6.2.80 KDE Frameworks Version: 6.7.0 Qt Version: 6.7.2 Graphics Platform: Wayland