localepurge breaks KDE l10n

Bug #1255761 reported by z
46
This bug affects 10 people
Affects Status Importance Assigned to Milestone
localepurge (Debian)
Fix Released
Unknown
localepurge (Ubuntu)
Triaged
High
Unassigned
Lucid
Won't Fix
Undecided
Unassigned
Precise
Won't Fix
Undecided
Unassigned
Trusty
Confirmed
Undecided
Unassigned
Utopic
Confirmed
Undecided
Unassigned

Bug Description

In System Settings -> Locale -> Country/Region & Language -> Country, my only choices are:

* System Country ()
* No Country (Default Settings)

In System Settings -> Locale -> Country/Region & Language -> Languages, I see a long list of most two-letter country codes. Curiously, the one I need -- en_US -- is missing. The only "en" is en_GB.

In System Settings -> Locale -> Spell Checker, My only choices for Default Language are:

* ...blank... <- yes, a blank option in the dropdown
* () <- yes, just a pair of parentheses

------------------------

Screenshots here: https://www.kubuntuforums.net/showthread.php?64243

------------------------

Some information that may be useful:

steve@t520:~$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

steve@t520:~$ locale -a
C
C.UTF-8
en_US.utf8
POSIX

steve@t520:~$ localectl status
   System Locale: LANG=en_US.UTF-8
       VC Keymap: n/a
      X11 Layout: us
       X11 Model: pc105

steve@t520:~$ localectl list-locales
C.UTF-8
en_US.utf8

steve@t520:~$ localedef --list-archive
en_US.utf8

steve@t520:~$ cat /var/lib/locales/supported.d/local
en_US.UTF-8 UTF-8

steve@t520:~$ dpkg -l | awk '{print $2}' | grep lang
language-pack-en
language-pack-en-base
language-selector-common
liblangtag-common
liblangtag1
libslang2:amd64
libslang2-dev:amd64

Revision history for this message
z (steveriley-deactivatedaccount-deactivatedaccount) wrote :

Whoops, forgot this:

steve@t520:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 13.10
Release: 13.10
Codename: saucy

steve@t520:~$ uname -a
Linux t520 3.12.1-031201-generic #201311201654 SMP Wed Nov 20 21:54:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

steve@t520:~$ kded4 --version
Qt: 4.8.4
KDE Development Platform: 4.11.3
KDE Daemon: 4.11.3

Revision history for this message
Patrick Houle (buddlespit) wrote :
Download full text (4.9 KiB)

I have the same exact problem. Started with the upgrade to Kubuntu 13.10 (Saucy). I recently started running Kubuntu 14.04 (Trusty) in /devel form and continue to have this problem. My Country/Region & Language looks exactly like Steves screenshots posted on the Kubuntu forums. I would also like to point out that I have no currency symbol (blank and no choices).

Mirroring Steves info:

pat@Pats-Main:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Trusty Tahr (development branch)
Release: 14.04
Codename: trusty

pat@Pats-Main:~$ uname -a
Linux Pats-Main 3.12.0-4-generic #10-Ubuntu SMP Thu Nov 21 22:07:26 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

pat@Pats-Main:~$ kded4 --version
Qt: 4.8.4
KDE Development Platform: 4.11.95
KDE Daemon: 4.11.95

pat@Pats-Main:~$ locale
LANG=en_US.UTF-8
LANGUAGE=en_US:en
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME="en_US.UTF-8"
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

pat@Pats-Main:~$ locale -a
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8 ...

Read more...

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kde-runtime (Ubuntu):
status: New → Confirmed
Revision history for this message
Knut Hildebrandt (knut-hildebrandt-deactivatedaccount) wrote :
Download full text (4.1 KiB)

Encountered this problem yesterday after upgrading under Saucy from KDE 4.11.2 to 4.11.3. Thinking it might be caused by misconfiguration I did some reseach wich cost me almost a day without fixing it .-( But I hope thus I can at least provide some useful addtional information :-)

1. After the update I first noticed that the spell checking in kmail was gone. I couldn't choose the language any more and spell checking doesn't work for preset German any more. Neither could I choose system language nor make any additional language or location settings in systemsettings. Furthermore I noticed that the little widget I use to switch my keyboard from German to English or Spanish doesn't show the flags anymore. And even though all application I set to use other languages than system language still use these, at least for menus, I couldn't change the language anymore.

2. Somehow language setting got totally messed up during the update.

locale -a produces following output, which shows all the three languages I have installed:

