[GRASS-SVN] r53239 - grass/trunk/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Sep 19 23:48:26 PDT 2012
Author: marisn
Date: 2012-09-19 23:48:25 -0700 (Wed, 19 Sep 2012)
New Revision: 53239
Modified:
grass/trunk/gui/wxpython/gui_core/ghelp.py
Log:
WXGUI: Help shouldn't fail if locale isn't set. See also r53238
Modified: grass/trunk/gui/wxpython/gui_core/ghelp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/ghelp.py 2012-09-20 06:43:38 UTC (rev 53238)
+++ grass/trunk/gui/wxpython/gui_core/ghelp.py 2012-09-20 06:48:25 UTC (rev 53239)
@@ -483,7 +483,11 @@
self.langUsed = grass.gisenv().get('LANG', None)
if not self.langUsed:
import locale
- self.langUsed = '.'.join(locale.getdefaultlocale())
+ loc = locale.getdefaultlocale()
+ if loc == (None, None):
+ self.langUsed = _('unknown')
+ else:
+ self.langUsed = u'%s.%s' % (loc[0], loc[1])
infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
label = self.langUsed),
pos = (row, 1),
More information about the grass-commit
mailing list