Bug 482234 - Setting LANG to "C" mangles preview strings
Summary: Setting LANG to "C" mangles preview strings
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_regionandlang (show other bugs)
Version: unspecified
Platform: Neon Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-02 15:48 UTC by faveoled
Modified: 2024-03-08 03:15 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.2


Attachments
reg-and-lang-page (132.98 KB, image/png)
2024-03-02 15:48 UTC, faveoled
Details
Settings (116.11 KB, image/png)
2024-03-02 16:15 UTC, duha.bugs
Details

Note You need to log in before you can comment on or make changes to this bug.
Description faveoled 2024-03-02 15:48:15 UTC
Created attachment 166306 [details]
reg-and-lang-page

It prints "(Standard format for ) "
For what exactly?
Comment 1 faveoled 2024-03-02 15:52:07 UTC
(KDE Neon 2024 02 28 release)
Comment 2 hanyoung 2024-03-02 16:15:03 UTC
Can you paste the contents of `~/.config/plasma-localerc`?
Comment 3 duha.bugs 2024-03-02 16:15:26 UTC
Created attachment 166309 [details]
Settings

(In reply to faveoled from comment #0)
> Created attachment 166306 [details]
> reg-and-lang-page
> 
> It prints "(Standard format for ) "
> For what exactly?

For the Language you selected. Since you selected no language it shows nothing.

If you, for example, use american english it says that. See attachment.
Comment 4 faveoled 2024-03-02 17:14:41 UTC
(In reply to hanyoung from comment #2)
> Can you paste the contents of `~/.config/plasma-localerc`?

$ cat ~/.config/plasma-localerc
[Formats]
LANG=C.UTF-8
Comment 5 faveoled 2024-03-02 17:15:02 UTC
(In reply to duha.bugs from comment #3)
> Created attachment 166309 [details]
> Settings
> 
> (In reply to faveoled from comment #0)
> > Created attachment 166306 [details]
> > reg-and-lang-page
> > 
> > It prints "(Standard format for ) "
> > For what exactly?
> 
> For the Language you selected. Since you selected no language it shows
> nothing.
> 
> If you, for example, use american english it says that. See attachment.

It's not ok to just use the same label with null placeholder
Comment 6 hanyoung 2024-03-02 17:19:14 UTC
The empty text is actually the native name of the locale, but the native language name for C is empty. Guess we should return 'C' in that case.
Comment 7 Nate Graham 2024-03-05 17:08:12 UTC
Yeah.
Comment 8 Bug Janitor Service 2024-03-06 10:28:57 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/4007
Comment 9 hanyoung 2024-03-07 04:26:25 UTC
Git commit b7a00653dc902cd21851c0fa13cde0d6e86a911e by Han Young.
Committed on 07/03/2024 at 04:26.
Pushed by hanyoung into branch 'master'.

kcm/regionandlang: fix Setting LANG to C mangles preview strings

We return locale name if locale's native name is empty.

M  +5    -1    kcms/region_language/optionsmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/b7a00653dc902cd21851c0fa13cde0d6e86a911e
Comment 10 hanyoung 2024-03-07 13:56:52 UTC
Git commit 9581e9ae0313bda1107ea3430b36f95c37c8d19b by Han Young.
Committed on 07/03/2024 at 13:56.
Pushed by hanyoung into branch 'Plasma/6.0'.

kcm/regionandlang: fix Setting LANG to C mangles preview strings

We return locale name if locale's native name is empty.


(cherry picked from commit b7a00653dc902cd21851c0fa13cde0d6e86a911e)

29e50b24 kcm_regionandlang: fix Setting LANG to C mangles preview strings
810ef65c Apply 1 suggestion(s) to 1 file(s)

M  +5    -1    kcms/region_language/optionsmodel.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/9581e9ae0313bda1107ea3430b36f95c37c8d19b