[GRASS-SVN] r51808 - grass/trunk/gui/wxpython/gui_core

svn_grass at osgeo.org svn_grass at osgeo.org
Sun May 27 01:05:20 PDT 2012


Author: lucadelu
Date: 2012-05-27 01:05:19 -0700 (Sun, 27 May 2012)
New Revision: 51808

Modified:
   grass/trunk/gui/wxpython/gui_core/ghelp.py
Log:
add language into about panel

Modified: grass/trunk/gui/wxpython/gui_core/ghelp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/ghelp.py	2012-05-26 17:16:14 UTC (rev 51807)
+++ grass/trunk/gui/wxpython/gui_core/ghelp.py	2012-05-27 08:05:19 UTC (rev 51808)
@@ -383,7 +383,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)
         
@@ -474,6 +474,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(utils.GetSettingsPath(), 'rc'))
+        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