Bug 488693 - Region & Language stays on default/initial localization even after changing the locale in nixos configuration.nix
Summary: Region & Language stays on default/initial localization even after changing t...
Status: RESOLVED WORKSFORME
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_regionandlang (show other bugs)
Version: 6.0.5
Platform: NixOS Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-18 22:10 UTC by nix venerandi
Modified: 2024-07-20 03:46 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description nix venerandi 2024-06-18 22:10:46 UTC
STEPS TO REPRODUCE
1. on nixos, change the localization search "defaultLocale" to en_US or something different (e.g. LC_ADDRESS, LC_TIME, LC_MONETARY etc.) in /etc/nixos/configuration.nix
2. run sudo nixos-rebuild switch --upgrade
3. restart
4. run command "localectl" to confirm your new localization.
5. go to System Settings > Region & Language
6. in there, you'll see that what you did on configuration.nix did not change the localizations in Region & Language
Comment 1 hanyoung 2024-06-19 16:27:02 UTC
We first look locale config in ~/.config/plasma-localerc, if the file or config entry is non-exist, we read value from enironment. Is your ~/.config/plasma-localerc different from the system-wide config, or the system-wide config does not affect the environment?
Comment 2 nix venerandi 2024-06-19 16:36:58 UTC
my ~/.config/plasma-localerc different from the system-wide config. 
my ~/.config/plasma-localerc content is [Formats]
LANG=C.UTF-8 (i intentionally installed my system with this locale )

after i changed my localed in /etc/nixos/configuration.nix, if i do localectl it says:
System Locale: LANG=en_US.UTF-8
               LC_NUMERIC=en_US.UTF-8
               LC_TIME=en_US.UTF-8
               LC_MONETARY=en_US.UTF-8
               LC_PAPER=en_US.UTF-8
               LC_NAME=en_US.UTF-8
               LC_ADDRESS=en_US.UTF-8
               LC_TELEPHONE=en_US.UTF-8
               LC_MEASUREMENT=en_US.UTF-8
               LC_IDENTIFICATION=en_US.UTF-8

and this is what my system follows.
Comment 3 hanyoung 2024-06-19 16:49:20 UTC
~/.config/plasma-localerc has higher priority than environment variables. On kde start, the value in ~/.config/plasma-localerc should override the global one.
Comment 4 nix venerandi 2024-06-19 17:29:16 UTC
in Region & Language, i changed Language to American English (en_US i think it is).
however, my plasma-localerc content is still LANG=C.UTF-8 not en_US.UTF-8.

and yes, i see n journalctl after booting it says :

nixos org.kde.powerdevil.backlighthelper[1891]: Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
                                                                   Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
                                                                   If this causes problems, reconfigure your locale. See the locale(1) manual
                                                                   for more information.
Comment 5 hanyoung 2024-06-20 13:55:48 UTC
I think the locale does not get set in Region & Language, maybe related to https://bugs.kde.org/show_bug.cgi?id=488692 ?
Comment 6 Bug Janitor Service 2024-07-05 03:47:28 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 7 Bug Janitor Service 2024-07-20 03:46:33 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!