[GRASS-SVN] r53238 - grass/branches/releasebranch_6_4/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 19 23:43:38 PDT 2012


Author: marisn
Date: 2012-09-19 23:43:38 -0700 (Wed, 19 Sep 2012)
New Revision: 53238

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_core/ghelp.py
Log:
WXGUI: Help shouldn't fail if locale isn't set.

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_core/ghelp.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_core/ghelp.py	2012-09-20 06:40:17 UTC (rev 53237)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_core/ghelp.py	2012-09-20 06:43:38 UTC (rev 53238)
@@ -480,7 +480,11 @@
         lang = grass.gisenv().get('LANG', None)
         if not lang:
             import locale
-            lang = '.'.join(locale.getdefaultlocale())
+            loc = locale.getdefaultlocale()
+            if loc == (None, None):
+                lang = _('unknown')
+            else:
+                lang = u'%s.%s' % (loc[0], loc[1]) 
         infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
                                                label = lang),
                           pos = (row, 1),



More information about the grass-commit mailing list