[GRASS-SVN] r57219 - in grass/trunk/gui/wxpython: . animation core dbmgr gcp gmodeler gui_core iclass icons lmgr location_wizard mapdisp mapswipe modules nviz psmap rlisetup scripts vdigit vnet web_services wxplot
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Jul 18 09:34:31 PDT 2013
Author: wenzeslaus
Date: 2013-07-18 09:34:31 -0700 (Thu, 18 Jul 2013)
New Revision: 57219
Modified:
grass/trunk/gui/wxpython/animation/anim.py
grass/trunk/gui/wxpython/animation/controller.py
grass/trunk/gui/wxpython/animation/dialogs.py
grass/trunk/gui/wxpython/animation/frame.py
grass/trunk/gui/wxpython/animation/g.gui.animation.py
grass/trunk/gui/wxpython/animation/mapwindow.py
grass/trunk/gui/wxpython/animation/nviztask.py
grass/trunk/gui/wxpython/animation/temporal_manager.py
grass/trunk/gui/wxpython/animation/toolbars.py
grass/trunk/gui/wxpython/animation/utils.py
grass/trunk/gui/wxpython/core/gcmd.py
grass/trunk/gui/wxpython/core/gconsole.py
grass/trunk/gui/wxpython/core/giface.py
grass/trunk/gui/wxpython/core/globalvar.py
grass/trunk/gui/wxpython/core/menutree.py
grass/trunk/gui/wxpython/core/render.py
grass/trunk/gui/wxpython/core/settings.py
grass/trunk/gui/wxpython/core/toolboxes.py
grass/trunk/gui/wxpython/core/units.py
grass/trunk/gui/wxpython/core/utils.py
grass/trunk/gui/wxpython/core/workspace.py
grass/trunk/gui/wxpython/core/ws.py
grass/trunk/gui/wxpython/dbmgr/base.py
grass/trunk/gui/wxpython/dbmgr/dialogs.py
grass/trunk/gui/wxpython/dbmgr/g.gui.dbmgr.py
grass/trunk/gui/wxpython/dbmgr/manager.py
grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py
grass/trunk/gui/wxpython/dbmgr/vinfo.py
grass/trunk/gui/wxpython/gcp/manager.py
grass/trunk/gui/wxpython/gcp/mapdisplay.py
grass/trunk/gui/wxpython/gcp/toolbars.py
grass/trunk/gui/wxpython/gis_set.py
grass/trunk/gui/wxpython/gmodeler/dialogs.py
grass/trunk/gui/wxpython/gmodeler/frame.py
grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py
grass/trunk/gui/wxpython/gmodeler/model.py
grass/trunk/gui/wxpython/gmodeler/preferences.py
grass/trunk/gui/wxpython/gmodeler/pystc.py
grass/trunk/gui/wxpython/gmodeler/toolbars.py
grass/trunk/gui/wxpython/gui_core/dialogs.py
grass/trunk/gui/wxpython/gui_core/forms.py
grass/trunk/gui/wxpython/gui_core/ghelp.py
grass/trunk/gui/wxpython/gui_core/goutput.py
grass/trunk/gui/wxpython/gui_core/gselect.py
grass/trunk/gui/wxpython/gui_core/mapdisp.py
grass/trunk/gui/wxpython/gui_core/mapwindow.py
grass/trunk/gui/wxpython/gui_core/menu.py
grass/trunk/gui/wxpython/gui_core/preferences.py
grass/trunk/gui/wxpython/gui_core/prompt.py
grass/trunk/gui/wxpython/gui_core/query.py
grass/trunk/gui/wxpython/gui_core/toolbars.py
grass/trunk/gui/wxpython/gui_core/treeview.py
grass/trunk/gui/wxpython/gui_core/widgets.py
grass/trunk/gui/wxpython/iclass/dialogs.py
grass/trunk/gui/wxpython/iclass/digit.py
grass/trunk/gui/wxpython/iclass/frame.py
grass/trunk/gui/wxpython/iclass/g.gui.iclass.py
grass/trunk/gui/wxpython/iclass/plots.py
grass/trunk/gui/wxpython/iclass/statistics.py
grass/trunk/gui/wxpython/iclass/toolbars.py
grass/trunk/gui/wxpython/icons/icon.py
grass/trunk/gui/wxpython/lmgr/frame.py
grass/trunk/gui/wxpython/lmgr/layertree.py
grass/trunk/gui/wxpython/lmgr/menudata.py
grass/trunk/gui/wxpython/lmgr/pyshell.py
grass/trunk/gui/wxpython/lmgr/toolbars.py
grass/trunk/gui/wxpython/location_wizard/dialogs.py
grass/trunk/gui/wxpython/location_wizard/wizard.py
grass/trunk/gui/wxpython/mapdisp/frame.py
grass/trunk/gui/wxpython/mapdisp/gprint.py
grass/trunk/gui/wxpython/mapdisp/main.py
grass/trunk/gui/wxpython/mapdisp/mapwindow.py
grass/trunk/gui/wxpython/mapdisp/statusbar.py
grass/trunk/gui/wxpython/mapdisp/toolbars.py
grass/trunk/gui/wxpython/mapswipe/dialogs.py
grass/trunk/gui/wxpython/mapswipe/frame.py
grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py
grass/trunk/gui/wxpython/mapswipe/mapwindow.py
grass/trunk/gui/wxpython/mapswipe/toolbars.py
grass/trunk/gui/wxpython/modules/colorrules.py
grass/trunk/gui/wxpython/modules/extensions.py
grass/trunk/gui/wxpython/modules/histogram.py
grass/trunk/gui/wxpython/modules/mcalc_builder.py
grass/trunk/gui/wxpython/modules/vclean.py
grass/trunk/gui/wxpython/nviz/animation.py
grass/trunk/gui/wxpython/nviz/mapwindow.py
grass/trunk/gui/wxpython/nviz/preferences.py
grass/trunk/gui/wxpython/nviz/tools.py
grass/trunk/gui/wxpython/nviz/workspace.py
grass/trunk/gui/wxpython/nviz/wxnviz.py
grass/trunk/gui/wxpython/psmap/dialogs.py
grass/trunk/gui/wxpython/psmap/frame.py
grass/trunk/gui/wxpython/psmap/g.gui.psmap.py
grass/trunk/gui/wxpython/psmap/instructions.py
grass/trunk/gui/wxpython/psmap/toolbars.py
grass/trunk/gui/wxpython/psmap/utils.py
grass/trunk/gui/wxpython/rlisetup/frame.py
grass/trunk/gui/wxpython/rlisetup/g.gui.rlisetup.py
grass/trunk/gui/wxpython/rlisetup/wizard.py
grass/trunk/gui/wxpython/scripts/vkrige.py
grass/trunk/gui/wxpython/vdigit/dialogs.py
grass/trunk/gui/wxpython/vdigit/g.gui.vdigit.py
grass/trunk/gui/wxpython/vdigit/mapwindow.py
grass/trunk/gui/wxpython/vdigit/preferences.py
grass/trunk/gui/wxpython/vdigit/toolbars.py
grass/trunk/gui/wxpython/vdigit/wxdigit.py
grass/trunk/gui/wxpython/vdigit/wxdisplay.py
grass/trunk/gui/wxpython/vnet/dialogs.py
grass/trunk/gui/wxpython/vnet/toolbars.py
grass/trunk/gui/wxpython/vnet/vnet_core.py
grass/trunk/gui/wxpython/vnet/vnet_data.py
grass/trunk/gui/wxpython/vnet/vnet_utils.py
grass/trunk/gui/wxpython/vnet/widgets.py
grass/trunk/gui/wxpython/web_services/dialogs.py
grass/trunk/gui/wxpython/web_services/widgets.py
grass/trunk/gui/wxpython/wxgui.py
grass/trunk/gui/wxpython/wxplot/base.py
grass/trunk/gui/wxpython/wxplot/dialogs.py
grass/trunk/gui/wxpython/wxplot/histogram.py
grass/trunk/gui/wxpython/wxplot/profile.py
grass/trunk/gui/wxpython/wxplot/scatter.py
Log:
wxGUI/translations: different way of accessing gettext underscore ('_') function (attempt to fix #1739 for grasswxpy)
Modified: grass/trunk/gui/wxpython/animation/anim.py
===================================================================
--- grass/trunk/gui/wxpython/animation/anim.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/animation/anim.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -16,6 +16,7 @@
import wx
from utils import Orientation, ReplayMode
+from core.utils import _
class Animation(wx.EvtHandler):
"""!Animation class specifies which frame to show at which instance."""
Modified: grass/trunk/gui/wxpython/animation/controller.py
===================================================================
--- grass/trunk/gui/wxpython/animation/controller.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/animation/controller.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -28,6 +28,7 @@
hasVisvis = False
from core.gcmd import GException, GError, GMessage
+from core.utils import _
import grass.script as grass
from temporal_manager import TemporalManager
@@ -564,9 +565,6 @@
#def test():
-# import gettext
-# gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
-#
# import grass.script as grass
# import wx
# app = wx.PySimpleApp()
Modified: grass/trunk/gui/wxpython/animation/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/animation/dialogs.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/animation/dialogs.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -36,6 +36,7 @@
from gui_core import gselect
from gui_core.dialogs import MapLayersDialog, GetImageHandlers
from core.settings import UserSettings
+from core.utils import _
from utils import TemporalMode, validateTimeseriesName, validateMapNames
from nviztask import NvizTask
@@ -1242,8 +1243,6 @@
def test():
import wx.lib.inspection
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
import grass.script as grass
Modified: grass/trunk/gui/wxpython/animation/frame.py
===================================================================
--- grass/trunk/gui/wxpython/animation/frame.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/animation/frame.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -29,6 +29,7 @@
from core import globalvar
from gui_core.widgets import IntegerValidator
from core.gcmd import RunCommand
+from core.utils import _
from mapwindow import AnimationWindow, BitmapProvider, BitmapPool
from controller import AnimationController
@@ -512,8 +513,6 @@
self.Layout()
def test():
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
import grass.script as grass
Modified: grass/trunk/gui/wxpython/animation/g.gui.animation.py
===================================================================
--- grass/trunk/gui/wxpython/animation/g.gui.animation.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/animation/g.gui.animation.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -54,7 +54,6 @@
import sys
import wx
-import gettext
import grass.script as grass
@@ -64,11 +63,10 @@
from core.settings import UserSettings
from core.globalvar import CheckWxVersion
from core.giface import StandaloneGrassInterface
+from core.utils import _
from animation.frame import AnimationFrame, MAX_COUNT
def main():
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
-
options, flags = grass.parser()
rast = options['rast']
Modified: grass/trunk/gui/wxpython/animation/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/animation/mapwindow.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/animation/mapwindow.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -24,6 +24,7 @@
from core.gcmd import RunCommand
from core.debug import Debug
from core.settings import UserSettings
+from core.utils import _
from grass.pydispatch.signal import Signal
Modified: grass/trunk/gui/wxpython/animation/nviztask.py
===================================================================
--- grass/trunk/gui/wxpython/animation/nviztask.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/animation/nviztask.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -27,7 +27,7 @@
from core.workspace import ProcessWorkspaceFile
from core.gcmd import RunCommand, GException
-from core.utils import GetLayerNameFromCmd, CmdToTuple
+from core.utils import GetLayerNameFromCmd, CmdToTuple, _
from grass.script import task as gtask
from grass.script import core as grass
@@ -198,8 +198,6 @@
def test():
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
nviz = NvizTask('/home/anna/testy/nviz/t12.gxw')
# nviz = NvizState('/home/anna/testy/nviz/t3.gxw')
Modified: grass/trunk/gui/wxpython/animation/temporal_manager.py
===================================================================
--- grass/trunk/gui/wxpython/animation/temporal_manager.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/animation/temporal_manager.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -26,6 +26,7 @@
import grass.script as grass
import grass.temporal as tgis
from core.gcmd import GException
+from core.utils import _
from utils import validateTimeseriesName, TemporalType
@@ -325,9 +326,7 @@
infoDict[id]['maps'] = maps
def test():
- import gettext
from pprint import pprint
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
temp = TemporalManager()
Modified: grass/trunk/gui/wxpython/animation/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/animation/toolbars.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/animation/toolbars.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -21,6 +21,7 @@
from icons.icon import MetaIcon
from anim import ReplayMode
+from core.utils import _
ganimIcons = {
'speed': MetaIcon(img = 'settings', label = _("Change animation speed")),
Modified: grass/trunk/gui/wxpython/animation/utils.py
===================================================================
--- grass/trunk/gui/wxpython/animation/utils.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/animation/utils.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -28,6 +28,7 @@
import grass.script as grass
from core.gcmd import GException
+from core.utils import _
class TemporalMode:
TEMPORAL = 1
Modified: grass/trunk/gui/wxpython/core/gcmd.py
===================================================================
--- grass/trunk/gui/wxpython/core/gcmd.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/core/gcmd.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -49,6 +49,10 @@
from core import globalvar
from core.debug import Debug
+# cannot import from the core.utils module to avoid cross dependencies
+import gettext
+_ = gettext.translation('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale')).ugettext
+
def GetRealCmd(cmd):
"""!Return real command name - only for MS Windows
"""
Modified: grass/trunk/gui/wxpython/core/gconsole.py
===================================================================
--- grass/trunk/gui/wxpython/core/gconsole.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/core/gconsole.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -39,6 +39,7 @@
from core import globalvar
from core.gcmd import CommandThread, GError, GException
+from core.utils import _
from gui_core.forms import GUI
from core.debug import Debug
from core.settings import UserSettings
Modified: grass/trunk/gui/wxpython/core/giface.py
===================================================================
--- grass/trunk/gui/wxpython/core/giface.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/core/giface.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -19,6 +19,7 @@
from core.gconsole import GConsole, \
EVT_CMD_OUTPUT, EVT_CMD_PROGRESS, EVT_CMD_RUN, EVT_CMD_DONE, \
EVT_WRITE_LOG, EVT_WRITE_CMD_LOG, EVT_WRITE_WARNING, EVT_WRITE_ERROR
+from core.utils import _
import grass.script as grass
Modified: grass/trunk/gui/wxpython/core/globalvar.py
===================================================================
--- grass/trunk/gui/wxpython/core/globalvar.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/core/globalvar.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -27,6 +27,10 @@
from core.debug import Debug
+# cannot import from the core.utils module to avoid cross dependencies
+import gettext
+_ = gettext.translation('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale')).ugettext
+
if os.path.join(ETCDIR, "python") not in sys.path:
sys.path.append(os.path.join(ETCDIR, "python"))
Modified: grass/trunk/gui/wxpython/core/menutree.py
===================================================================
--- grass/trunk/gui/wxpython/core/menutree.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/core/menutree.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -51,6 +51,7 @@
from core.treemodel import TreeModel, ModuleNode
from core.settings import UserSettings
from core.toolboxes import expandAddons as expAddons
+from core.utils import _
if not os.getenv("GISBASE"):
sys.exit("GRASS is not running. Exiting...")
@@ -214,9 +215,6 @@
if __name__ == "__main__":
- # i18N
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
action = 'strings'
menu = 'manager'
Modified: grass/trunk/gui/wxpython/core/render.py
===================================================================
--- grass/trunk/gui/wxpython/core/render.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/core/render.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -38,6 +38,7 @@
from grass.pydispatch.signal import Signal
from core import utils
+from core.utils import _
from core.ws import RenderWMSMgr
from core.gcmd import GException, GError, RunCommand
from core.debug import Debug
Modified: grass/trunk/gui/wxpython/core/settings.py
===================================================================
--- grass/trunk/gui/wxpython/core/settings.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/core/settings.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -26,7 +26,7 @@
from core import globalvar
from core.gcmd import GException, GError
-from core.utils import GetSettingsPath, PathJoin, rgb2str
+from core.utils import GetSettingsPath, PathJoin, rgb2str, _
class Settings:
"""!Generic class where to store settings"""
Modified: grass/trunk/gui/wxpython/core/toolboxes.py
===================================================================
--- grass/trunk/gui/wxpython/core/toolboxes.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/core/toolboxes.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -37,7 +37,7 @@
sys.path.append(gui_wx_path)
from core.globalvar import ETCWXDIR
-from core.utils import GetSettingsPath
+from core.utils import GetSettingsPath, _
from core.gcmd import GError, RunCommand
import grass.script.task as gtask
Modified: grass/trunk/gui/wxpython/core/units.py
===================================================================
--- grass/trunk/gui/wxpython/core/units.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/core/units.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -22,6 +22,8 @@
@author Martin Landa <landa.martin gmail.com>
"""
+from core.utils import _
+
class BaseUnits:
def __init__(self):
self._units = dict()
Modified: grass/trunk/gui/wxpython/core/utils.py
===================================================================
--- grass/trunk/gui/wxpython/core/utils.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/core/utils.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -32,6 +32,11 @@
from core.debug import Debug
# from core.settings import UserSettings
+# intended to be used also outside this module
+import gettext
+_ = gettext.translation('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale')).ugettext
+
+
def normalize_whitespace(text):
"""!Remove redundant whitespace from a string"""
return string.join(string.split(text), ' ')
Modified: grass/trunk/gui/wxpython/core/workspace.py
===================================================================
--- grass/trunk/gui/wxpython/core/workspace.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/core/workspace.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -20,7 +20,7 @@
import wx
-from core.utils import normalize_whitespace
+from core.utils import normalize_whitespace, _
from core.settings import UserSettings
from core.gcmd import EncodeString, GetDefaultEncoding
from nviz.main import NvizSettings
Modified: grass/trunk/gui/wxpython/core/ws.py
===================================================================
--- grass/trunk/gui/wxpython/core/ws.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/core/ws.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -28,6 +28,7 @@
from core.debug import Debug
from core.gconsole import CmdThread, GStderr, EVT_CMD_DONE, EVT_CMD_OUTPUT
+from core.utils import _
try:
haveGdal = True
Modified: grass/trunk/gui/wxpython/dbmgr/base.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/base.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/dbmgr/base.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -46,7 +46,7 @@
from dbmgr.sqlbuilder import SQLBuilderSelect, SQLBuilderUpdate
from core.gcmd import RunCommand, GException, GError, GMessage, GWarning
-from core.utils import ListOfCatsToRange
+from core.utils import ListOfCatsToRange, _
from gui_core.dialogs import CreateNewVector
from dbmgr.vinfo import VectorDBInfo, GetUnicodeValue, CreateDbInfoDesc
from core.debug import Debug
Modified: grass/trunk/gui/wxpython/dbmgr/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/dialogs.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/dbmgr/dialogs.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -21,6 +21,7 @@
import types
from core import globalvar
+from core.utils import _
import wx
import wx.lib.scrolledpanel as scrolled
Modified: grass/trunk/gui/wxpython/dbmgr/g.gui.dbmgr.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/g.gui.dbmgr.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/dbmgr/g.gui.dbmgr.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -32,8 +32,6 @@
import sys
import wx
-import gettext
-gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
import grass.script as grass
@@ -41,6 +39,7 @@
if gui_wx_path not in sys.path:
sys.path.append(gui_wx_path)
+from core.utils import _
from dbmgr.manager import AttributeManager
def main():
Modified: grass/trunk/gui/wxpython/dbmgr/manager.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/manager.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/dbmgr/manager.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -33,6 +33,7 @@
from core import globalvar
from core.gcmd import GMessage
from core.debug import Debug
+from core.utils import _
from dbmgr.base import DbMgrBase
from gui_core.widgets import GNotebook
Modified: grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/dbmgr/sqlbuilder.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -33,6 +33,7 @@
sys.path.append(gui_wx_path)
from core import globalvar
+from core.utils import _
import wx
from core.gcmd import RunCommand, GError, GMessage
@@ -729,9 +730,6 @@
print >>sys.stderr, __doc__
sys.exit()
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
-
app = wx.App(0)
sqlb = sqlBuilder(parent = None, vectmap = sys.argv[2], layer = layer)
sqlb.Show()
Modified: grass/trunk/gui/wxpython/dbmgr/vinfo.py
===================================================================
--- grass/trunk/gui/wxpython/dbmgr/vinfo.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/dbmgr/vinfo.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -22,6 +22,7 @@
from gui_core.gselect import VectorDBInfo as VectorDBInfoBase
from core.gcmd import RunCommand
from core.settings import UserSettings
+from core.utils import _
import grass.script as grass
def GetUnicodeValue(value):
Modified: grass/trunk/gui/wxpython/gcp/manager.py
===================================================================
--- grass/trunk/gui/wxpython/gcp/manager.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gcp/manager.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -42,6 +42,7 @@
from core import globalvar
from core import utils
from core.render import Map
+from core.utils import _
from gui_core.gselect import Select, LocationSelect, MapsetSelect
from gui_core.dialogs import GroupDialog
from core.gcmd import RunCommand, GMessage, GError, GWarning
Modified: grass/trunk/gui/wxpython/gcp/mapdisplay.py
===================================================================
--- grass/trunk/gui/wxpython/gcp/mapdisplay.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gcp/mapdisplay.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -27,6 +27,7 @@
from gcp.toolbars import GCPDisplayToolbar, GCPManToolbar
from mapdisp.gprint import PrintOptions
from core.gcmd import GMessage
+from core.utils import _
from gui_core.dialogs import GetImageHandlers, ImageSizeDialog
from gui_core.mapdisp import SingleMapFrame
from core.settings import UserSettings
Modified: grass/trunk/gui/wxpython/gcp/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gcp/toolbars.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gcp/toolbars.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -21,6 +21,7 @@
import wx
from core import globalvar
+from core.utils import _
from gui_core.toolbars import BaseToolbar, BaseIcons
from icon import MetaIcon
Modified: grass/trunk/gui/wxpython/gis_set.py
===================================================================
--- grass/trunk/gui/wxpython/gis_set.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gis_set.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -29,7 +29,6 @@
import getpass
### i18N
-import gettext
gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
if __name__ == "__main__":
@@ -46,7 +45,7 @@
from gui_core.ghelp import HelpFrame
from core.gcmd import GMessage, GError, DecodeString, RunCommand, GWarning
-from core.utils import GetListOfLocations, GetListOfMapsets
+from core.utils import GetListOfLocations, GetListOfMapsets, _
from location_wizard.dialogs import RegionDef
from gui_core.dialogs import TextEntryDialog
from gui_core.widgets import GenericValidator
@@ -78,9 +77,7 @@
self.panel = scrolled.ScrolledPanel(parent = self, id = wx.ID_ANY)
# i18N
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
-
+
#
# graphical elements
#
@@ -1023,8 +1020,6 @@
if os.getenv("GISBASE") is None:
sys.exit("Failed to start GUI, GRASS GIS is not running.")
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
GRASSStartUp = StartUp(0)
GRASSStartUp.MainLoop()
Modified: grass/trunk/gui/wxpython/gmodeler/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/dialogs.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gmodeler/dialogs.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -31,6 +31,7 @@
from core import globalvar
from core import utils
+from core.utils import _
from gui_core.widgets import SearchModuleWidget, SimpleValidator
from core.gcmd import GError, EncodeString
from gui_core.dialogs import SimpleDialog, MapLayersDialogForModeler
Modified: grass/trunk/gui/wxpython/gmodeler/frame.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/frame.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gmodeler/frame.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -33,6 +33,7 @@
import wx.lib.flatnotebook as FN
from core import globalvar
+from core.utils import _
from gui_core.widgets import GNotebook
from core.gconsole import GConsole, \
EVT_CMD_RUN, EVT_CMD_DONE, EVT_CMD_PREPARE, EVT_CMD_RUN, EVT_CMD_DONE
Modified: grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gmodeler/g.gui.gmodeler.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -38,7 +38,6 @@
import sys
import wx
-import gettext
import grass.script as grass
@@ -48,11 +47,10 @@
from core.giface import StandaloneGrassInterface
from core.globalvar import CheckWxVersion
+from core.utils import _
from gmodeler.frame import ModelFrame
def main():
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
app = wx.PySimpleApp()
if not CheckWxVersion([2, 9]):
Modified: grass/trunk/gui/wxpython/gmodeler/model.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/model.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gmodeler/model.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -41,6 +41,7 @@
from core import globalvar
from core import utils
+from core.utils import _
from core.gcmd import GMessage, GException, GError, RunCommand, EncodeString, GWarning, GetDefaultEncoding
from core.settings import UserSettings
from gui_core.forms import GUI, CmdPanel
Modified: grass/trunk/gui/wxpython/gmodeler/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/preferences.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gmodeler/preferences.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -21,6 +21,7 @@
from core import globalvar
from gui_core.preferences import PreferencesBaseDialog
from core.settings import UserSettings
+from core.utils import _
class PreferencesDialog(PreferencesBaseDialog):
"""!User preferences dialog"""
Modified: grass/trunk/gui/wxpython/gmodeler/pystc.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/pystc.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gmodeler/pystc.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -19,6 +19,7 @@
import wx
from wx import stc
+from core.utils import _
class PyStc(stc.StyledTextCtrl):
Modified: grass/trunk/gui/wxpython/gmodeler/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gmodeler/toolbars.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gmodeler/toolbars.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -20,6 +20,7 @@
import wx
from core import globalvar
+from core.utils import _
from gui_core.toolbars import BaseToolbar, BaseIcons
from icons.icon import MetaIcon
Modified: grass/trunk/gui/wxpython/gui_core/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/dialogs.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/dialogs.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -51,7 +51,7 @@
from gui_core.gselect import LocationSelect, MapsetSelect, Select, OgrTypeSelect, GdalSelect, MapsetSelect
from gui_core.forms import GUI
from gui_core.widgets import SingleSymbolPanel, GListCtrl, SimpleValidator
-from core.utils import GetLayerNameFromCmd, GetValidLayerName
+from core.utils import GetLayerNameFromCmd, GetValidLayerName, _
from core.settings import UserSettings, GetDisplayVectSettings
from core.debug import Debug
Modified: grass/trunk/gui/wxpython/gui_core/forms.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/forms.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/forms.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -94,6 +94,7 @@
from gui_core import gselect
from core import gcmd
from core import utils
+from core.utils import _
from core.settings import UserSettings
from gui_core.widgets import FloatValidator, GNotebook, FormNotebook, FormListbook
@@ -2340,8 +2341,6 @@
return True
if __name__ == "__main__":
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
if len(sys.argv) == 1:
sys.exit(_("usage: %s <grass command>") % sys.argv[0])
Modified: grass/trunk/gui/wxpython/gui_core/ghelp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/ghelp.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/ghelp.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -33,6 +33,7 @@
import grass.script as grass
from core import globalvar
+from core.utils import _
from core.gcmd import GError, DecodeString
from gui_core.widgets import FormListbook, ScrolledPanel
from core.debug import Debug
Modified: grass/trunk/gui/wxpython/gui_core/goutput.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/goutput.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/goutput.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -39,6 +39,7 @@
EVT_WRITE_LOG, EVT_WRITE_CMD_LOG, EVT_WRITE_WARNING, EVT_WRITE_ERROR
from gui_core.prompt import GPromptSTC
from core.settings import UserSettings
+from core.utils import _
from gui_core.widgets import SearchModuleWidget
Modified: grass/trunk/gui/wxpython/gui_core/gselect.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/gselect.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/gselect.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -58,7 +58,7 @@
from core.gcmd import RunCommand, GError, GMessage
from core.utils import GetListOfLocations, GetListOfMapsets, GetFormats
from core.utils import GetSettingsPath, GetValidLayerName, ListSortLower
-from core.utils import GetVectorNumberOfLayers
+from core.utils import GetVectorNumberOfLayers, _
from core.settings import UserSettings
from core.debug import Debug
Modified: grass/trunk/gui/wxpython/gui_core/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/mapdisp.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/mapdisp.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -27,6 +27,7 @@
from core import globalvar
from core.debug import Debug
+from core.utils import _
from grass.script import core as grass
Modified: grass/trunk/gui/wxpython/gui_core/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/mapwindow.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/mapwindow.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -22,6 +22,7 @@
from core.settings import UserSettings
from core.gcmd import GError
+from core.utils import _
from grass.script import core as grass
Modified: grass/trunk/gui/wxpython/gui_core/menu.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/menu.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/menu.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -24,6 +24,7 @@
from core import globalvar
from core import utils
from core.gcmd import EncodeString
+from core.utils import _
from gui_core.widgets import SearchModuleWidget
from gui_core.treeview import CTreeView
Modified: grass/trunk/gui/wxpython/gui_core/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/preferences.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/preferences.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -46,7 +46,7 @@
from core import globalvar
from core.gcmd import RunCommand
-from core.utils import ListOfMapsets, GetColorTables, ReadEpsgCodes, StoreEnvVariable
+from core.utils import ListOfMapsets, GetColorTables, ReadEpsgCodes, StoreEnvVariable, _
from core.settings import UserSettings
from gui_core.dialogs import SymbolDialog
from gui_core.widgets import IntegerValidator
Modified: grass/trunk/gui/wxpython/gui_core/prompt.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/prompt.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/prompt.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -32,6 +32,7 @@
from core import globalvar
from core import utils
from core.gcmd import EncodeString, DecodeString, GetRealCmd
+from core.utils import _
class GPrompt(object):
Modified: grass/trunk/gui/wxpython/gui_core/query.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/query.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/query.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -22,6 +22,7 @@
if gui_wx_path not in sys.path:
sys.path.append(gui_wx_path)
+from core.utils import _
from gui_core.treeview import TreeListView
from core.treemodel import TreeModel, DictNode
Modified: grass/trunk/gui/wxpython/gui_core/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/toolbars.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/toolbars.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -22,6 +22,7 @@
from core import globalvar
from core.debug import Debug
+from core.utils import _
from icons.icon import MetaIcon
BaseIcons = {
Modified: grass/trunk/gui/wxpython/gui_core/treeview.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/treeview.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/treeview.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -31,6 +31,7 @@
from core.globalvar import hasAgw
from core.treemodel import TreeModel, DictNode
+from core.utils import _
from grass.pydispatch.signal import Signal
Modified: grass/trunk/gui/wxpython/gui_core/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/gui_core/widgets.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/gui_core/widgets.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -52,6 +52,7 @@
from grass.pydispatch.signal import Signal
from core import globalvar
+from core.utils import _
from core.gcmd import GMessage, GError
from core.debug import Debug
Modified: grass/trunk/gui/wxpython/iclass/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/dialogs.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/iclass/dialogs.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -26,6 +26,7 @@
import wx.lib.scrolledpanel as scrolled
from core import globalvar
+from core.utils import _
from core.settings import UserSettings
from core.gcmd import GMessage
from gui_core.dialogs import SimpleDialog, GroupDialog
Modified: grass/trunk/gui/wxpython/iclass/digit.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/digit.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/iclass/digit.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -22,6 +22,7 @@
from vdigit.wxdigit import IVDigit
from vdigit.wxdisplay import DisplayDriver, TYPE_AREA
from core.gcmd import GWarning
+from core.utils import _
try:
from grass.lib.gis import G_verbose, G_set_verbose
from grass.lib.vector import *
Modified: grass/trunk/gui/wxpython/iclass/frame.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/frame.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/iclass/frame.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -21,6 +21,7 @@
import sys
import copy
import tempfile
+from core.utils import _
if __name__ == "__main__":
gui_wx_path = os.path.join(os.getenv('GISBASE'), 'etc', 'gui', 'wxpython')
@@ -1297,11 +1298,8 @@
self.toolbar.choice.SetString(idx, self._addSuffix(alias))
def test():
- import gettext
import core.render as render
-
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
-
+
app = wx.PySimpleApp()
wx.InitAllImageHandlers()
Modified: grass/trunk/gui/wxpython/iclass/g.gui.iclass.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/g.gui.iclass.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/iclass/g.gui.iclass.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -51,7 +51,6 @@
import sys
import wx
-import gettext
import grass.script as grass
@@ -63,6 +62,7 @@
from core.settings import UserSettings
from core.globalvar import CheckWxVersion
from core.giface import StandaloneGrassInterface
+from core.utils import _
from iclass.frame import IClassMapFrame
def main():
@@ -113,7 +113,6 @@
app.MainLoop()
if __name__ == '__main__':
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
grass.set_raise_on_error(False)
options, flags = grass.parser()
main()
Modified: grass/trunk/gui/wxpython/iclass/plots.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/plots.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/iclass/plots.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -18,6 +18,7 @@
import wx
import wx.lib.plot as plot
import wx.lib.scrolledpanel as scrolled
+from core.utils import _
class PlotPanel(scrolled.ScrolledPanel):
"""!Panel for drawing multiple plots.
Modified: grass/trunk/gui/wxpython/iclass/statistics.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/statistics.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/iclass/statistics.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -20,6 +20,7 @@
from ctypes import *
import grass.script as grass
+from core.utils import _
try:
from grass.lib.imagery import *
Modified: grass/trunk/gui/wxpython/iclass/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/iclass/toolbars.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/iclass/toolbars.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -20,6 +20,7 @@
import wx
+from core.utils import _
from gui_core.toolbars import BaseToolbar, BaseIcons
from icons.icon import MetaIcon
from iclass.dialogs import IClassMapDialog
Modified: grass/trunk/gui/wxpython/icons/icon.py
===================================================================
--- grass/trunk/gui/wxpython/icons/icon.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/icons/icon.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -22,6 +22,7 @@
import wx
from core.settings import UserSettings
+from core.utils import _
# default icon set
import grass_icons
Modified: grass/trunk/gui/wxpython/lmgr/frame.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/frame.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/lmgr/frame.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -44,7 +44,7 @@
from core.gcmd import RunCommand, GError, GMessage, GException
from core.settings import UserSettings, GetDisplayVectSettings
-from core.utils import SetAddOnPath, GetLayerNameFromCmd, command2ltype
+from core.utils import SetAddOnPath, GetLayerNameFromCmd, command2ltype, _
from gui_core.preferences import MapsetAccess, PreferencesDialog
from lmgr.layertree import LayerTree, LMIcons
from lmgr.menudata import LayerManagerMenuData, LayerManagerModuleTree
Modified: grass/trunk/gui/wxpython/lmgr/layertree.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/layertree.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/lmgr/layertree.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -37,7 +37,7 @@
from mapdisp.frame import MapFrame
from core.render import Map
from wxplot.histogram import HistogramPlotFrame
-from core.utils import GetLayerNameFromCmd, ltype2command
+from core.utils import GetLayerNameFromCmd, ltype2command, _
from wxplot.profile import ProfileFrame
from core.debug import Debug
from core.settings import UserSettings, GetDisplayVectSettings
Modified: grass/trunk/gui/wxpython/lmgr/menudata.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/menudata.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/lmgr/menudata.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -21,6 +21,7 @@
from core.toolboxes import getMenudataFile
from core.globalvar import ETCWXDIR
from core.gcmd import GError
+from core.utils import _
class LayerManagerMenuData(MenuTreeModelBuilder):
Modified: grass/trunk/gui/wxpython/lmgr/pyshell.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/pyshell.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/lmgr/pyshell.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -24,6 +24,7 @@
from wx.py.version import VERSION
import grass.script as grass
+from core.utils import _
class PyShellWindow(wx.Panel):
"""!Python Shell Window"""
Modified: grass/trunk/gui/wxpython/lmgr/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/lmgr/toolbars.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/lmgr/toolbars.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -25,6 +25,7 @@
from core.gcmd import RunCommand
from gui_core.toolbars import BaseToolbar, BaseIcons
from icons.icon import MetaIcon
+from core.utils import _
class LMWorkspaceToolbar(BaseToolbar):
"""!Layer Manager `workspace` toolbar
Modified: grass/trunk/gui/wxpython/location_wizard/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/location_wizard/dialogs.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/location_wizard/dialogs.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -30,6 +30,7 @@
from core import globalvar
from core.gcmd import RunCommand
+from core.utils import _
from location_wizard.base import BaseClass
from grass.script import core as grass
@@ -620,10 +621,8 @@
def testRegionDef():
import sys
- import gettext
import wx.lib.inspection
import grass.script as grass
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
app = wx.PySimpleApp()
Modified: grass/trunk/gui/wxpython/location_wizard/wizard.py
===================================================================
--- grass/trunk/gui/wxpython/location_wizard/wizard.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/location_wizard/wizard.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -41,6 +41,7 @@
from core import globalvar
from core import utils
+from core.utils import _
from core.gcmd import RunCommand, GError, GMessage, GWarning
from gui_core.widgets import GenericValidator
from location_wizard.base import BaseClass
Modified: grass/trunk/gui/wxpython/mapdisp/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/frame.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/mapdisp/frame.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -43,7 +43,7 @@
from mapdisp.gprint import PrintOptions
from core.gcmd import GError, GMessage
from dbmgr.dialogs import DisplayAttributesDialog
-from core.utils import ListOfCatsToRange, GetLayerNameFromCmd
+from core.utils import ListOfCatsToRange, GetLayerNameFromCmd, _
from gui_core.dialogs import GetImageHandlers, ImageSizeDialog, DecorationDialog, TextLayerDialog, \
DECOR_DIALOG_LEGEND, DECOR_DIALOG_BARSCALE
from core.debug import Debug
Modified: grass/trunk/gui/wxpython/mapdisp/gprint.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/gprint.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/mapdisp/gprint.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -19,6 +19,7 @@
import wx
from core.gcmd import GMessage
+from core.utils import _
class MapPrint(wx.Printout):
def __init__(self, canvas):
Modified: grass/trunk/gui/wxpython/mapdisp/main.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/main.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/mapdisp/main.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -41,6 +41,7 @@
from core.giface import StandaloneGrassInterface
from core.gcmd import RunCommand
from core.render import Map, MapLayer
+from core.utils import _
from mapdisp.frame import MapFrame
from grass.script import core as grass
from core.debug import Debug
@@ -373,8 +374,6 @@
except ValueError:
pass
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
grass.verbose(_("Starting map display <%s>...") % (monName))
Modified: grass/trunk/gui/wxpython/mapdisp/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/mapdisp/mapwindow.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -37,7 +37,7 @@
from core.debug import Debug
from core.settings import UserSettings
from gui_core.mapwindow import MapWindow
-from core.utils import GetGEventAttribsForHandler
+from core.utils import GetGEventAttribsForHandler, _
try:
import grass.lib.gis as gislib
Modified: grass/trunk/gui/wxpython/mapdisp/statusbar.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/statusbar.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/mapdisp/statusbar.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -39,6 +39,7 @@
from core import utils
from core.gcmd import GMessage, RunCommand
from core.settings import UserSettings
+from core.utils import _
from grass.script import core as grass
Modified: grass/trunk/gui/wxpython/mapdisp/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/mapdisp/toolbars.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/mapdisp/toolbars.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -22,6 +22,7 @@
from nviz.main import haveNviz
from vdigit.main import haveVDigit
from icons.icon import MetaIcon
+from core.utils import _
MapIcons = {
'query' : MetaIcon(img = 'info',
Modified: grass/trunk/gui/wxpython/mapswipe/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/dialogs.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/mapswipe/dialogs.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -17,6 +17,7 @@
import wx
from core import globalvar
+from core.utils import _
from gui_core.dialogs import SimpleDialog
from gui_core import gselect
from gui_core.widgets import SimpleValidator
Modified: grass/trunk/gui/wxpython/mapswipe/frame.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/frame.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/mapswipe/frame.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -27,6 +27,7 @@
from mapdisp import statusbar as sb
from core.debug import Debug
from core.gcmd import GError, GMessage
+from core.utils import _
from mapswipe.toolbars import SwipeMapToolbar, SwipeMainToolbar, SwipeMiscToolbar
from mapswipe.mapwindow import SwipeBufferedWindow
Modified: grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/mapswipe/g.gui.mapswipe.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -49,7 +49,6 @@
import sys
import wx
-import gettext
import grass.script as grass
@@ -61,12 +60,11 @@
from core.settings import UserSettings
from core.globalvar import CheckWxVersion
from core.giface import StandaloneGrassInterface
+from core.utils import _
from mapswipe.frame import SwipeMapFrame
def main():
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
-
driver = UserSettings.Get(group = 'display', key = 'driver', subkey = 'type')
if driver == 'png':
os.environ['GRASS_RENDER_IMMEDIATE'] = 'png'
Modified: grass/trunk/gui/wxpython/mapswipe/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/mapwindow.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/mapswipe/mapwindow.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -20,6 +20,7 @@
import wx
from core.debug import Debug
+from core.utils import _
from mapdisp.mapwindow import BufferedWindow
Modified: grass/trunk/gui/wxpython/mapswipe/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/mapswipe/toolbars.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/mapswipe/toolbars.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -20,7 +20,9 @@
from gui_core.toolbars import BaseToolbar, BaseIcons
from icons.icon import MetaIcon
+from core.utils import _
+
swipeIcons = {
'tools': MetaIcon(img = 'tools', label = _("Tools")),
'quit' : BaseIcons['quit'].SetLabel(_("Quit Map Swipe")),
Modified: grass/trunk/gui/wxpython/modules/colorrules.py
===================================================================
--- grass/trunk/gui/wxpython/modules/colorrules.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/modules/colorrules.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -36,6 +36,7 @@
from core import globalvar
from core import utils
+from core.utils import _
from core.gcmd import GMessage, RunCommand, GError
from gui_core.gselect import Select, LayerSelect, ColumnSelect, VectorDBInfo
from core.render import Map
Modified: grass/trunk/gui/wxpython/modules/extensions.py
===================================================================
--- grass/trunk/gui/wxpython/modules/extensions.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/modules/extensions.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -27,7 +27,7 @@
from core import globalvar
from core.gcmd import GError, RunCommand, GException
-from core.utils import SetAddOnPath
+from core.utils import SetAddOnPath, _
from core.menutree import TreeModel, ModuleNode
from gui_core.widgets import GListCtrl, SearchModuleWidget
from gui_core.treeview import CTreeView
Modified: grass/trunk/gui/wxpython/modules/histogram.py
===================================================================
--- grass/trunk/gui/wxpython/modules/histogram.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/modules/histogram.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -25,7 +25,7 @@
from core.render import Map
from gui_core.forms import GUI
from mapdisp.gprint import PrintOptions
-from core.utils import GetLayerNameFromCmd
+from core.utils import GetLayerNameFromCmd, _
from gui_core.dialogs import GetImageHandlers, ImageSizeDialog
from gui_core.preferences import DefaultFontDialog
from core.debug import Debug
Modified: grass/trunk/gui/wxpython/modules/mcalc_builder.py
===================================================================
--- grass/trunk/gui/wxpython/modules/mcalc_builder.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/modules/mcalc_builder.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -31,6 +31,7 @@
from core import globalvar
from core.gcmd import GError, RunCommand
from core.giface import StandaloneGrassInterface
+from core.utils import _
from gui_core.gselect import Select
from gui_core.forms import GUI
from core.settings import UserSettings
@@ -595,8 +596,6 @@
self.Destroy()
if __name__ == "__main__":
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
app = wx.App(0)
frame = MapCalcFrame(parent = None, cmd = 'r.mapcalc', giface = StandaloneGrassInterface())
Modified: grass/trunk/gui/wxpython/modules/vclean.py
===================================================================
--- grass/trunk/gui/wxpython/modules/vclean.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/modules/vclean.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -27,6 +27,7 @@
from core.gcmd import RunCommand, GError
from core import globalvar
+from core.utils import _
from gui_core.gselect import Select
from core.settings import UserSettings
from grass.script import core as grass
Modified: grass/trunk/gui/wxpython/nviz/animation.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/animation.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/nviz/animation.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -20,6 +20,7 @@
import wx
from grass.pydispatch.signal import Signal
+from core.utils import _
class Animation:
"""!Class represents animation as a sequence of states (views).
Modified: grass/trunk/gui/wxpython/nviz/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/mapwindow.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/nviz/mapwindow.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -42,7 +42,7 @@
from nviz.animation import Animation
from nviz import wxnviz
from core.globalvar import CheckWxVersion
-from core.utils import str2rgb
+from core.utils import str2rgb, _
wxUpdateProperties, EVT_UPDATE_PROP = NewEvent()
wxUpdateView, EVT_UPDATE_VIEW = NewEvent()
Modified: grass/trunk/gui/wxpython/nviz/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/preferences.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/nviz/preferences.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -24,6 +24,7 @@
from core import globalvar
from core.settings import UserSettings
+from core.utils import _
from gui_core.preferences import PreferencesBaseDialog
class NvizPreferencesDialog(PreferencesBaseDialog):
Modified: grass/trunk/gui/wxpython/nviz/tools.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/tools.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/nviz/tools.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -46,6 +46,7 @@
import grass.script as grass
from core import globalvar
+from core.utils import _
from gui_core.gselect import VectorDBInfo
from core.gcmd import GMessage, RunCommand
from modules.colorrules import ThematicVectorTable
Modified: grass/trunk/gui/wxpython/nviz/workspace.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/workspace.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/nviz/workspace.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -17,6 +17,7 @@
import copy
from core.settings import UserSettings
+from core.utils import _
try:
from nviz import wxnviz
Modified: grass/trunk/gui/wxpython/nviz/wxnviz.py
===================================================================
--- grass/trunk/gui/wxpython/nviz/wxnviz.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/nviz/wxnviz.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -48,6 +48,7 @@
from grass.lib.raster import *
from core.debug import Debug
+from core.utils import _
import grass.script as grass
log = None
Modified: grass/trunk/gui/wxpython/psmap/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/dialogs.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/psmap/dialogs.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -52,6 +52,7 @@
import grass.script as grass
from core import globalvar
+from core.utils import _
from dbmgr.vinfo import VectorDBInfo
from gui_core.gselect import Select
from core.gcmd import RunCommand, GError, GMessage
Modified: grass/trunk/gui/wxpython/psmap/frame.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/frame.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/psmap/frame.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -35,6 +35,7 @@
from psmap.toolbars import PsMapToolbar
from core.gcmd import RunCommand, GError, GMessage
from core.settings import UserSettings
+from core.utils import _
from gui_core.forms import GUI
from gui_core.dialogs import HyperlinkDialog
from gui_core.ghelp import ShowAboutDialog
Modified: grass/trunk/gui/wxpython/psmap/g.gui.psmap.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/g.gui.psmap.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/psmap/g.gui.psmap.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -34,7 +34,6 @@
import os
import sys
-import gettext
import wx
@@ -45,6 +44,7 @@
sys.path.append(wxbase)
from core.globalvar import CheckWxVersion
+from core.utils import _
from psmap.frame import PsMapFrame
from psmap.instructions import Instruction
Modified: grass/trunk/gui/wxpython/psmap/instructions.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/instructions.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/psmap/instructions.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -41,7 +41,7 @@
import grass.script as grass
from core.gcmd import RunCommand, GError, GMessage, GWarning
-from core.utils import CmdToTuple, GetCmdString
+from core.utils import CmdToTuple, GetCmdString, _
from dbmgr.vinfo import VectorDBInfo
from psmap.utils import *
Modified: grass/trunk/gui/wxpython/psmap/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/toolbars.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/psmap/toolbars.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -20,6 +20,7 @@
import wx
from core import globalvar
+from core.utils import _
from gui_core.toolbars import BaseToolbar, BaseIcons
from icons.icon import MetaIcon
from core.globalvar import ETCIMGDIR
Modified: grass/trunk/gui/wxpython/psmap/utils.py
===================================================================
--- grass/trunk/gui/wxpython/psmap/utils.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/psmap/utils.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -28,6 +28,7 @@
import grass.script as grass
from core.gcmd import RunCommand
+from core.utils import _
class Rect2D(wx.Rect2D):
"""!Class representing rectangle with floating point values.
Modified: grass/trunk/gui/wxpython/rlisetup/frame.py
===================================================================
--- grass/trunk/gui/wxpython/rlisetup/frame.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/rlisetup/frame.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -9,6 +9,7 @@
import os
from core import globalvar, gcmd
+from core.utils import _
from grass.script import core as grass
from rlisetup.functions import retRLiPath
from rlisetup.wizard import RLIWizard
Modified: grass/trunk/gui/wxpython/rlisetup/g.gui.rlisetup.py
===================================================================
--- grass/trunk/gui/wxpython/rlisetup/g.gui.rlisetup.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/rlisetup/g.gui.rlisetup.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -28,7 +28,6 @@
import os
import sys
-import gettext
import wx
import grass.script as grass
@@ -39,12 +38,11 @@
from core.giface import StandaloneGrassInterface
from core.globalvar import CheckWxVersion
+from core.utils import _
from rlisetup.frame import RLiSetupFrame
def main():
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'),
- unicode = True)
app = wx.PySimpleApp()
if not CheckWxVersion([2, 9]):
wx.InitAllImageHandlers()
Modified: grass/trunk/gui/wxpython/rlisetup/wizard.py
===================================================================
--- grass/trunk/gui/wxpython/rlisetup/wizard.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/rlisetup/wizard.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -33,6 +33,7 @@
from gui_core import gselect
from core import gcmd
+from core.utils import _
from location_wizard.wizard import TitledPage as TitledPage
from rlisetup.functions import checkValue, retRLiPath
from grass.script import core as grass
Modified: grass/trunk/gui/wxpython/scripts/vkrige.py
===================================================================
--- grass/trunk/gui/wxpython/scripts/vkrige.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/scripts/vkrige.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -21,9 +21,7 @@
from tempfile import gettempdir
import time
import thread
-## i18N
-import gettext
-gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
+from core.utils import _
### dependencies to be checked once, as they are quite time-consuming. cfr. grass.parser.
# GRASS binding
Modified: grass/trunk/gui/wxpython/vdigit/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/dialogs.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vdigit/dialogs.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -27,7 +27,9 @@
from core.gcmd import RunCommand, GError
from core.debug import Debug
from core.settings import UserSettings
+from core.utils import _
+
class VDigitCategoryDialog(wx.Dialog, listmix.ColumnSorterMixin):
def __init__(self, parent, title,
vectorName, query = None, cats = None,
Modified: grass/trunk/gui/wxpython/vdigit/g.gui.vdigit.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/g.gui.vdigit.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vdigit/g.gui.vdigit.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -32,7 +32,6 @@
import os
import sys
-import gettext
import grass.script as grass
@@ -44,6 +43,7 @@
sys.path.append(gui_wx_path)
from core.globalvar import CheckWxVersion
+from core.utils import _
from mapdisp.frame import MapFrame
from core.giface import StandaloneGrassInterface
from core.settings import UserSettings
@@ -90,7 +90,6 @@
app.MainLoop()
if __name__ == "__main__":
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
grass.set_raise_on_error(False)
options, flags = grass.parser()
Modified: grass/trunk/gui/wxpython/vdigit/mapwindow.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/mapwindow.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vdigit/mapwindow.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -22,7 +22,7 @@
from core.debug import Debug
from mapdisp.mapwindow import BufferedWindow
from core.settings import UserSettings
-from core.utils import ListOfCatsToRange
+from core.utils import ListOfCatsToRange, _
from core.globalvar import QUERYLAYER
from vdigit.dialogs import VDigitCategoryDialog, VDigitZBulkDialog, VDigitDuplicatesDialog
from gui_core import gselect
Modified: grass/trunk/gui/wxpython/vdigit/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/preferences.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vdigit/preferences.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -24,7 +24,9 @@
from gui_core.gselect import ColumnSelect
from core.units import Units
from core.settings import UserSettings
+from core.utils import _
+
class VDigitSettingsDialog(wx.Dialog):
def __init__(self, parent, giface, title = _("Digitization settings"),
style = wx.DEFAULT_DIALOG_STYLE):
Modified: grass/trunk/gui/wxpython/vdigit/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/toolbars.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vdigit/toolbars.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -24,6 +24,7 @@
from core.debug import Debug
from core.settings import UserSettings
from core.gcmd import GError, RunCommand
+from core.utils import _
from icons.icon import MetaIcon
from iclass.digit import IClassVDigit
Modified: grass/trunk/gui/wxpython/vdigit/wxdigit.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/wxdigit.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vdigit/wxdigit.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -30,6 +30,7 @@
from core.gcmd import GError
from core.debug import Debug
from core.settings import UserSettings
+from core.utils import _
from vdigit.wxdisplay import DisplayDriver, GetLastError
try:
Modified: grass/trunk/gui/wxpython/vdigit/wxdisplay.py
===================================================================
--- grass/trunk/gui/wxpython/vdigit/wxdisplay.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vdigit/wxdisplay.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -23,6 +23,7 @@
from core.debug import Debug
from core.settings import UserSettings
+from core.utils import _
try:
from grass.lib.gis import *
Modified: grass/trunk/gui/wxpython/vnet/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/vnet/dialogs.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vnet/dialogs.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -41,6 +41,7 @@
from core import globalvar, utils
from core.gcmd import RunCommand, GMessage
from core.settings import UserSettings
+from core.utils import _
from dbmgr.base import DbMgrBase
from dbmgr.vinfo import VectorDBInfo
Modified: grass/trunk/gui/wxpython/vnet/toolbars.py
===================================================================
--- grass/trunk/gui/wxpython/vnet/toolbars.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vnet/toolbars.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -22,6 +22,8 @@
from icon import MetaIcon
from gui_core.toolbars import BaseToolbar, BaseIcons
from core.gcmd import RunCommand
+from core.utils import _
+
class PointListToolbar(BaseToolbar):
"""!Toolbar for managing list of points
Modified: grass/trunk/gui/wxpython/vnet/vnet_core.py
===================================================================
--- grass/trunk/gui/wxpython/vnet/vnet_core.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vnet/vnet_core.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -27,6 +27,7 @@
from core import utils
from core.gcmd import RunCommand, GMessage
from core.gconsole import CmdThread, EVT_CMD_DONE, GConsole
+from core.utils import _
from gui_core.gselect import VectorDBInfo
Modified: grass/trunk/gui/wxpython/vnet/vnet_data.py
===================================================================
--- grass/trunk/gui/wxpython/vnet/vnet_data.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vnet/vnet_data.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -34,6 +34,7 @@
from core import utils
from core.gcmd import RunCommand, GMessage
from core.settings import UserSettings
+from core.utils import _
from vnet.vnet_utils import ParseMapStr, SnapToNode
Modified: grass/trunk/gui/wxpython/vnet/vnet_utils.py
===================================================================
--- grass/trunk/gui/wxpython/vnet/vnet_utils.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vnet/vnet_utils.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -20,6 +20,7 @@
import math
from grass.script import core as grass
+from core.utils import _
try:
import grass.lib.vector as vectlib
Modified: grass/trunk/gui/wxpython/vnet/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/vnet/widgets.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/vnet/widgets.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -26,6 +26,7 @@
from wx.lib.mixins.listctrl import CheckListCtrlMixin, ColumnSorterMixin, ListCtrlAutoWidthMixin, TextEditMixin
from core import globalvar
+from core.utils import _
class PointsList(wx.ListCtrl,
Modified: grass/trunk/gui/wxpython/web_services/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/web_services/dialogs.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/web_services/dialogs.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -31,7 +31,7 @@
from core import globalvar
from core.debug import Debug
from core.gcmd import GMessage, GWarning, GError, RunCommand
-from core.utils import GetSettingsPath, CmdToTuple, CmdTupleToList
+from core.utils import GetSettingsPath, CmdToTuple, CmdTupleToList, _
from core.gconsole import CmdThread, GStderr, EVT_CMD_DONE, EVT_CMD_OUTPUT
from gui_core.gselect import Select
Modified: grass/trunk/gui/wxpython/web_services/widgets.py
===================================================================
--- grass/trunk/gui/wxpython/web_services/widgets.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/web_services/widgets.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -37,6 +37,7 @@
from core.debug import Debug
from core.gcmd import GWarning, GMessage
from core.gconsole import CmdThread, GStderr, EVT_CMD_DONE, EVT_CMD_OUTPUT
+from core.utils import _
from web_services.cap_interface import WMSCapabilities, WMTSCapabilities, OnEarthCapabilities
Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/wxgui.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -28,6 +28,8 @@
sys.path.append(gui_wx_path)
from core import globalvar
+from core.utils import _
+
import wx
try:
import wx.lib.agw.advancedsplash as SC
@@ -114,8 +116,6 @@
return (workspaceFile,)
def main(argv = None):
- import gettext
- gettext.install('grasswxpy', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
if argv is None:
argv = sys.argv
Modified: grass/trunk/gui/wxpython/wxplot/base.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/base.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/wxplot/base.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -27,6 +27,7 @@
from core.render import Map
from icons.icon import MetaIcon
from gui_core.toolbars import BaseIcons
+from core.utils import _
import grass.script as grass
Modified: grass/trunk/gui/wxpython/wxplot/dialogs.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/dialogs.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/wxplot/dialogs.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -25,6 +25,7 @@
from core import globalvar
from core.settings import UserSettings
+from core.utils import _
from gui_core.gselect import Select
from grass.script import core as grass
Modified: grass/trunk/gui/wxpython/wxplot/histogram.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/histogram.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/wxplot/histogram.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -26,6 +26,7 @@
from wxplot.base import BasePlotFrame, PlotIcons
from wxplot.dialogs import HistRasterDialog, PlotStatsFrame
from core.gcmd import RunCommand, GException, GError
+from core.utils import _
class HistogramPlotFrame(BasePlotFrame):
"""!Mainframe for displaying histogram of raster map. Uses wx.lib.plot.
Modified: grass/trunk/gui/wxpython/wxplot/profile.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/profile.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/wxplot/profile.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -23,6 +23,7 @@
import wx.lib.plot as plot
import grass.script as grass
+from core.utils import _
try:
import numpy
Modified: grass/trunk/gui/wxpython/wxplot/scatter.py
===================================================================
--- grass/trunk/gui/wxpython/wxplot/scatter.py 2013-07-18 15:59:13 UTC (rev 57218)
+++ grass/trunk/gui/wxpython/wxplot/scatter.py 2013-07-18 16:34:31 UTC (rev 57219)
@@ -26,6 +26,7 @@
from gui_core.toolbars import BaseToolbar, BaseIcons
from wxplot.dialogs import ScatterRasterDialog, PlotStatsFrame
from core.gcmd import RunCommand, GException, GError, GMessage
+from core.utils import _
class ScatterFrame(BasePlotFrame):
"""!Mainframe for displaying bivariate scatter plot of two raster maps. Uses wx.lib.plot.
More information about the grass-commit
mailing list