knut@knubuntu:~$ locale -a
C
C.UTF-8
de_AT.utf8
de_BE.utf8
de_CH.utf8
de_DE.utf8
de_LI.utf8
de_LU.utf8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZMSin nombre
en_ZM.utf8
en_ZW.utf8
es_AR.utf8
es_BO.utf8
es_CL.utf8
es_CO.utf8
es_CR.utf8
es_CU
es_CU.utf8
es_DO.utf8
es_EC.utf8
es_ES.utf8
es_GT.utf8
es_HN.utf8
es_MX.utf8
es_NI.utf8
es_PA.utf8
es_PE.utf8
es_PR.utf8
es_PY.utf8
es_SV.utf8
es_US.utf8
es_UY.utf8
es_VE.utf8
POSIX

But invoking just locale produces weird results:

knut@knubuntu:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=es_C.UTF-8
LANGUAGE=es:de:en_GB:en_US:en
LC_CTYPE="es_C.UTF-8"
LC_NUMERIC="es_C.UTF-8"
LC_TIME="es_C.UTF-8"
LC_COLLATE="es_C.UTF-8"
LC_MONETARY="es_C.UTF-8"
LC_MESSAGES="es_C.UTF-8"
LC_PAPER="es_C.UTF-8"
LC_NAME="es_C.UTF-8"
LC_ADDRESS="es_C.UTF-8"
LC_TELEPHONE="es_C.UTF-8"
LC_MEASUREMENT="es_C.UTF-8"
LC_IDENTIFICATION="es_C.UTF-8"
LC_ALL=

Please notice the weird locale es_C.UTF-8.

After further investigation I encountered the file ~/.kde/env/setlocale.sh with following contents:

export LANG=es_C.UTF-8
export LANGUAGE=es:de:en_GB:en_US:en

Deleting it I at least got rid of "es_C.UTF-8". BTW, as a look into my backups revealed, above mentioned file didn't exist before the update. At least it did not exist a week before the update and meanwhile I did not make any changes to the localization.

3. Hoping this might fix the problem I shortly after the update to 4.11.3. updated to 4.12 from the backport ppa's. It did not help. I suppose the problem is caused by a bug in the package systemsettings which inspite of the update to 4.12 still is 4:4.11.3-0ubuntu01. At least I could not find any other kde related package responsible for language settings. language-selctor-kde, as proposed in a post I found, doesn't exist in the Saucy repositories.

BTW, I installed language-selctor-...

Read more...

Revision history for this message
Harald Sitter (apachelogger) wrote :

Does the file /usr/share/locale/all_languages exists?

If so, please attach it, then install the package debsums and run `debsums -c`, also attach the output of the command.

If not, please run `sudo apt-get install --reinstall kdelibs5-data` and check whether that brings back the file and restores expected behavior.

