Bug 480379 - Changing Address, Name Style, Paper Size or Phone Numbers in Region & Language system settings has no effect.
Summary: Changing Address, Name Style, Paper Size or Phone Numbers in Region & Languag...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Startup process (show other bugs)
Version: 5.27.10
Platform: Other Linux
: HI major
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-27 00:02 UTC by Timo Velten
Modified: 2024-02-20 19:11 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27.11


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Timo Velten 2024-01-27 00:02:22 UTC
SUMMARY
Changing Address, Name Style, Paper Size or Phone Numbers in Region & Language system settings has no effect.

STEPS TO REPRODUCE
1. Change Address, Name Style, Paper Size or Phone Numbers to some value (I changed them to de_DE).
2. These values (LC_ADDRESS, LC_PAPER, LC_TELEPHONE, LC_MONETARY) are correctly written into ~/.config/plasma-localerc
3. Logout and log back in

OBSERVED RESULT

Run the locale command to see that the corresponding environment variables remain unchanged (and in fact, they are not set at all, and the values displayed by locale are just their inherited values)

EXPECTED RESULT

The environment variables LC_ADDRESS, LC_PAPER, LC_TELEPHONE, LC_MONETARY should be set to the values specified in  ~/.config/plasma-localerc

SOFTWARE/OS VERSIONS
Fedora 39, KDE Plasma Version 5.27.10. I have also observed the same behavior on KDE Neon last week.

ADDITIONAL INFORMATION

It seems to me that, for whatever reason, plasma only sets those LC_* variables listed in https://invent.kde.org/plasma/plasma-workspace/-/blob/7b7e70b2262285dbfc294cc6617f4c0787a61d5c/startkde/startplasma.cpp#L171. As far as I can tell, this has been the case for a very long time, and curiously was never changed, even when the options to change LC_ADDRESS, etc where introduced (see https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/1971). So, as far as I can tell, these have never actually worked at all (?).

In any case, I propose removing the variable lcValues entirely, and to just add all values of that config file section into the environment. If that is unacceptable for some reason, I propose adding the missing LC_* values to the list lcValues.
Comment 1 Harald Sitter 2024-02-15 14:51:29 UTC
Would you like to open a merge request? I think your analysis of the problem is spot on.
Comment 2 Bug Janitor Service 2024-02-17 18:31:05 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3930
Comment 3 Nate Graham 2024-02-20 18:03:22 UTC
Git commit a29530af6cdc2c9c06f455823b2f95b81608774c by Nate Graham, on behalf of Timo Velten.
Committed on 20/02/2024 at 18:03.
Pushed by ngraham into branch 'master'.

Handle previously ignored LC_* values

Previously, LC_ADDRESS, LC_PAPER, LC_TELEPHONE and LC_MONETARY
could be changed through system settings (see also c7c2a3a8),
but plasma never actually changed the corresponding environment variables.

To guard against this kind of bug in the future, this commit makes plasma
put all LC_* values (even those not currently supported by system settings)
from plasma-localerc into the environment.
FIXED-IN: 5.27.11

M  +16   -1    startkde/startplasma.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/a29530af6cdc2c9c06f455823b2f95b81608774c
Comment 4 Nate Graham 2024-02-20 19:10:43 UTC
Git commit 91c45f9627983c417eaec4803fd5cf78936a58ca by Nate Graham, on behalf of Timo Velten.
Committed on 20/02/2024 at 18:11.
Pushed by ngraham into branch 'Plasma/6.0'.

Handle previously ignored LC_* values

Previously, LC_ADDRESS, LC_PAPER, LC_TELEPHONE and LC_MONETARY
could be changed through system settings (see also c7c2a3a8),
but plasma never actually changed the corresponding environment variables.

To guard against this kind of bug in the future, this commit makes plasma
put all LC_* values (even those not currently supported by system settings)
from plasma-localerc into the environment.
FIXED-IN: 5.27.11


(cherry picked from commit a29530af6cdc2c9c06f455823b2f95b81608774c)

M  +16   -1    startkde/startplasma.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/91c45f9627983c417eaec4803fd5cf78936a58ca
Comment 5 Nate Graham 2024-02-20 19:11:38 UTC
Git commit febe536419921acad74bf5a61c47b7ecfccef843 by Nate Graham, on behalf of Timo Velten.
Committed on 20/02/2024 at 18:05.
Pushed by ngraham into branch 'Plasma/5.27'.

Handle previously ignored LC_* values

Previously, LC_ADDRESS, LC_PAPER, LC_TELEPHONE and LC_MONETARY
could be changed through system settings (see also c7c2a3a8),
but plasma never actually changed the corresponding environment variables.

To guard against this kind of bug in the future, this commit makes plasma
put all LC_* values (even those not currently supported by system settings)
from plasma-localerc into the environment.
FIXED-IN: 5.27.11


(cherry picked from commit a29530af6cdc2c9c06f455823b2f95b81608774c)

M  +16   -1    startkde/startplasma.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/febe536419921acad74bf5a61c47b7ecfccef843