Bug 479213 - Cannot change kde languages because of locale
Summary: Cannot change kde languages because of locale
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_regionandlang (show other bugs)
Version: 5.27.10
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: usability
: 487810 491189 491468 (view as bug list)
Depends on:
Blocks:
 
Reported: 2023-12-31 07:18 UTC by lehoangan02school
Modified: 2024-08-13 10:00 UTC (History)
10 users (show)

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


Attachments
screenshot of output (131.52 KB, image/png)
2023-12-31 07:18 UTC, lehoangan02school
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lehoangan02school 2023-12-31 07:18:41 UTC
Created attachment 164568 [details]
screenshot of output

SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
This bug may not be apparent if you try to reproduce one time, if you try it again with other languages and try it again it will appear as a bug error.

STEPS TO REPRODUCE
1. Go to system settings > Regional settings > Region & language
2. Modify (language) > Change language > Vietnamese/British English
3. Apply

OBSERVED RESULT
Could not find the system's available locales using the localectl tool. Please file a bug report about this at https://bugs.kde.org

EXPECTED RESULT
KDE to change language

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Operating System: Fedora Linux 39
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Kernel Version: 6.6.8-200.fc39.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-6700 CPU @ 3.40GHz
Memory: 15,4 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 530
Manufacturer: HP
Product Name: HP Z240 SFF Workstation
(available in About System)
ADDITIONAL INFORMATION
Comment 1 Nico Tolvanen 2024-04-23 23:22:00 UTC
I can also confirm this issue even with kde 6.0.3 in fedora 40. However I can't change the locale in settings at all.
Comment 2 Graeme Murray 2024-04-27 21:54:44 UTC
I have the same problem, Fedora 40 kde 6.0.4
Comment 3 muso.am 2024-05-20 19:11:41 UTC
Same problem, Fedora 40 KDE 6.0.4
Comment 4 hanyoung 2024-05-21 15:03:13 UTC
Confirmed, localectl executable is not installed by default on fedora 40, despite the doc still mentions it: https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-guide/basic-system-configuration/System_Locale_and_Keyboard_Configuration/#System_Locale_and_Keyboard_Configuration.adoc#tab-locale_options

Maybe an upstream bug? Because it does present in older versions of fedora.
Comment 5 hanyoung 2024-05-31 12:53:09 UTC
*** Bug 487810 has been marked as a duplicate of this bug. ***
Comment 6 Ricardo Funke Ormieres 2024-06-27 17:57:29 UTC
(In reply to hanyoung from comment #4)
> Confirmed, localectl executable is not installed by default on fedora 40,
> despite the doc still mentions it:
> https://docs.fedoraproject.org/en-US/fedora/latest/system-administrators-
> guide/basic-system-configuration/System_Locale_and_Keyboard_Configuration/
> #System_Locale_and_Keyboard_Configuration.adoc#tab-locale_options
> 
> Maybe an upstream bug? Because it does present in older versions of fedora.

That's not true, /usr/bin/localectl is installed by default and is part of systemd package which is in base install. I have fedora 40 kde spin installed and I can confirm I can run localectl and still have the same error message when trying to change language in KDE's configuration UI.
Comment 7 hanyoung 2024-07-27 10:11:06 UTC
It seems like fedora doesn't build plasma-workspace with GLIBC_LOCALE_PREGENERATED enabled, I've filed a bug in fedora.
https://bugzilla.redhat.com/show_bug.cgi?id=2300192
Comment 8 hanyoung 2024-08-07 15:12:17 UTC
*** Bug 491189 has been marked as a duplicate of this bug. ***
Comment 9 hanyoung 2024-08-08 14:13:35 UTC
Git commit 7f34085103d81de11c71a33f8ec4ffffb24b3ff0 by Han Young.
Committed on 08/08/2024 at 14:12.
Pushed by hanyoung into branch 'master'.

kcm_regionandlang: always run localectl

Always try to run localectl, so even if locale pre-generated distro forget to enable GLIBC_LOCALE_PREGENERATED we can still contruct glibc locale map

M  +2    -4    kcms/region_language/kcmregionandlang.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/7f34085103d81de11c71a33f8ec4ffffb24b3ff0
Comment 10 fanzhuyifan 2024-08-09 05:57:42 UTC
*** Bug 491468 has been marked as a duplicate of this bug. ***
Comment 11 fanzhuyifan 2024-08-09 16:26:29 UTC
Git commit 7d433a5df0b9e8a2da099030d06556f162161df9 by Yifan Zhu.
Committed on 09/08/2024 at 15:54.
Pushed by fanzhuyifan into branch 'Plasma/6.1'.

kcm_regionandlang: always run localectl

Always try to run localectl, so even if locale pre-generated distro forget to enable GLIBC_LOCALE_PREGENERATED we can still contruct glibc locale map


(cherry picked from commit 7f34085103d81de11c71a33f8ec4ffffb24b3ff0)

7f340851 kcm_regionandlang: always run localectl

Co-authored-by: Han Young <hanyoung@protonmail.com>

M  +2    -4    kcms/region_language/kcmregionandlang.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/7d433a5df0b9e8a2da099030d06556f162161df9