https://bugs.kde.org/show_bug.cgi?id=507258

            Bug ID: 507258
           Summary: The languages offered are either invalid or don't
                    match glibc
    Classification: Applications
           Product: systemsettings
      Version First unspecified
       Reported In:
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: kcm_formats
          Assignee: plasma-b...@kde.org
          Reporter: a...@cryptomilk.org
                CC: hanyo...@protonmail.com
  Target Milestone: ---

This is a followup to https://bugs.kde.org/show_bug.cgi?id=403580 which doesn't
seem to be fixed.

SUMMARY
I'm German but want my workstation to be English with ISO8601 dates. To achieve
that I use:

export LANG="en_US.UTF-8"

export LC_ADDRESS="de_DE.UTF-8"
export LC_COLLATE="C.UTF-8"
export LC_CTYPE="de_DE.UTF-8"
export LC_IDENTIFICATION="C.UTF-8"
export LC_MEASUREMENT="de_DE.UTF-8"
export LC_MESSAGES="C.UTF-8"
export LC_MONETARY="de_DE.UTF-8"
export LC_NAME="en_DK.UTF-8"
export LC_NUMERIC="de_DE.UTF-8"
export LC_PAPER="de_DE.UTF-8"
export LC_TELEPHONE="de_DE.UTF-8"
export LC_TIME="en_DK.UTF-8"

The en_DK locale has d_fmt set to ISO8601 date (install glibc locale soruces).

grep d_fmt /usr/share/i18n/locales/en_DK 
d_fmt    "%Y-%m-%d"

However, if you set en_DK for LC_TIME in ~/.config/plasma-localerc you get a
completely different time format in KDE/Plasma. If you scroll through the list
in system settings look for an ISO8601 date, you find en_SE. If you set it the
plasma the time/date is ISO8601, however the rest of your system stops working.

The locale doesn't really exist in the system:

lsd -l /usr/share/i18n/locales/en_SE
lsd: /usr/share/i18n/locales/en_SE: No such file or directory (os error 2).

With LC_TIME=en_SE set in plasma-localerc, a lot of application stop working.
Here is an example:

Jul 19 19:22:42 magrathea solaar[4725]: Traceback (most recent call last):
Jul 19 19:22:42 magrathea solaar[4725]:   File "/usr/bin/solaar", line 53, in
<module>
Jul 19 19:22:42 magrathea solaar[4725]:     import solaar.gtk
Jul 19 19:22:42 magrathea solaar[4725]:   File
"/usr/lib/python3.13/site-packages/solaar/gtk.py", line 34, in <module>
Jul 19 19:22:42 magrathea solaar[4725]:     from solaar import cli
Jul 19 19:22:42 magrathea solaar[4725]:   File
"/usr/lib/python3.13/site-packages/solaar/cli/__init__.py", line 25, in
<module>
Jul 19 19:22:42 magrathea solaar[4725]:     from logitech_receiver import base
Jul 19 19:22:42 magrathea solaar[4725]:   File
"/usr/lib/python3.13/site-packages/logitech_receiver/base.py", line 34, in
<module>
Jul 19 19:22:42 magrathea solaar[4725]:     from . import base_usb
Jul 19 19:22:42 magrathea solaar[4725]:   File
"/usr/lib/python3.13/site-packages/logitech_receiver/base_usb.py", line 30, in
<module>
Jul 19 19:22:42 magrathea solaar[4725]:     from solaar.i18n import _
Jul 19 19:22:42 magrathea solaar[4725]:   File
"/usr/lib/python3.13/site-packages/solaar/i18n.py", line 62, in <module>
Jul 19 19:22:42 magrathea solaar[4725]:     set_locale_to_system_default()
Jul 19 19:22:42 magrathea solaar[4725]:     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
Jul 19 19:22:42 magrathea solaar[4725]:   File
"/usr/lib/python3.13/site-packages/solaar/i18n.py", line 49, in
set_locale_to_system_default
Jul 19 19:22:42 magrathea solaar[4725]:     locale.setlocale(locale.LC_ALL, "")
Jul 19 19:22:42 magrathea solaar[4725]:     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
Jul 19 19:22:42 magrathea solaar[4725]:   File
"/usr/lib64/python3.13/locale.py", line 615, in setlocale
Jul 19 19:22:42 magrathea solaar[4725]:     return _setlocale(category, locale)
Jul 19 19:22:42 magrathea solaar[4725]: locale.Error: unsupported locale
setting
Jul 19 19:22:42 magrathea systemd[4015]: app-solaar@autostart.service: Main
process exited, code=exited, status=1/FAILURE
░░ Subject: Unit process exited


locale.setlocale(locale.LC_ALL, "") fails because there is no LC_TIME=en_SE
locale!

Reprocuder:

LC_TIME=en_SE.UTF-8 python3                
Python 3.13.5 (main, Jun 11 2025, 22:06:31) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL, "")
Traceback (most recent call last):
  File "<python-input-1>", line 1, in <module>
    locale.setlocale(locale.LC_ALL, "")
    ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/locale.py", line 615, in setlocale
    return _setlocale(category, locale)
locale.Error: unsupported locale setting


LC_TIME=en_DK.UTF-8 python3
Python 3.13.5 (main, Jun 11 2025, 22:06:31) [GCC] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL, "")
'LC_CTYPE=de_DE.UTF-8;LC_NUMERIC=de_DE.UTF-8;LC_TIME=en_DK.UTF-8;LC_COLLATE=C.UTF-8;LC_MONETARY=de_DE.UTF-8;LC_MESSAGES=C.UTF-8;LC_PAPER=de_DE.UTF-8;LC_NAME=en_DK.UTF-8;LC_ADDRESS=de_DE.UTF-8;LC_TELEPHONE=de_DE.UTF-8;LC_MEASUREMENT=de_DE.UTF-8;LC_IDENTIFICATION=C.UTF-8'


Where are those locales coming from?
Why doesn't the KDE en_DK match the en_DK in glibc?


SOFTWARE/OS VERSIONS

Linux/KDE Plasma: openSUSE Tumbleweed
KDE Plasma Version: plasma6-desktop-6.4.2-1.1.x86_64
KDE Frameworks Version: libKF6ConfigCore6-6.16.0-1.1.x86_64
Qt Version: qt6-core-devel-6.9.1-2.1.x86_64

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to