Bug 144191 - LANG seems to override LC_MESSAGES
Summary: LANG seems to override LC_MESSAGES
Status: RESOLVED FIXED
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-04-13 21:09 UTC by Jakub Turski
Modified: 2020-09-28 23:40 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Turski 2007-04-13 21:09:07 UTC
Version:           unknown (using KDE 3.5.5, Kubuntu (edgy) 4:3.5.5-0ubuntu3.3)
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.17-11-generic

Scenario:
* log into KDE
* user's locales are set as follow

LANG=pl_PL.UTF-8
LANGUAGE=pl_PL:pl:en_GB:en
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY="pl_PL.UTF-8"
LC_MESSAGES=C
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT="pl_PL.UTF-8"
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=

* launch konsole
* from konsole execute 'kdesu locale':

LANGUAGE=pl_PL:pl:en_GB:en
LC_CTYPE="pl_PL.UTF-8"
LC_NUMERIC="pl_PL.UTF-8"
LC_TIME="pl_PL.UTF-8"
LC_COLLATE="pl_PL.UTF-8"
LC_MONETARY="pl_PL.UTF-8"
LC_MESSAGES=C
LC_PAPER="pl_PL.UTF-8"
LC_NAME="pl_PL.UTF-8"
LC_ADDRESS="pl_PL.UTF-8"
LC_TELEPHONE="pl_PL.UTF-8"
LC_MEASUREMENT="pl_PL.UTF-8"
LC_IDENTIFICATION="pl_PL.UTF-8"
LC_ALL=

(exactly the same as user's)

* launch some kde application, ie. 'kdesu kate'

The application launches with Polish messages, while LC_MESSAGES is set to 'C'.

It looks like LANG variable overrides LC_MESSAGES, which should NOT be the case, according to 'man 7 locale':

----------------------------------------
1.     If there is a non-null environment variable LC_ALL, the value of LC_ALL is used.
2.     If an environment variable with the same name as one of the categories above exists and is non-null, its  value  is  used for that category.
3.     If there is a non-null environment variable LANG, the value of LANG is used.
----------------------------------------

Non-KDE utilities behave as expected, for example 'kdesu tar':

tar:
You must specify one of the `-Acdtrux' options
Try `tar --help' or `tar --usage' for more information.

One of the solutions is actually *copying* settings from user's ~/.kde/share/config/kdeglobals

[Locale]
Country=pl
Language=en_US

...but in absence of settings in /root/.kde LC_MESSAGES should be honored.
Comment 1 Stephan Kulow 2007-04-16 13:05:56 UTC
if there is a .kde, environment doesn't matter. For anything else we'll change for KDE4 most likely
Comment 2 Jakub Turski 2007-04-16 13:23:01 UTC
Well, in this case, there *is* .kde directory but the language settings were missing. IMHO it should use the locale settings in that case.
Comment 3 Andrew Crouthamel 2018-11-02 04:28:12 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Andrew Crouthamel 2018-11-16 02:47:11 UTC
Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version?

Thank you for helping us make KDE software even better for everyone!
Comment 5 Nate Graham 2020-09-28 23:40:21 UTC
No response; assuming it was fixed since then.