Bug 376714 - kcmshell5 formats ignores ~/.config/plasma-localerc
Summary: kcmshell5 formats ignores ~/.config/plasma-localerc
Status: RESOLVED WORKSFORME
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_formats (other bugs)
Version First Reported In: 5.9.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-20 14:03 UTC by Jan Ziak (http://atom-symbol.net)
Modified: 2021-09-30 18:37 UTC (History)
3 users (show)

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


Attachments
Screenshot - LC_MEASUREMENT and LC_MONETARY are being ignored (16.80 KB, image/png)
2017-02-20 14:03 UTC, Jan Ziak (http://atom-symbol.net)
Details
Running "kcmshell5 formats" from plasma search (Alt-F2) (4.67 KB, image/png)
2017-02-20 14:08 UTC, Jan Ziak (http://atom-symbol.net)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Ziak (http://atom-symbol.net) 2017-02-20 14:03:22 UTC
Created attachment 104127 [details]
Screenshot - LC_MEASUREMENT and LC_MONETARY are being ignored

Steps to reproduce the issue:

1. Modify formats via System Settings
2. [Optional] Logout from KDE desktop
3. [Optional] Login to KDE desktop
4. Run "kcmshell5 formats" from command line

----

$ cat ~/.config/plasma-localerc
[Formats]
LC_MEASUREMENT=sk_SK.UTF-8
LC_MONETARY=sk_SK.UTF-8
useDetailed=true

[Translations]
LANGUAGE=

----

$ echo $LC_MONETARY                                                                                                                                                                                   sk_SK.UTF-8

----

$ grep localerc formats.strace
stat("/home/atom/.config/plasma-localerc", {st_mode=S_IFREG|0600, st_size=104, ...}) = 0
lstat("/home/atom/.config/plasma-localerc", {st_mode=S_IFREG|0600, st_size=104, ...}) = 0
stat("/home/atom/.config/plasma-localerc", {st_mode=S_IFREG|0600, st_size=104, ...}) = 0
access("/home/atom/.config/plasma-localerc", W_OK) = 0
stat("/home/atom/.config/plasma-localerc", {st_mode=S_IFREG|0600, st_size=104, ...}) = 0
stat("/etc/xdg/plasma-localerc", 0x7ffdcfbe0160) = -1 ENOENT (No such file or directory)
stat("/home/atom/.config/plasma-localerc", {st_mode=S_IFREG|0600, st_size=104, ...}) = 0
open("/home/atom/.config/plasma-localerc", O_RDONLY|O_CLOEXEC) = 17
Comment 1 Jan Ziak (http://atom-symbol.net) 2017-02-20 14:08:12 UTC
Created attachment 104128 [details]
Running "kcmshell5 formats" from plasma search (Alt-F2)
Comment 2 Sebastian Kügler 2017-02-20 15:29:14 UTC
Do applications sarted from kickoff respect the settings?
Comment 3 Jan Ziak (http://atom-symbol.net) 2017-02-20 16:00:43 UTC
(In reply to Sebastian Kügler from comment #2)
> Do applications started from kickoff respect the settings?

No.
Comment 4 Jan Ziak (http://atom-symbol.net) 2017-02-20 16:05:11 UTC
(In reply to Sebastian Kügler from comment #2)
> Do applications sarted from kickoff respect the settings?

Which settings do you mean exactly? Those rendered by "kcmshell5 formats" or those rendered by "systemsettings5"? Assuming they differ in what they are displaying.
Comment 5 Sebastian Kügler 2017-02-21 16:26:11 UTC
If these two differ in what they're displaying, you have something wrongly configured. The environment your plasmashell is running in should have the LC_* vars set (after relogin), if that's not the case, please complain in your distro's bugtracker.
Comment 6 Jan Ziak (http://atom-symbol.net) 2017-02-21 18:28:00 UTC
(In reply to Sebastian Kügler from comment #5)
> If these two differ in what they're displaying, you have something wrongly
> configured.

Basically, what you are saying is that if on your machine you start /usr/bin/systemsettings5, change the Currency and Measurement units, reboot your machine, and finally run "kcmshell5 formats" you are seeing the same Currency and Measurement unit as was configured via /usr/bin/systemsettings5.

Could you please take a screenshot of the "kcmshell5 formats" window and attach the screenshot to this bug?

> The environment your plasmashell is running in should have the
> LC_* vars set (after relogin), if that's not the case, please complain in
> your distro's bugtracker.

It is the case.
Comment 7 Nate Graham 2021-09-30 17:25:47 UTC
I see that in the KCM you set everything to "No change". Can you instead do the following:

1. Set "Region" to "sk_SK"
2. Uncheck "Detailed settings"
3. Log out and log back in

If it still doesn't work at this point, then please Provide the output of:
- `locale`
- `cat ~/.config/plasma-localerc`
Comment 8 Jan Ziak (http://atom-symbol.net) 2021-09-30 18:08:12 UTC
This bug is no longer reproducible in System Settings 5.22.5
Comment 9 Nate Graham 2021-09-30 18:37:37 UTC
Yay!