[GRASS-SVN] r30368 - in grass/trunk/gui/wxpython: . gui_modules
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Feb 26 17:56:40 EST 2008
Author: martinl
Date: 2008-02-26 17:56:40 -0500 (Tue, 26 Feb 2008)
New Revision: 30368
Modified:
grass/trunk/gui/wxpython/gui_modules/menuform.py
grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: define i18N (grasswxpy) package
Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py 2008-02-26 22:41:21 UTC (rev 30367)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py 2008-02-26 22:56:40 UTC (rev 30368)
@@ -50,7 +50,13 @@
import re
import string
import textwrap
+import os
+from os import system
+### i18N
+import gettext
+gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
+
import utils
utils.CheckForWx()
import wx
@@ -66,11 +72,6 @@
HandlerBase=xml.sax.handler.ContentHandler
from xml.sax import make_parser
-import os
-from os import system
-import gettext
-gettext.install("grasswx")
-
gisbase = os.getenv("GISBASE")
import globalvar
if gisbase is None:
Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2008-02-26 22:41:21 UTC (rev 30367)
+++ grass/trunk/gui/wxpython/wxgui.py 2008-02-26 22:56:40 UTC (rev 30368)
@@ -29,6 +29,7 @@
import types
import re
import string
+import getopt
### for GRC (workspace file) parsering
# xmlproc not available on Mac OS
# from xml.parsers.xmlproc import xmlproc
@@ -38,6 +39,9 @@
import xml.sax.handler
HandlerBase=xml.sax.handler.ContentHandler
from xml.sax import make_parser
+### i18N
+import gettext
+gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
import gui_modules
gmpath = gui_modules.__path__[0]
@@ -1450,17 +1454,14 @@
workspaceFile = process_opt(opts, args)[0]
- # replace with the appropriate catalog name
- gettext.install("GMApp")
-
#
# run application
#
app = GMApp(workspaceFile)
- q=wx.LogNull()
+ # suppress wxPython logs
+ q = wx.LogNull()
+
app.MainLoop()
if __name__ == "__main__":
- import getopt
- import gettext
sys.exit(main())
More information about the grass-commit
mailing list