[GRASS-SVN] r53260 - grass/branches/develbranch_6/gui/wxpython/gui_core
svn_grass at osgeo.org
svn_grass at osgeo.org
Fri Sep 21 04:58:19 PDT 2012
Author: martinl
Date: 2012-09-21 04:58:18 -0700 (Fri, 21 Sep 2012)
New Revision: 53260
Modified:
grass/branches/develbranch_6/gui/wxpython/gui_core/ghelp.py
Log:
marisn: WXGUI: Help shouldn't fail if locale isn't set.
(merge r53238 from relbr64)
Modified: grass/branches/develbranch_6/gui/wxpython/gui_core/ghelp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_core/ghelp.py 2012-09-21 10:33:33 UTC (rev 53259)
+++ grass/branches/develbranch_6/gui/wxpython/gui_core/ghelp.py 2012-09-21 11:58:18 UTC (rev 53260)
@@ -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