Changed in kde-runtime (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
z (steveriley-deactivatedaccount-deactivatedaccount) wrote :

Bingo! That file was indeed missing. Reinstalling kdelibs5-data didn't bring it back. Then I thought -- maybe localepurge (http://packages.ubuntu.com/search?keywords=localepurge) is the culprit? I uninstalled localepurge, reinstalled kdelibs5-data, and now the file is present.

Revision history for this message
Knut Hildebrandt (knut-hildebrandt-deactivatedaccount) wrote :
Download full text (4.8 KiB)

Well, /usr/share/locale/all_languages didn't exist. Just reinstalling kdelibs5-data didn't help to bring it back. Following Steve's suggestion and uninstalling localepurge first did the job. But it helped only partially.

1. In systemsettings language I get the list with all languages again and even can choose my preferred languages. But still there are no flags, neither in the language setting dialogue nor for the keyboard switch widget in the taskbar.

2. I still can't choose any other currency except US dollar, but even for that not a symbol.

3. No change in the country tab. It still offers "System Country ()" and "No Country (Default Settings)". Doesn't state that Spanish is set als system language nor offers to change that.

4. In systemsettings dictionary I can choose now from "German ()" "English ()" "English" "Spanish ()" "Spanish". Notice that English and Spanish occure twice and German only once.

5. In kmail the situation imporved partially. I can now select die dictionary for spell checking again. Only drawback, the German dictionary doesn't work, whereas both English and Spanish dictionaries do. And German unfortunately is the one I use most ;-(

6 The localization of the kde applications seems to work again. Menus are in the language that is the top one in "Preferred Languages", except for the applications where the language was set separately.

Furthermor I noticed that ~/.kde/env/setlocale.sh is back again. It actually is created every time language settings are saved. And it still messes up locales. After reinstalling kdelibs5-data and making some changes to language settings they looked as follows:

knut@knubuntu:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=de_C.ISO-8859-1
LANGUAGE=de:es:en_GB:en
LC_CTYPE="de_C.ISO-8859-1"
LC_NUMERIC="de_C.ISO-8859-1"
LC_TIME="de_C.ISO-8859-1"
LC_COLLATE="de_C.ISO-8859-1"
LC_MONETARY="de_C.ISO-8859-1"
LC_MESSAGES="de_C.ISO-8859-1"
LC_PAPER="de_C.ISO-8859-1"
LC_NAME="de_C.ISO-8859-1"
LC_ADDRESS="de_C.ISO-8859-1"
LC_TELEPHONE="de_C.ISO-8859-1"
LC_MEASUREMENT="de_C.ISO-8859-1"
LC_IDENTIFICATION="de_C.ISO-8859-1"
LC_ALL=

with ~/.kde/env/setlocale.sh:

export LANG=de_C.ISO-8859-1
export LANGUAGE=de:es:en_GB:en

knut@knubuntu:~$ locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=es_C.ISO-8859-1
LANGUAGE=es:de:en_GB:en
LC_CTYPE="es_C.ISO-8859-1"
LC_NUMERIC="es_C.ISO-8859-1"
LC_TIME="es_C.ISO-8859-1"
LC_COLLATE="es_C.ISO-8859-1"
LC_MONETARY="es_C.ISO-8859-1"
LC_MESSAGES="es_C.ISO-8859-1"
LC_PAPER="es_C.ISO-8859-1"
LC_NAME="es_C.ISO-8859-1"
LC_ADDRESS="es_C.ISO-8859-1"
LC_TELEPHONE="es_C.ISO-8859-1"
LC_MEASUREMENT="es_C.ISO-8859-1"
LC_IDENTIFICATION="es_C.ISO-8859-1"
LC_ALL=

with ~/.kde/env/setlocale.sh:

export LANG=es_C.ISO-8859-1
export LANGUAGE=es:de:en_GB:en

knut@knubuntu:~$ locale
locale: Cannot set LC_CTYPE to default loc...

Read more...

Revision history for this message
Knut Hildebrandt (knut-hildebrandt-deactivatedaccount) wrote :

And here the output of debsums -c:

knut@knubuntu:~$ debsums -c 2> debsums-err.txt
/opt/Adobe/Reader9/Reader/GlobalPrefs/.config
/usr/share/backintime/kde4/app.py
/usr/share/info/dir.gz
/usr/lib/kde4/searchbarplugin.so
/usr/share/kde4/apps/konqueror/kpartplugins/searchbar.desktop
/usr/share/doc/libvte9/changelog.Debian.gz
/var/lib/xine/xine.desktop

The output contained a load of error messages which I redirected to a file that now contains almost 4.000 lines. Do you want to this file as well?

Revision history for this message
Harald Sitter (apachelogger) wrote :

I think the lesson here is to not use localepurge?

Knut, I suspect parts of your system are still botched because of localepurge, if you run debsums with sudo it *could* *maybe* give an indication of which files were altered/removed WRT localization causing issues like the dictionary names. However that better had been handled in a forum.
Regarding your LANG setting... remove setlocale.sh, then log out, and back in. LANG should now have the values whatever you installed your system with (e.g. en_US-UTF-8). Make sure you select an appropriate country setting in systemsettings. setlocale.sh should be recreated upon saving the changes and should now be using UTF-8 and the specified country (e.g. es_ES.UTF-8).

Anyway. Moving bug to localepurge. Perhaps that package needs a a couple of warning signs pointing out that using it is going to break one's system. Certainly would be handy information.

affects: kde-runtime (Ubuntu) → localepurge (Ubuntu)
Changed in localepurge (Ubuntu):
status: Incomplete → Confirmed
importance: Undecided → Medium
summary: - Can't configure country, languages, or spell checker
+ localepurge breaks KDE l10n
Revision history for this message
Knut Hildebrandt (knut-hildebrandt-deactivatedaccount) wrote :

Problem SOLVED!

In the error messages from debsums -c I found among others following entrie:

debsums: missing file /usr/share/locale/l10n/C/entry.desktop (from kde-runtime-data package)
debsums: missing file /usr/share/locale/l10n/C/flag.png (from kde-runtime-data package)

Reinstalled kde-runtime-data and everything is back to normal. Even setlocale.sh now has reasonable entries.

Thanks for your help.

Knut

Revision history for this message
Knut Hildebrandt (knut-hildebrandt-deactivatedaccount) wrote :

Hi Harald.

I think it is not a good idea to change the title of the bugreport . Nobody encoutering the problem I had will ever find this bugreport with the changed title. At leasst not if one hasn't background knowlidge about the relavance of localpurge for the localization. So I think it would be better lo leave it as it was and open a new bugreport about localpurge.

Or should I make a post in the forums about the solution and link it to this bugreport?

Revision history for this message
Patrick Houle (buddlespit) wrote :

Yay! It's fixed!

Revision history for this message
z (steveriley-deactivatedaccount-deactivatedaccount) wrote :

@Knut: this isn't a bug in kde-runtime, so keeping it there is not the right thing to do.

Furthermore, according to "man localepurge":

"Please note, that this tool is a hack which is not integrated with Debian's package management system and therefore is not meant for the faint of heart. Responsibility for its usage and possible breakage of your system therefore lies in the sysadmin's (your) hands. Please definitely do abstain from reporting any bugs blaming localepurge if you break your system by using it. If you don't know what you are doing and can't handle any resulting breakage on your own then please simply don't use it."

So it's up to us who like localepurge to keep track of what it's doing.

Revision history for this message
Tom Chiverton (bugs-launchpad-net-falkensweb) wrote :

So the KDE packages need to carry a 'conflicts' for localepurge then ?

Revision history for this message
z (steveriley-deactivatedaccount-deactivatedaccount) wrote :

I would hope not. I think enough people find localepurge useful that we might consider another approach.

It seems that restoring the following missing items fixed the problems:

* /usr/share/locale/all_languages
* /usr/share/locale/l10n/*
* /usr/share/locale/currency/*

So if localepurge could be modified such that it leaves the above items alone, I suspect we'd be fine.

Revision history for this message
Samuel Suther (s-suther) wrote :

Thanks a lot, #9 work for me:

remove setlocale.sh and relogin

Revision history for this message
Cattus Niger (javiergomezat) wrote :

For non-expert people, how can I restore:
* /usr/share/locale/l10n/*
* /usr/share/locale/currency/*?

I already have /usr/share/locale/all_languages after some tries.

Revision history for this message
z (steveriley-deactivatedaccount-deactivatedaccount) wrote :

Curtis, the "dpkg -S" command can help in situations like this.

$ dpkg -S /usr/share/locale/l10n
kde-runtime-data: /usr/share/locale/l10n

$ dpkg -S /usr/share/locale/currency
kde-runtime-data: /usr/share/locale/currency

Reinstalling the kde-runtime-data package should take care of this for you.

Revision history for this message
Cattus Niger (javiergomezat) wrote :

That worked for me. Thanks Steve.

Revision history for this message
Victor S (zeron00) wrote :

Had the same problem. Uninstalling localepurge and reinstalling kdelibs5-data and kde-runtime-data packages seems to have worked.

Revision history for this message
Daniel Hahler (blueyed) wrote :

I've submitted a patch for localepurge a few days ago, but only considered the all_languages file (via bug 1243620).

I've now forwarded this bug report, and the following additional includes fixes it:

path-include=/usr/share/locale/currency/*
path-include=/usr/share/locale/l10/*
path-include=/usr/share/locale/all_languages

(when using the dpkg method, via /etc/dpkg/dpkg.cfg.d/50localepurge).

Changed in localepurge (Ubuntu):
status: Confirmed → Triaged
importance: Medium → High
Changed in localepurge (Debian):
status: Unknown → New
Changed in localepurge (Debian):
status: New → Fix Released
Revision history for this message
Daniel Hahler (blueyed) wrote :

localepurge 0.7.3.4 has been released now, which fixes this and also whitelists /usr/share/locale/languages from blender-data.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in localepurge (Ubuntu Lucid):
status: New → Confirmed
Changed in localepurge (Ubuntu Precise):
status: New → Confirmed
Changed in localepurge (Ubuntu Trusty):
status: New → Confirmed
Changed in localepurge (Ubuntu Utopic):
status: New → Confirmed
Revision history for this message
Rolf Leggewie (r0lf) wrote :

lucid has seen the end of its life and is no longer receiving any updates. Marking the lucid task for this ticket as "Won't Fix".

Changed in localepurge (Ubuntu Lucid):
status: Confirmed → Won't Fix
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in localepurge (Ubuntu Precise):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.