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

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Jul 31 16:16:16 EDT 2008


Author: martinl
Date: 2008-07-31 16:16:15 -0400 (Thu, 31 Jul 2008)
New Revision: 32426

Modified:
   grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/georect.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/vdigit.py
   grass/branches/develbranch_6/gui/wxpython/gui_modules/workspace.py
Log:
wxGUI: suppress gettext warnings (merge from trunk, r32425)


Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py	2008-07-31 20:12:38 UTC (rev 32425)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/dbm.py	2008-07-31 20:16:15 UTC (rev 32426)
@@ -229,10 +229,11 @@
                         cat = -1
                         wx.MessageBox(parent=self,
                                       message=_("Error loading attribute data. "
-                                                "Record number: %d. Unable to cast value '%s' in "
-                                                "key column (%s) to integer.\n\n"
-                                                "Details: %s") % \
-                                          (i + 1, value, keyColumn, e),
+                                                "Record number: %(rec)d. Unable to cast value '%(val)s' in "
+                                                "key column (%(key)s) to integer.\n\n"
+                                                "Details: %(detail)s") % \
+                                          { 'rec' : i + 1, 'val' : value,
+                                            'key' : keyColumn, 'detail' : e},
                                       caption=_("Error"),
                                       style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
                 j += 1

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/georect.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/georect.py	2008-07-31 20:12:38 UTC (rev 32425)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/georect.py	2008-07-31 20:16:15 UTC (rev 32426)
@@ -1120,8 +1120,8 @@
         self.bkw_rmserror = round((sumsq_bkw_err/i)**0.5,4)
         self.list.ResizeColumns()
 
-        self.SetStatusText(_('RMS error for selected points forward: %s backward: %s') % \
-                           (self.fwd_rmserror, self.bkw_rmserror))
+        self.SetStatusText(_('RMS error for selected points forward: %(fwd)s backward: %(bkw)s') % \
+                           { 'fwd' : self.fwd_rmserror, 'bkw' : self.bkw_rmserror })
         
 class GCPList(wx.ListCtrl,
               CheckListCtrlMixin,

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py	2008-07-31 20:12:38 UTC (rev 32425)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/preferences.py	2008-07-31 20:16:15 UTC (rev 32426)
@@ -451,9 +451,11 @@
                     self.Append(settings, group, key, subkey, value)
                     idx += 2
         except ValueError, e:
-            print >> sys.stderr, _("Error: Reading settings from file <%s> failed.\n"
-                                   "       Details: %s\n"
-                                   "       Line: '%s'") % (filename, e, line)
+            print >> sys.stderr, _("Error: Reading settings from file <%(file)s> failed.\n"
+                                   "       Details: %(detail)s\n"
+                                   "       Line: '%(line)s'") % { 'file' : filename,
+                                                                  'detail' : e,
+                                                                  'line' : line }
             file.close()
 
         file.close()
@@ -510,8 +512,9 @@
         except IOError, e:
             raise gcmd.SettingsError(message=e)
         except StandardError, e:
-            raise gcmd.SettingsError(message=_('Writing settings to file <%s> failed.'
-                                               '\n\nDetails: %s') % (filePath, e))
+            raise gcmd.SettingsError(message=_('Writing settings to file <%(file)s> failed.'
+                                               '\n\nDetails: %(detail)s') % { 'file' : filePath,
+                                                                              'detail' : e })
         
         file.close()
 

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/vdigit.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/vdigit.py	2008-07-31 20:12:38 UTC (rev 32425)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/vdigit.py	2008-07-31 20:16:15 UTC (rev 32426)
@@ -140,9 +140,9 @@
             ret = self.driver.Reset(self.map)
         except StandardError, e:
             raise gcmd.DigitError(parent=self.mapWindow.parent,
-                                  message=_('Unable to initialize display driver, '
-                                            'see README file for more information.%s%s'
-                                            'Details: %s (%s)') % (os.linesep, os.linesep, e, digitErr))
+                                  message="%s %s (%s)" % (_('Unable to initialize display driver, '
+                                                            'see README file for more information.\n\n'
+                                                            'Details:'), e, digitErr))
         
         if map and ret == -1:
             raise gcmd.DigitError(parent=self.mapWindow.parent,

Modified: grass/branches/develbranch_6/gui/wxpython/gui_modules/workspace.py
===================================================================
--- grass/branches/develbranch_6/gui/wxpython/gui_modules/workspace.py	2008-07-31 20:12:38 UTC (rev 32425)
+++ grass/branches/develbranch_6/gui/wxpython/gui_modules/workspace.py	2008-07-31 20:16:15 UTC (rev 32426)
@@ -340,9 +340,9 @@
         if self.num_error > 0:
             wx.MessageBox(parent=parent,
                           message=_("Some lines were skipped when reading settings "
-                                    "from file <%s>.\nSee 'Command output' window for details.\n\n"
-                                    "Number of skipped lines: %d" % \
-                                        (self.filename, self.num_error)),
+                                    "from file <%(file)s>.\nSee 'Command output' window for details.\n\n"
+                                    "Number of skipped lines: %(line)d") % \
+                                        { 'file' : self.filename, 'line' : self.num_error },
                           caption=_("Warning"), style=wx.OK | wx.ICON_EXCLAMATION)
             parent.goutput.WriteLog('Map layers loaded from GRC file <%s>' % self.filename)
             parent.goutput.WriteLog('Skipped lines:\n%s' % self.error)



More information about the grass-commit mailing list