LANGUAGE is set incorrectly in ~/.kde/env/setlocale.sh

Bug #1423995 reported by Leon Maurer
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kde-workspace (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

(I origionally submitted this bug to KDE, but I was told it was a Kubuntu problem: https://bugs.kde.org/show_bug.cgi?id=342288 . This also may be related to bug #1322968)

I was playing around with the prefered languages setting, and I briefly put Russian in the list along with American English. However, even when I removed Russian, Russian still showed up all over the place. I found that the LANGUAGE environment variable was set to "en:ru:en" (which sometimes overrode the fact that LANG was correctly set to "en_US.UTF-8"). After much searching, I found that LANGUAGE was being set to "en:ru:en" in ~/.kde/env/setlocale.sh:

$ cat ~/.kde/env/setlocale.sh
export LANGUAGE=en:ru:en
export LANG=en_US.UTF-8
export LC_NUMERIC=en_US.UTF-8
export LC_TIME=en_US.UTF-8
export LC_MONETARY=en_US.UTF-8
export LC_PAPER=en_US.UTF-8
export LC_IDENTIFICATION=en_US.UTF-8
export LC_NAME=en_US.UTF-8
export LC_ADDRESS=en_US.UTF-8
export LC_TELEPHONE=en_US.UTF-8
export LC_MEASUREMENT=en_US.UTF-8

So, LANG is being set correctly, but LANGUAGE is not.

ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: systemsettings 4:4.11.12-0ubuntu1.1
ProcVersionSignature: Ubuntu 3.16.0-30.40-generic 3.16.7-ckt3
Uname: Linux 3.16.0-30-generic x86_64
ApportVersion: 2.14.7-0ubuntu8.2
Architecture: amd64
CurrentDesktop: KDE
Date: Fri Feb 20 11:38:13 2015
EcryptfsInUse: Yes
ExecutablePath: /usr/bin/systemsettings
InstallationDate: Installed on 2012-12-14 (798 days ago)
InstallationMedia: Kubuntu 12.10 "Quantal Quetzal" - Release amd64 (20121017.1)
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: kde-workspace
UpgradeStatus: Upgraded to utopic on 2014-11-18 (93 days ago)

Revision history for this message
Leon Maurer (leon-n-maurer) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in kde-workspace (Ubuntu):
status: New → Confirmed
Revision history for this message
John Paul Adrian Glaubitz (glaubitz) wrote :

Hi Leon!

I'm attaching a patch against the current version of the kde-workspace package in Debian and Ubuntu which adds a language selector to kdm. This allows you to select the language for the session at login time and with the hvelp of a few lines in your Xsession file, you are getting the proper environment variables set for your preferred language.

With the patch applied, kdm will set the environment variable KDM_LANG according to the selection you made in the popup menu on the greeter screen. Just add the following lines to /etc/kde4/kdm/Xsession to use the value of KDM_LANG to set the environment variables for LANG, LANGUAGE and LC_ALL:

if [ -n "$KDM_LANG" ] ; then
    LANGUAGE="$KDM_LANG"
    LANG="$KDM_LANG"
    LC_ALL="$KDM_LANG"
    export LANGUAGE
    export LANG
    export LC_ALL
fi

Please note that the list of languages available in the selector is currently hard-coded in kdm/kfrontend/kgreeter.cpp.

For more details, see my detailed explanation in the corresponding bug report in Debian [1].

Adrian

> [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=789689

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch to implement a language selector in kdm" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Leon Maurer (leon-n-maurer) wrote :

Thanks! FWIW, I'm now running Kubuntu 15.04 with KDE 5. I haven't tried to reproduce the bug, but I can do that if it'd be useful.

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.