Browse Source

Attempt to fix gettext behaviour (issue https://trac.osgeo.org/grass/ticket/2617)
(merge https://trac.osgeo.org/grass/changeset/64834 from trunk)


git-svn-id: https://svn.osgeo.org/grass/grass/branches/releasebranch_7_0@65462 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 10 năm trước cách đây
mục cha
commit
22ef152f45
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      lib/python/script/core.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