瀏覽代碼

Attempt to fix gettext behaviour (issue https://trac.osgeo.org/grass/ticket/2617)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64834 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 10 年之前
父節點
當前提交
bbc4561649
共有 1 個文件被更改,包括 2 次插入0 次删除
  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