gnome-language-selector crashed with Error in setlocale()
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
language-selector (Ubuntu) |
Fix Released
|
Undecided
|
Gunnar Hjalmarsson |
Bug Description
Binary package hint: language-selector
Trying to change en-US to es-ES language
ProblemType: Crash
DistroRelease: Ubuntu 10.10
Package: language-selector 0.6.5
ProcVersionSign
Uname: Linux 2.6.35-22-generic i686
Architecture: i386
Date: Wed Sep 29 23:40:12 2010
ExecutablePath: /usr/bin/
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Beta i386 (20100901.1)
InterpreterPath: /usr/bin/python2.6
PackageArchitec
ProcCmdline: /usr/bin/python /usr/bin/
ProcEnviron:
LANG=bn_IN.utf8
SHELL=/bin/bash
PythonArgs: ['/usr/
SourcePackage: language-selector
Title: gnome-language-
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare
I'll make a try to address the setlocale() issue according to this bug and its duplicates, but since I'm not able to reproduce the crashes as reported, I'd appreciate your help.
First, could you please let us know if you are able to reproduce the crash, or was it rather a temporary glitch?
Also, I'd appreciate if you could try to edit this program file: pyshared/ LanguageSelecto r/gtk/GtkLangua geSelector. py
/usr/share/
That file contains the updateExampleBox() function, which begins at or near line 966 (the line number can vary a little depending on the language-selector version). Can you please edit it in accordance with the diff below, and let us know whether you notice a difference.
--- old/GtkLanguage Selector. py 2011-02-14 16:59:26 +0100 Selector. py 2011-02-17 02:26:30 +0100 get_active( )] LangpackMacros( self._datadir, code) setlocale( locale. LC_ALL, mylocale) setlocale( category, mylocale)
self. label_example_ currency. set_text( locale. currency( 20457.99) )
self. label_example_ number. set_text( locale. format( "%.2f", 1234567.89, grouping=True))
self. label_example_ date.set_ text(time. strftime( locale. nl_langinfo( locale. D_T_FMT) ))
+++ new/GtkLanguage
@@ -971,7 +971,8 @@
(lang, code) = model[combo.
macr = macros.
mylocale = macr["SYSLOCALE"]
- locale.
+ for category in locale.LC_MONETARY, locale.LC_NUMERIC, locale.LC_TIME:
+ locale.
If you have an own idea about what to do to make the code in question run more safely, your advice would of course be much appreciated.