Bug 480020

Summary: Date renders in Spanish when language set to Catalan
Product: [Plasma] plasmashell Reporter: Amy Parkes <amyfrancineparkes>
Component: Digital Clock widgetAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: aacid, nate
Priority: NOR    
Version First Reported In: master   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screenshot showing bug, clock settings, and region settings
Screenshot showing application language preferences

Description Amy Parkes 2024-01-18 22:28:30 UTC
Created attachment 165022 [details]
Screenshot showing bug, clock settings, and region settings

SUMMARY

Despite region settings showing that dates should render in Catalan, the plasma-widget renders the date in Spanish

STEPS TO REPRODUCE
1. Set Language and Region to Catalan
2. Do not have Spanish set as a valid application language
3. Set Clock to Long Date (Data Llarga)

OBSERVED RESULT
Date renders in Spanish

EXPECTED RESULT
Date renders in Catalan

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Amy Parkes 2024-01-18 22:29:10 UTC
Created attachment 165023 [details]
Screenshot showing application language preferences
Comment 2 Amy Parkes 2024-01-18 22:31:56 UTC
(In reply to Amy Parkes from comment #0)
> Created attachment 165022 [details]
> Screenshot showing bug, clock settings, and region settings
> 
> SUMMARY
> 
> Despite region settings showing that dates should render in Catalan, the
> plasma-widget renders the date in Spanish
> 
> STEPS TO REPRODUCE
> 1. Set Language and Region to Catalan
> 2. Do not have Spanish set as a valid application language
> 3. Set Clock to Long Date (Data Llarga)
> 
> OBSERVED RESULT
> Date renders in Spanish
> 
> EXPECTED RESULT
> Date renders in Catalan
> 
> SOFTWARE/OS VERSIONS
> Windows: 
> macOS: 
> Linux/KDE Plasma: 
> (available in About System)
> KDE Plasma Version: 
> KDE Frameworks Version: 
> Qt Version: 
> 
> ADDITIONAL INFORMATION
I forgot the OS information
Sistema operatiu: EndeavourOS 
Versió del Plasma del KDE: 5.27.10
Versió dels Frameworks del KDE: 5.114.0
Versió de les Qt: 5.15.12
Versió del nucli: 6.6.12-1-lts (64 bits)
Plataforma de gràfics: X11
Processadors: 4 × Intel® Core™ i5-6300U CPU @ 2.40GHz
Memòria: 7,4 GiB de RAM
Processador gràfic: Mesa Intel® HD Graphics 520
Fabricant: LENOVO
Nom del producte: 20JVS00803
Versió del sistema: ThinkPad L470 W10DG
Comment 3 Amy Parkes 2024-01-18 22:50:59 UTC
In my testing, I have confirmed the system isn't getting what language to show (by setting tz to berlin), and that this bug also exists in the clock of sddm
Comment 4 Nate Graham 2024-02-15 20:28:09 UTC
Albert, can you reproduce this? I'm unable to try at the moment as there seems to be something wrong with my dev session vis-a-vis switching languages.
Comment 5 Albert Astals Cid 2024-02-15 21:01:39 UTC
What do you mean "renders the date in Spanish"?

Ah in the first attachment, no I can't reproduce it works fine for me https://i.imgur.com/9F0d6HX.png

I didn't use Plasma to set the date time though, i set it directly through the linux locale system

$ locale 
LANG=ca_ES.UTF-8
LC_CTYPE="ca_ES.UTF-8"
LC_NUMERIC="ca_ES.UTF-8"
LC_TIME="ca_ES.UTF-8"
LC_COLLATE="ca_ES.UTF-8"
LC_MONETARY="ca_ES.UTF-8"
LC_MESSAGES="ca_ES.UTF-8"
LC_PAPER="ca_ES.UTF-8"
LC_NAME="ca_ES.UTF-8"
LC_ADDRESS="ca_ES.UTF-8"
LC_TELEPHONE="ca_ES.UTF-8"
LC_MEASUREMENT="ca_ES.UTF-8"
LC_IDENTIFICATION="ca_ES.UTF-8"
LC_ALL=

my guess is something in there still says es_ES for the reporter.
Comment 6 Nate Graham 2024-02-15 21:02:38 UTC
Thanks. Can you check that, Amy?
Comment 7 Amy Parkes 2024-02-16 12:43:26 UTC
(In reply to Albert Astals Cid from comment #5)
> What do you mean "renders the date in Spanish"?
> 
> Ah in the first attachment, no I can't reproduce it works fine for me
> https://i.imgur.com/9F0d6HX.png
> 
> I didn't use Plasma to set the date time though, i set it directly through
> the linux locale system
> 
> $ locale 
> LANG=ca_ES.UTF-8
> LC_CTYPE="ca_ES.UTF-8"
> LC_NUMERIC="ca_ES.UTF-8"
> LC_TIME="ca_ES.UTF-8"
> LC_COLLATE="ca_ES.UTF-8"
> LC_MONETARY="ca_ES.UTF-8"
> LC_MESSAGES="ca_ES.UTF-8"
> LC_PAPER="ca_ES.UTF-8"
> LC_NAME="ca_ES.UTF-8"
> LC_ADDRESS="ca_ES.UTF-8"
> LC_TELEPHONE="ca_ES.UTF-8"
> LC_MEASUREMENT="ca_ES.UTF-8"
> LC_IDENTIFICATION="ca_ES.UTF-8"
> LC_ALL=
> 
> my guess is something in there still says es_ES for the reporter.

Thank you, it seems that the issue is with the plasma locale options not changing the locale file, I later ran into the same issue later in gnome shell's clock and changing the locale file fixed it, this may be an issue specific to the Arch/Endeavour distribution
Comment 8 Nate Graham 2024-02-16 19:46:53 UTC
The Plasma settings page doesn't set systemwide options, it overrides whatever the system already has globally with user-specific settings. It would be nice if it could do things globally, and there's an open merge request for that, but it's still in progress.

In the meantime can you paste the contents of your ~/.config/plasma-localerc file?
Comment 9 Amy Parkes 2024-02-16 19:50:12 UTC
(In reply to Nate Graham from comment #8)
> The Plasma settings page doesn't set systemwide options, it overrides
> whatever the system already has globally with user-specific settings. It
> would be nice if it could do things globally, and there's an open merge
> request for that, but it's still in progress.
> 
> In the meantime can you paste the contents of your ~/.config/plasma-localerc
> file?

Sorry I can't, the machine that was running KDE is now in a warehouse somewhere in Madrid as I had to return it to the store due to a hardware fault.
Comment 10 Nate Graham 2024-02-16 20:04:14 UTC
Tenn I'm afraid there's no way for us to further troubleshoot the issue, sorry. In general when you submit a bug report, you need to preserve the environment in which the bug occurred so that bug triagers and developers can get information about it if needed. See https://community.kde.org/Get_Involved/Issue_Reporting#Issue_reporting_involves_responsibility
Comment 11 Amy Parkes 2024-02-21 16:23:04 UTC
(In reply to Nate Graham from comment #10)
> Tenn I'm afraid there's no way for us to further troubleshoot the issue,
> sorry. In general when you submit a bug report, you need to preserve the
> environment in which the bug occurred so that bug triagers and developers
> can get information about it if needed. See
> https://community.kde.org/Get_Involved/
> Issue_Reporting#Issue_reporting_involves_responsibility

I fail to see a requirement in that link to keep disk images of my operating systems a month after I submit the bug. I gave replication steps that *were not followed*, the person assigned to the task just set their language in a non-plasma and non-kde application so as to have a working setup, thus confirming ironically that the bug exists.