[GRASS-SVN] r46183 - grass/trunk/gui/wxpython/gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Wed May 4 12:32:58 EDT 2011


Author: martinl
Date: 2011-05-04 09:32:58 -0700 (Wed, 04 May 2011)
New Revision: 46183

Modified:
   grass/trunk/gui/wxpython/gui_modules/ghelp.py
   grass/trunk/gui/wxpython/gui_modules/menuform.py
   grass/trunk/gui/wxpython/gui_modules/render.py
   grass/trunk/gui/wxpython/gui_modules/wxvdigit.py
Log:
wxGUI: avoid gettext warning


Modified: grass/trunk/gui/wxpython/gui_modules/ghelp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/ghelp.py	2011-05-04 16:05:36 UTC (rev 46182)
+++ grass/trunk/gui/wxpython/gui_modules/ghelp.py	2011-05-04 16:32:58 UTC (rev 46183)
@@ -680,8 +680,9 @@
             
             if errLines:
                 gcmd.GError(parent = self,
-                            message = _("Error when reading file '%s'.\n\nLines: %s") % \
-                                (translatorsfile, os.linesep.join(map (utils.UnicodeString, errLines))))
+                            message = _("Error when reading file '%s'.") % translatorsfile + \
+                                "\n\n" + _("Lines:") + " %s" % \
+                                os.linesep.join(map(utils.UnicodeString, errLines)))
         else:
             contribs = None
         
@@ -735,8 +736,9 @@
             
             if errLines:
                 gcmd.GError(parent = self,
-                            message = _("Error when reading file '%s'.\n\nLines: %s") % \
-                                (translatorsfile, os.linesep.join(map (utils.UnicodeString, errLines))))
+                            message = _("Error when reading file '%s'.") % translatorsfile + \
+                                "\n\n" + _("Lines:") + " %s" % \
+                                os.linesep.join(map(utils.UnicodeString, errLines)))
         else:
             translators = None
         

Modified: grass/trunk/gui/wxpython/gui_modules/menuform.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/menuform.py	2011-05-04 16:05:36 UTC (rev 46182)
+++ grass/trunk/gui/wxpython/gui_modules/menuform.py	2011-05-04 16:32:58 UTC (rev 46183)
@@ -2163,11 +2163,11 @@
         cmdout, cmderr = grass.Popen([cmd, '--interface-description'], stdout = grass.PIPE,
                                      stderr = grass.PIPE).communicate()
     except OSError, e:
-        raise gcmd.GException, _("Unable to fetch interface description for command '%s'. "
-                                 "Details: %s") % (cmd, e)
+        raise gcmd.GException, _("Unable to fetch interface description for command '%s'.") % cmd + \
+            _("Details:") +  "%s" % e
     if cmderr and cmderr[:7] != 'WARNING':
-        raise gcmd.GException, _("Unable to fetch interface description for command '%s'. "
-                                 "Details: %s") % (cmd, cmderr)
+        raise gcmd.GException, _("Unable to fetch interface description for command '%s'.") % cmd + \
+            _("Details:") + " %s" % cmderr
     
     return cmdout.replace('grass-interface.dtd', os.path.join(globalvar.ETCDIR, 'grass-interface.dtd'))
     

Modified: grass/trunk/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/render.py	2011-05-04 16:05:36 UTC (rev 46182)
+++ grass/trunk/gui/wxpython/gui_modules/render.py	2011-05-04 16:32:58 UTC (rev 46183)
@@ -623,9 +623,11 @@
         
         if ret != 0:
             if rast:
-                message = _("Unable to zoom to raster map <%s>.\n\nDetails: %s") % (rast[0], msg)
+                message = _("Unable to zoom to raster map <%s>.") % rast[0] + \
+                    "\n\n" + _("Details:") + " %s" % msg
             elif vect:
-                message = _("Unable to zoom to vector map <%s>.\n\nDetails: %s") % (vect[0], msg)
+                message = _("Unable to zoom to vector map <%s>.") % vect[0] + \
+                    "\n\n" + _("Details:") + " %s" % msg
             else:
                 message = _("Unable to get current geographic extent. "
                             "Force quiting wxGUI. Please run manually g.region to "

Modified: grass/trunk/gui/wxpython/gui_modules/wxvdigit.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxvdigit.py	2011-05-04 16:05:36 UTC (rev 46182)
+++ grass/trunk/gui/wxpython/gui_modules/wxvdigit.py	2011-05-04 16:32:58 UTC (rev 46183)
@@ -83,8 +83,8 @@
     def Database(self, driver, database):
         """!Opening database failed
         """
-        GError(message = _('Unable to open database <%s> by driver <%s>. '
-                           'Operation cancelled.') % (database, driver),
+        GError(message = _('Unable to open database <%(db)s> by driver <%(driver)s>. '
+                           'Operation cancelled.') % { 'db' : database, 'driver' : driver},
                parent  = self.parent,
                caption = self.caption)
 



More information about the grass-commit mailing list