gnome-menus does not honour LANGUAGE variable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gnome-menus (Ubuntu) |
Fix Released
|
High
|
Martin Pitt |
Bug Description
Binary package hint: gnome-menus
When the LANGUAGE environment variable is set to a different language code than what is specified in LANG or LC_MESSSAGES, LANGUAGE should be preferred. gnome-menus only takes LC_MESSAGES into account.
Test case:
LANG = de_DE.utf8
LANGUAGE = en_US:en
Expected result: the menus are displayed in English.
Actual result: The top layer of the mneus (Applications, Places, System) is displayed in English, all the subsequent entries are displayed in German.
When grepping the code for 'locale', I found this snippet in libmenu/
locale = g_strdup (setlocale (LC_MESSAGES, NULL));
if (locale == NULL)
{
menu_verbose ("cached_
return FALSE;
}
/* canonicalize .UTF-8 to .utf8 (only happens at end of string) */
s = strstr (locale, ".UTF-8");
if (s != NULL)
strcpy (s, ".utf8");
g_snprintf (cache_file, sizeof(cache_file), "%s/desktop.
g_free (locale);
I think this should be modified to something like this:
if LANGUAGE is set, get the value; split the language codes by the ':' delimiter, try if dirname/
Not sure if anything else needs to be modified though.
ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: gnome-menus 2.30.0-0ubuntu2
ProcVersionSign
Uname: Linux 2.6.32-19-generic i686
Architecture: i386
Date: Tue Apr 6 22:20:59 2010
EcryptfsInUse: Yes
ProcEnviron:
LANGUAGE=en_US:en
LANG=de_DE.utf8
SHELL=/bin/bash
SourcePackage: gnome-menus
Changed in gnome-menus (Ubuntu): | |
assignee: | nobody → Canonical Desktop Team (canonical-desktop-team) |
Changed in gnome-menus (Ubuntu): | |
assignee: | Canonical Desktop Team (canonical-desktop-team) → Martin Pitt (pitti) |
status: | Triaged → In Progress |
Changed in gnome-menus (Ubuntu): | |
status: | In Progress → Fix Committed |
This bug was fixed in the package gnome-menus - 2.30.0-0ubuntu4
---------------
gnome-menus (2.30.0-0ubuntu4) lucid; urgency=low
* debian/ update- gnome-menus- cache: Unset $LANGUAGE, so that we are actually cache.patch: Do not use the cache if we have $LANGUAGE; language lookup is too intrusive for
getting the translation that we expect. (LP: #556545, part 1)
* 22_desktop-
properly implementing multi-locale/
lucid at this point. (LP: #556545, part 2)
-- Martin Pitt <email address hidden> Fri, 09 Apr 2010 09:40:57 +0200