Bug 465495 - LANG set to en_US.UTF-8 despite first language in language list being set to British English
Summary: LANG set to en_US.UTF-8 despite first language in language list being set to ...
Status: REPORTED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_regionandlang (show other bugs)
Version: 5.26.5
Platform: Slackware Linux
: NOR minor
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-09 02:17 UTC by David Chmelik
Modified: 2023-02-17 16:31 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
languages (83.96 KB, image/jpeg)
2023-02-13 01:07 UTC, David Chmelik
Details
regional (154.82 KB, image/jpeg)
2023-02-13 01:07 UTC, David Chmelik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Chmelik 2023-02-09 02:17:02 UTC
SUMMARY
I've always used KDE with American locale but almost always British English dialect, which is first in my language list but  the main regional settings screen shows it to be American English instead, despite still working elsewhere (like Dolphin saying wastebin instead of trash).

STEPS TO REPRODUCE
1. Change dialect.

OBSERVED RESULT
In main screen, doesn't show dialect actually first in list.

EXPECTED RESULT
In main screen, show dialect actually first in list.

SOFTWARE/OS VERSIONS
UNIX/GNU/Linux: Slackware64 15+current
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Comment 1 Nate Graham 2023-02-12 16:52:06 UTC
Please attach two screenshots:
- one  of your language list
- one that shows the issue you're encountering

Thanks!
Comment 2 David Chmelik 2023-02-13 01:07:16 UTC
Created attachment 156177 [details]
languages
Comment 3 David Chmelik 2023-02-13 01:07:33 UTC
Created attachment 156178 [details]
regional
Comment 4 Nate Graham 2023-02-13 17:58:44 UTC
JFYI your QML theming is broken because one of two things is happening (or possibly both):
1. You're using qt5ct, which overrides the theming set by Plasma. Solution: remove it
2. You don't have the qqc2-desktop-style framework installed, so your QtQuick apps are falling back to the built-in Qt Material style. Solution: install it and then tell your distro to pre-install it by default
Comment 5 Nate Graham 2023-02-13 18:00:18 UTC
Cannot reproduce. When I make British English the top language and then add American English underneath it, the examples on the main page reflect the correct formatting for British English (i.e. Metric units, d/m/y date formats, A4 paper size, etc).

Can you describe *exactly* how you configured things with specific individual steps I can follow to try to replicate the bug?
Comment 6 David Chmelik 2023-02-14 02:52:54 UTC
I added British English and moved it to top.  I'm not talking about other formatting, just that the top language isn't listed as the language in use.  I don't know what that stuff is but will work on it later.
Comment 7 Nate Graham 2023-02-14 17:38:54 UTC
Thanks. While this is happening, can you paste the output of these commands:

cat /etc/locale.conf
cat ~/.config/plasma-localerc
Comment 8 David Chmelik 2023-02-15 00:13:00 UTC
d@cosmos:~$ cat /etc/locale.conf
cat: /etc/locale.conf: No such file or directory
d@0.cosmos:~$ cat ~/.config/plasma-localerc
[Formats]
LANG=en_US.UTF-8
LC_NAME=en_GB.UTF-8
LC_TIME=en_150.UTF-8

[Translations]
LANGUAGE=en_GB:en_US
Comment 9 David Chmelik 2023-02-15 00:47:05 UTC
I don't know what QML theming is or what the implications of it being broken are.  I do have qt5ct, which I thought was a dependency of something else I have, but might not be, so can probably uninstall it.  Slackware has qqc2-desktop-style.
Comment 10 Nate Graham 2023-02-17 16:31:38 UTC
qt5ct conflicts with plasma-integration and will break tons and tons of things. I strongly suggest removing it.

Now back to the original issue: I believe the issue is caused by LANG=en_US.UTF-8 coupled with LANGUAGE=en_GB:en_US. What this is telling the system to do is generally make all formats be American English, but prefer British English text.

This is invalid; LANG should be getting set to the first language in the language list (which in this case is en_BW.UTF-8). So there does appear to be some bug in the KCM that generates this configuration.

Just gave it a whirl and it worked for me; LANG was set to en_BW.UTF-8 as expected.