Bug 394698

Summary: Selecting locales instead of formats is very frustrating compared to KDE4 version
Product: [Applications] systemsettings Reporter: Aleksey Kontsevich <akontsevich>
Component: kcm_regionandlangAssignee: Sebastian Kügler <sebas>
Status: RESOLVED UPSTREAM    
Severity: normal CC: chkboom, daninshed, ddascalescu+kde, evanmohr22, hanyoung, hoperidesalone, jonas743, justin.zobel, kde, kevin.coonan, mcfletch, nate, philip.smith.ucl, postix, rlk
Priority: HI Keywords: geezer-jobs, regression, usability
Version: 5.27.80   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
URL: https://bugreports.qt.io/browse/QTBUG-58351
See Also: https://bugs.kde.org/show_bug.cgi?id=338599
https://bugs.kde.org/show_bug.cgi?id=364321
https://bugs.kde.org/show_bug.cgi?id=340982
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Screenshot
How it used to look in KDE 4 times

Description Aleksey Kontsevich 2018-05-26 10:06:49 UTC
Currently can't setup custom date or number format I wish to - only predefined related to some locale which is not suitable at all. For Russian local can't copy-paste number to calculator from other sources - prints NaN. English - with comma separated between ranks - not convenient - want to change to space.

This change after KDE4 is strange and inconvenient.
Comment 1 Justin Zobel 2020-11-22 00:06:28 UTC
Thanks for the report Aleksey, I believe has been fixed since your report.

Can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I've set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.
Comment 2 Aleksey Kontsevich 2020-11-22 10:07:57 UTC
No! NOT FIXED!!! Very inconvenient: can't specify format manually like it was in KDE 4 - only select from languages list.
Comment 3 Justin Zobel 2020-11-22 21:54:48 UTC
Thank you for the update, please see attached screenshot of Formats section under Regional. Is this the section you are looking for?
Comment 4 Justin Zobel 2020-11-22 21:55:01 UTC
Created attachment 133570 [details]
Screenshot
Comment 5 Aleksey Kontsevich 2020-11-22 23:58:35 UTC
Of course this section, but like I said (https://bugs.kde.org/show_bug.cgi?id=394698#c0) in KDE 4 it looked differently and it was possible to specify custom format for each section, now it is not possible - need to select some language.
Comment 6 Justin Zobel 2020-11-23 00:26:29 UTC
Thanks for confirming, have updated affected version, hopefully, a developer will be able to look at this soon.
Comment 7 Nate Graham 2021-01-06 00:12:14 UTC
Created attachment 134599 [details]
How it used to look in KDE 4 times

This UX is very irritating to me too.

I wasn't around for KDE4 times, but I found and have attached a screenshot of what this KCM used to look like. It seems like a hugely better UX than what we have today: you select the format you want, rather than the country code that implements that format, which requires that you know every detail of every country.
Comment 8 Nate Graham 2021-01-06 00:14:08 UTC
*** Bug 339583 has been marked as a duplicate of this bug. ***
Comment 9 AK-47 2021-01-12 11:21:55 UTC
I agree this UX is a joke. If I want to use 24h or a different/custom format for time, currency, etc. the only choice I have is to select a different country’s locale, and you have to go through the whole world before finding the one with the format you like.
Comment 10 David Edmundson 2021-02-14 13:51:25 UTC
*** Bug 432938 has been marked as a duplicate of this bug. ***
Comment 11 Nate Graham 2021-06-08 18:43:58 UTC
*** Bug 438280 has been marked as a duplicate of this bug. ***
Comment 12 Nate Graham 2021-06-08 21:08:18 UTC
*** Bug 437796 has been marked as a duplicate of this bug. ***
Comment 13 Nate Graham 2021-12-14 17:24:08 UTC
*** Bug 446761 has been marked as a duplicate of this bug. ***
Comment 14 Nate Graham 2022-09-20 17:27:41 UTC
See the upstream discussion in https://bugreports.qt.io/browse/QTBUG-58351.

We had an idea to allow the user to select values/strings in the Plasma config UI rather than locales, and then secretly set whatever locale is mapped to it, but this ran afoul of the fact that the locales include translated text not just string formatting. The POSIX locale system just isn't set up to allow this to happen. So unfortunately  isn't something we can feasibly fix in KDE alone. It doesn't even seem like something that can be done in Qt alone! Because the mapping of locales to both string formatting and also translated text is baked into the POSIX and libc implementation of locales, it really needs to be fixed there.

If it's fixed at a level any higher than that, then the result would simply be applications not respecting your formatting preferences in a random-seeming manner. If it was done only in Qt, then all non-Qt apps would be non-respecting, and if we did it in KDE itself (as we did in Plasma 4 and earlier), then all non-KDE apps would be non-conforming, even those that use Qt. It would be a matter of winning the battle but losing the war. 

So someone needs to get the ball rolling at the POSIX and libc levels to propose a new spec, or backwards-compatible changes to the existing one.
Comment 15 rlk 2022-09-20 18:23:34 UTC
Ideal (for some, at any rate) would be the ability to use strftime()/printf() formatting for datetime/numbers respectively (actually, not entirely sure that printf() would be correct for numbers; it would have to be something more like LiberOffice format codes) as Custom formats in addition to predefined ones.

Very messy indeed...
Comment 16 Nate Graham 2023-02-08 19:38:48 UTC
*** Bug 465453 has been marked as a duplicate of this bug. ***
Comment 17 AK-47 2023-12-17 09:30:32 UTC
Any reasonable chance that this is getting fixed for Plasma 6.0? The status of this report is now RESOLVED UPSTREAM but when on the latest KDE Neon unstable, this problem is still there.
Comment 18 AK-47 2023-12-17 12:31:39 UTC
(In reply to Nate Graham from comment #14)
> See the upstream discussion in https://bugreports.qt.io/browse/QTBUG-58351.
> 
> We had an idea to allow the user to select values/strings in the Plasma
> config UI rather than locales, and then secretly set whatever locale is
> mapped to it, but this ran afoul of the fact that the locales include
> translated text not just string formatting. The POSIX locale system just
> isn't set up to allow this to happen. So unfortunately  isn't something we
> can feasibly fix in KDE alone. It doesn't even seem like something that can
> be done in Qt alone! Because the mapping of locales to both string
> formatting and also translated text is baked into the POSIX and libc
> implementation of locales, it really needs to be fixed there.
> 
> If it's fixed at a level any higher than that, then the result would simply
> be applications not respecting your formatting preferences in a
> random-seeming manner. If it was done only in Qt, then all non-Qt apps would
> be non-respecting, and if we did it in KDE itself (as we did in Plasma 4 and
> earlier), then all non-KDE apps would be non-conforming, even those that use
> Qt. It would be a matter of winning the battle but losing the war. 
> 
> So someone needs to get the ball rolling at the POSIX and libc levels to
> propose a new spec, or backwards-compatible changes to the existing one.

Would it be possible to create a set of custom locale files based on a system locale with the custom formats built in and "select" that one?