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

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 27 06:14:35 PDT 2012


Author: neteler
Date: 2012-05-27 06:14:35 -0700 (Sun, 27 May 2012)
New Revision: 51821

Modified:
   grass/branches/releasebranch_6_4/gui/wxpython/gui_core/ghelp.py
Log:
backport of language output in 'About' window (trunk, r51808)

Modified: grass/branches/releasebranch_6_4/gui/wxpython/gui_core/ghelp.py
===================================================================
--- grass/branches/releasebranch_6_4/gui/wxpython/gui_core/ghelp.py	2012-05-27 11:32:59 UTC (rev 51820)
+++ grass/branches/releasebranch_6_4/gui/wxpython/gui_core/ghelp.py	2012-05-27 13:14:35 UTC (rev 51821)
@@ -382,7 +382,7 @@
 
     @todo improve styling
     """
-    def __init__(self, parent, size = (750, 450), 
+    def __init__(self, parent, size = (750, 460), 
                  title = _('About GRASS GIS'), **kwargs):
         wx.Frame.__init__(self, parent = parent, id = wx.ID_ANY, title = title, size = size, **kwargs)
         
@@ -473,6 +473,26 @@
                       proportion = 1,
                       flag = wx.EXPAND | wx.ALIGN_CENTER | wx.ALIGN_CENTER_VERTICAL)
         
+        row += 2
+        infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
+                                               label = _('Language:')),
+                          pos = (row, 0),
+                          flag = wx.ALIGN_RIGHT)
+        rcfile = open(os.path.join(os.getenv('HOME'), ".grassrc6"))
+        lines = rcfile.readlines()
+        rcfile.close()
+        lang = None
+        for line in lines:
+            if 'LANG' in line:
+                lang = line.split(':')[1].strip()
+        if not lang:
+            import locale
+            lang = '.'.join(locale.getdefaultlocale())
+        infoGridSizer.Add(item = wx.StaticText(parent = infoTxt, id = wx.ID_ANY,
+                                               label = lang),
+                          pos = (row, 1),
+                          flag = wx.ALIGN_LEFT)        
+        
         # create a flat notebook for displaying information about GRASS
         aboutNotebook = GNotebook(panel, style = globalvar.FNPageStyle | FN.FNB_NO_X_BUTTON) 
         aboutNotebook.SetTabAreaColour(globalvar.FNPageColor)



More information about the grass-commit mailing list