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:
/usr/share/pyshared/LanguageSelector/gtk/GtkLanguageSelector.py

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/GtkLanguageSelector.py  2011-02-14 16:59:26 +0100
+++ new/GtkLanguageSelector.py  2011-02-17 02:26:30 +0100
@@ -971,7 +971,8 @@
         (lang, code) = model[combo.get_active()]
         macr = macros.LangpackMacros(self._datadir, code)
         mylocale = macr["SYSLOCALE"]
-        locale.setlocale(locale.LC_ALL, mylocale)
+        for category in locale.LC_MONETARY, locale.LC_NUMERIC, locale.LC_TIME:
+            locale.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)))

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.

** Changed in: language-selector (Ubuntu)
       Status: New => In Progress

** Changed in: language-selector (Ubuntu)
     Assignee: (unassigned) => Gunnar Hjalmarsson (gunnarhj)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/651582

Title:
  gnome-language-selector crashed with Error in setlocale()

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to