ソースを参照

wxGUI: avoid gettext warning

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@46183 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 年 前
コミット
13207607cd

+ 6 - 4
gui/wxpython/gui_modules/ghelp.py

@@ -680,8 +680,9 @@ class AboutWindow(wx.Frame):
             
             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 @@ class AboutWindow(wx.Frame):
             
             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
         

+ 4 - 4
gui/wxpython/gui_modules/menuform.py

@@ -2163,11 +2163,11 @@ def getInterfaceDescription(cmd):
         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'))
     

+ 4 - 2
gui/wxpython/gui_modules/render.py

@@ -623,9 +623,11 @@ class Map(object):
         
         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 "

+ 2 - 2
gui/wxpython/gui_modules/wxvdigit.py

@@ -83,8 +83,8 @@ class VDigitError:
     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)