[GRASS-SVN] r47372 - grass/branches/develbranch_6/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Aug 3 08:53:10 EDT 2011


Author: martinl
Date: 2011-08-03 05:53:10 -0700 (Wed, 03 Aug 2011)
New Revision: 47372

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py
Log:
wxGUI: replace UnicodeString by DecodeString
       (merge r47371 from trunk)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py	2011-08-03 12:51:06 UTC (rev 47371)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/ghelp.py	2011-08-03 12:53:10 UTC (rev 47372)
@@ -684,7 +684,7 @@
                 gcmd.GError(parent = self,
                             message = _("Error when reading file '%s'.") % translatorsfile + \
                                 "\n\n" + _("Lines:") + " %s" % \
-                                os.linesep.join(map(utils.UnicodeString, errLines)))
+                                os.linesep.join(map(utils.DecodeString, errLines)))
         else:
             contribs = None
         
@@ -740,7 +740,7 @@
                 gcmd.GError(parent = self,
                             message = _("Error when reading file '%s'.") % translatorsfile + \
                                 "\n\n" + _("Lines:") + " %s" % \
-                                os.linesep.join(map(utils.UnicodeString, errLines)))
+                                os.linesep.join(map(utils.DecodeString, errLines)))
         else:
             translators = None
         

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py	2011-08-03 12:51:06 UTC (rev 47371)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/utils.py	2011-08-03 12:53:10 UTC (rev 47372)
@@ -687,22 +687,6 @@
     
     return string
 
-def UnicodeString(string):
-    """!Return unicode string
-    
-    @param string string to be converted
-    
-    @return unicode string
-    """
-    if isinstance(string, unicode):
-        return string
-    
-    enc = locale.getdefaultlocale()[1]
-    if enc:
-        return unicode(string, enc)
-    
-    return string
-
 def _getGDALFormats():
     """!Get dictionary of avaialble GDAL drivers"""
     ret = grass.read_command('r.in.gdal',



More information about the grass-commit mailing list