Просмотр исходного кода

Fix gettext usage in Python scripting library

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@47310 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 13 лет назад
Родитель
Сommit
341152e4e2
5 измененных файлов с 1 добавлено и 17 удалено
  1. 0 4
      lib/python/array.py
  2. 1 1
      lib/python/core.py
  3. 0 4
      lib/python/db.py
  4. 0 4
      lib/python/raster.py
  5. 0 4
      lib/python/vector.py

+ 0 - 4
lib/python/array.py

@@ -24,10 +24,6 @@ import numpy
 
 
 import core as grass
 import core as grass
 
 
-# i18N
-import gettext
-gettext.install('grasslibs', os.path.join(os.getenv("GISBASE"), 'locale'), unicode = True)
-
 class array(numpy.memmap):
 class array(numpy.memmap):
     def __new__(cls, dtype = numpy.double):
     def __new__(cls, dtype = numpy.double):
         """!Define new numpy array
         """!Define new numpy array

+ 1 - 1
lib/python/core.py

@@ -35,7 +35,7 @@ import codecs
 
 
 # i18N
 # i18N
 import gettext
 import gettext
-gettext.install('grasslibs', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
+gettext.install('grasslibs', os.path.join(os.getenv("GISBASE"), 'locale'))
 
 
 # subprocess wrapper that uses shell on Windows
 # subprocess wrapper that uses shell on Windows
 
 

+ 0 - 4
lib/python/db.py

@@ -26,10 +26,6 @@ import tempfile as pytempfile # conflict with core.tempfile
 
 
 from core import *
 from core import *
 
 
-# i18N
-import gettext
-gettext.install('grasslibs', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
-
 def db_describe(table, **args):
 def db_describe(table, **args):
     """!Return the list of columns for a database table
     """!Return the list of columns for a database table
     (interface to `db.describe -c'). Example:
     (interface to `db.describe -c'). Example:

+ 0 - 4
lib/python/raster.py

@@ -27,10 +27,6 @@ import string
 
 
 from core import *
 from core import *
 
 
-# i18N
-import gettext
-gettext.install('grasslibs', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
-
 # add raster history
 # add raster history
 
 
 def raster_history(map):
 def raster_history(map):

+ 0 - 4
lib/python/vector.py

@@ -28,10 +28,6 @@ import __builtin__
 
 
 from core import *
 from core import *
 
 
-# i18N
-import gettext
-gettext.install('grasslibs', os.path.join(os.getenv("GISBASE"), 'locale'), unicode=True)
-
 # run "v.db.connect -g ..." and parse output
 # run "v.db.connect -g ..." and parse output
 
 
 def vector_db(map, **args):
 def vector_db(map, **args):