Browse Source

wxGUI: fix https://trac.osgeo.org/grass/ticket/2634 by bringing back https://trac.osgeo.org/grass/changeset/64834 and removing unnecessary decode()

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@65529 15284696-431f-4ddb-bdfa-cd5b030d7da7
Anna Petrášová 9 years ago
parent
commit
9205811b1c
2 changed files with 3 additions and 1 deletions
  1. 2 0
      lib/python/script/core.py
  2. 1 1
      lib/python/script/task.py

+ 2 - 0
lib/python/script/core.py

@@ -34,6 +34,8 @@ from grass.exceptions import ScriptError, CalledModuleError
 # i18N
 import gettext
 gettext.install('grasslibs', os.path.join(os.getenv("GISBASE"), 'locale'))
+import __builtin__
+__builtin__.__dict__['_'] = __builtin__.__dict__['_'].im_self.lgettext
 
 # subprocess wrapper that uses shell on Windows
 

+ 1 - 1
lib/python/script/task.py

@@ -232,7 +232,7 @@ class grassTask:
                 if p.get('default', '') != '':
                     cmd += ['%s=%s' % (p['name'], p['default'])]
                 elif ignoreErrors and not suppress_required and not ignoreRequired:
-                    cmd += [('%s=%s' % (p['name'], _('<required>'))).decode('utf-8')]
+                    cmd += ['%s=%s' % (p['name'], _('<required>'))]
             elif p.get('value', '') == '' and p.get('default', '') != '' and not ignoreDefault:
                 cmd += ['%s=%s' % (p['name'], p['default'])]
             elif p.get('value', '') != '' and \