0

In Lucid 10.04, while trying to get spell-checking running in OpenOffice, I discovered taht I cannot open my Language Support dialog.

  • System -> Administration -> Language Support

It flashes up on the screen, shows a progress bar, and immediately disappears as the progress bar gets to the end...

I've uninstalled and re-insatalled language-selector-common language-selector ubuntu-standard, but it hasn't made any difference.

Here is the stderr output, from running /usr/bin/gnome-language-selector in the terminal. I can't figure it out, but maybe someone can work out what the problem is.

/usr/lib/python2.6/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py:803: GtkWarning: gtk_cell_view_set_cell_data: assertion `cell_view->priv->displayed_row != NULL' failed
  cell = combo.get_child().get_cell_renderers()[0]
Traceback (most recent call last):
  File "/usr/bin/gnome-language-selector", line 32, in <module>
    options=options)
  File "/usr/lib/python2.6/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 191, in __init__
    self.updateLocaleChooserCombo()
  File "/usr/lib/python2.6/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 63, in wrapper
    res = f(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/LanguageSelector/gtk/GtkLanguageSelector.py", line 818, in updateLocaleChooserCombo
    defaultLangName = self._localeinfo.translate(defaultLangCode, native=True)
  File "/usr/lib/python2.6/dist-packages/LanguageSelector/LocaleInfo.py", line 169, in translate
    l = filter(lambda k: k.startswith(macr['LCODE']), self.generated_locales())
  File "/usr/lib/python2.6/dist-packages/LanguageSelector/LocaleInfo.py", line 110, in generated_locales
    macr = macros.LangpackMacros(self._datadir, tmp)
  File "/usr/lib/python2.6/dist-packages/LanguageSelector/macros.py", line 87, in __init__
    (self['LCODE'], self['CCODE']) = locale.split('_')
ValueError: too many values to unpack
Peter.O
  • 24,681
  • This question should instead be filed as a bug report, thanks! Instructions here. – Jorge Castro Feb 10 '12 at 16:21
  • Now, that I know what caused the crash (thanks Lakritsbollar), and without looking beyond a Wikipedia article, it seems that it was caused by an invalidly named Locale identifier: It is defined in this format: [language[_territory][.codeset][@modifier]] ... If this is truly the posix standard, would it be considered a bug? PS. I compiled the localedef with that name; ie. it didn't come from anything in the Ubuntu repositories.. – Peter.O Feb 11 '12 at 10:49

1 Answers1

1

First of all: it sounds like a bug, report it as such.

Some insight: the error itself Python itself is described here, basically what it's saying is that the locale string that is to be parsed should be split on "_" and broken up in two parts (one called LCODE and the other CCODE)... but there are more than two parts, so Python complains. Locales tend to look like en_US.UTF-8, so that's why splitting them up on "_" is a good idea: one says it's English, the other part says it's specifically US English.

Perhaps you have locales that don't follow this format installed (unlikely, but possible?)?

  • Thanks Lakritsbollar. Your comment has helped (ths Python Traceback makes some sense now :).. I do have a custom locale item: LC_TIME=en_AU_zap.UTF-8 .. It has two underscores, so that may be the problem (if it is parsing that particulay item)... I'll check it out futher and add another comment here later when I've got a bit more time)... – Peter.O Feb 11 '12 at 02:06
  • Sounds like that could be the problem then, @Peter.O -- try (temporarily) setting your locale settings to regular en_AU.UTF-8 and see if that helps (via e.g. export LC_TIME=en_AU.UTF-8 in a terminal). I suppose that the language selector also runs a check against all locales in the system, though. See which ones are supported by running locale -a in a terminal. If neither your own settings nor the set supported locales have more than one underscore in them, the program should work... or at least not fail with that particular error. :) – Lakritsbollar Feb 11 '12 at 08:54
  • Thanks Even after adjusting my export, so that locale no longer shows the *_zap version, it do still show up in the listing frome locale -a.. and it still crashes with the same error, That makes sense though, because compiled the custom en_AU_zap.UTF-8 is still in the system. So it seems I now need to remove the compiled "culprit" ... Do you happen to know specifically how to do that? – Peter.O Feb 11 '12 at 09:48
  • I found it! ... to list: sudo localedef --list-archive .. to remove it: sudo localedef --delete-from-archive en_AU_zap.utf8 ... Language Support works fine now.. Thanks Lakritsbollar! ... – Peter.O Feb 11 '12 at 10:00