Bug 250394 - Since the upgrade to KDE 4.5.x the locale are all messed up
Summary: Since the upgrade to KDE 4.5.x the locale are all messed up
Status: RESOLVED WORKSFORME
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_language (show other bugs)
Version: 0.2
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: John Layt
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-06 21:39 UTC by Stéphane Magnenat
Modified: 2018-05-17 10:30 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
locales settings, showing some mess (71.05 KB, image/png)
2010-09-06 21:39 UTC, Stéphane Magnenat
Details
french, english, and german in a single screenshot... good for my language educations.... (70.16 KB, image/png)
2010-09-06 21:40 UTC, Stéphane Magnenat
Details
Locales screenshot under 4.6.5, showing a somewhat different bug (69.20 KB, image/png)
2011-10-28 12:57 UTC, Stéphane Magnenat
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Magnenat 2010-09-06 21:39:51 UTC
Created attachment 51372 [details]
locales settings, showing some mess

Version:           unspecified (using KDE 4.5.0) 
OS:                Linux

Since the upgrade to KDE 4.5.x the locale are all messed up. I have most of the texts in French, some in English, some in German! I have these three locales installed

Reproducible: Always

Steps to Reproduce:
This happens on two different computers with KDE 4.5.x.



OS: Linux (x86_64) release 2.6.32-24-generic
Compiler: cc
Comment 1 Stéphane Magnenat 2010-09-06 21:40:24 UTC
Created attachment 51373 [details]
french, english, and german in a single screenshot... good for my language educations....
Comment 2 Christoph Feck 2011-10-28 12:38:35 UTC
What is the status of this bug? Does it still happen with a recent KDE version, such as 4.6.5 or 4.7.x? Please add a comment.
Comment 3 Stéphane Magnenat 2011-10-28 12:57:28 UTC
Created attachment 64979 [details]
Locales screenshot under 4.6.5, showing a somewhat different bug
Comment 4 Stéphane Magnenat 2011-10-28 12:58:45 UTC
Under 4.6.5 I have a somewhat different bug (see attached screenshot), in the sense that languages are ok but some date placeholders seem not to be replaced.
Typing locale on the command line shows:

LANG=en_GB.utf8
LANGUAGE=en_GB
LC_CTYPE="en_GB.utf8"
LC_NUMERIC="en_GB.utf8"
LC_TIME="en_GB.utf8"
LC_COLLATE="en_GB.utf8"
LC_MONETARY="en_GB.utf8"
LC_MESSAGES="en_GB.utf8"
LC_PAPER="en_GB.utf8"
LC_NAME="en_GB.utf8"
LC_ADDRESS="en_GB.utf8"
LC_TELEPHONE="en_GB.utf8"
LC_MEASUREMENT="en_GB.utf8"
LC_IDENTIFICATION="en_GB.utf8"
LC_ALL=
Comment 5 Stéphane Magnenat 2011-10-28 12:59:30 UTC
In attachment for KDE 4.6.5, "Country" is set to Switzerland
Comment 6 Christoph Feck 2011-10-28 15:15:51 UTC
Interesting "Date" in that screen shot :)

Adding John, who knows better if this is a bug in the system settings KCM, or in the underlying KDate/KLocale libraries.
Comment 7 John Layt 2011-10-29 18:44:33 UTC
Can you please attach the contents of your kdeglobals file [Locale] section?  This is usually in ~/.kde4/share/config or ~/.kde/share/config .  I suspect I know what's happening and we should see that funky date format in the file.
Comment 8 Stéphane Magnenat 2011-10-31 08:56:18 UTC
The content of the section is:

[Locale]
Country=ch
DateFormat=WOCHENTAG TT MONAT JJJJ
DateFormatShort=TT.%m.JJJJ
Language=en_GB:en_US:fr:de
Comment 9 John Layt 2011-11-01 21:12:04 UTC
Ah, exactly what I thought.  First a bit of background.  KDE uses the POSIX datetime format codes such as %m for month number, %b for short month name and %B for long month name.  This isn't very user friendly though so in the KCM we convert those codes into keywords in the users language like MM, SHORTMONTH and MONTH.  When the users settings are saved then we convert these keywords back to the codes and any other text is saved as-is.  

What appears to have happened here is that the language was initially German so the date formats were displayed with German keywords.  The language was then switched to English, but the displayed date formats were not switched to English at the same time, so upon saving the German keywords were not converted to date codes but saved as-is.

The quick and easy solution here is to simply delete the DateFormat and DateFormatShort lines in the config file and save it, then go into the KCM and everything will be fine.  You'll probably need to log out and in again for the change to take effect across the entire plasma workspace.

I'll need to fix the code to update the formats whenever the language is changed, so re-assigning to me.
Comment 10 Eike Hein 2018-05-17 10:30:53 UTC
The Language settings were rewritten for 5.13. Please reopen if this continues to be a problem.