[GRASS-SVN] r30512 - in grass/trunk/gui/wxpython: . gui_modules

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 9 18:32:27 EDT 2008


Author: martinl
Date: 2008-03-09 18:32:27 -0400 (Sun, 09 Mar 2008)
New Revision: 30512

Modified:
   grass/trunk/gui/wxpython/gui_modules/dbm.py
   grass/trunk/gui/wxpython/gui_modules/digit.py
   grass/trunk/gui/wxpython/gui_modules/location_wizard.py
   grass/trunk/gui/wxpython/gui_modules/mapdisp.py
   grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py
   grass/trunk/gui/wxpython/gui_modules/preferences.py
   grass/trunk/gui/wxpython/gui_modules/render.py
   grass/trunk/gui/wxpython/gui_modules/rules.py
   grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
   grass/trunk/gui/wxpython/wxgui.py
Log:
wxGUI: message cleaning

Modified: grass/trunk/gui/wxpython/gui_modules/dbm.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/dbm.py	2008-03-09 22:30:16 UTC (rev 30511)
+++ grass/trunk/gui/wxpython/gui_modules/dbm.py	2008-03-09 22:32:27 UTC (rev 30512)
@@ -181,7 +181,7 @@
             i += 1
 
             if i >= 256:
-                self.log.write(_("Can display only 256 columns"))
+                self.log.write(_("Can display only 256 columns."))
 
         ### self.mapDBInfo.SelectFromTable(layer, cols, where) # <- values (FIXME)
         #
@@ -235,7 +235,7 @@
 
             i += 1
             if i >= 100000:
-                print >> sys.stderr, _("Limit 100000 records")
+                self.log.write(_("Limit 100000 records."))
                 break
 
         self.SetItemCount(i)
@@ -400,7 +400,7 @@
                           message=_("Database connection for vector map <%s> "
                                     "is not defined in DB file. "
                                     "You can define new connection in "
-                                    "'Manage layers'.") % self.vectmap,
+                                    "'Manage layers' tab.") % self.vectmap,
                           caption=_("Attribute Table Manager"),
                           style=wx.OK | wx.ICON_INFORMATION | wx.CENTRE)
 
@@ -689,7 +689,7 @@
                          flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT,
                          border=3)
             # length
-            label  = wx.StaticText(parent=panel, id=wx.ID_ANY, label=_("Length"))
+            label  = wx.StaticText(parent=panel, id=wx.ID_ANY, label=_("Data length"))
             length = wx.SpinCtrl(parent=panel, id=wx.ID_ANY, size=(65, -1),
                                  initial=250,
                                  min=1, max=1e6)
@@ -706,7 +706,7 @@
                          flag=wx.ALIGN_CENTER_VERTICAL | wx.LEFT | wx.RIGHT,
                          border=3)
 
-            btnAddCol = wx.Button(parent=panel, id=wx.ID_ANY, label=_('&Add'))
+            btnAddCol = wx.Button(parent=panel, id=wx.ID_ADD)
             btnAddCol.Bind(wx.EVT_BUTTON, self.OnTableItemAdd)
             btnAddCol.Enable(False)
             self.layerPage[layer]['addColButton'] = btnAddCol.GetId()
@@ -1838,7 +1838,7 @@
         itemData = {} # requested by sorter
 
         if not update:
-            headings = [_("Column name"), _("Type"), _("Length")]
+            headings = [_("Column name"), _("Data type"), _("Data length")]
             i = 0
             for h in headings:
                 self.InsertColumn(col=i, heading=h)
@@ -1983,7 +1983,7 @@
     def __createAddPage(self):
         """Add new layer"""
         self.addPanel = wx.Panel(parent=self, id=wx.ID_ANY)
-        self.AddPage(page=self.addPanel, text=_("Add new layer"))
+        self.AddPage(page=self.addPanel, text=_("Add layer"))
 
         try:
             maxLayer = max(self.mapDBInfo.layers.keys())
@@ -2414,9 +2414,8 @@
         
         if not table or not key:
             wx.MessageBox(parent=self,
-                          message=_("Unable to create new table.%s"
-                                    "Table name or key column name is missing.") % \
-                          (os.linesep),
+                          message=_("Unable to create new table. "
+                                    "Table name or key column name is missing."),
                           caption=_("Error"), style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
             return
         
@@ -2452,7 +2451,7 @@
         
         if layer in self.mapDBInfo.layers.keys():
             wx.MessageBox(parent=self,
-                          message=_("Unable to add new layer to vector map <%(vector)s>.\n"
+                          message=_("Unable to add new layer to vector map <%(vector)s>. "
                                     "Layer %(layer)d already exists.") % 
                           {'vector' : self.mapDBInfo.map, 'layer' : layer},
                           caption=_("Error"), style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
@@ -2634,7 +2633,7 @@
 
             wx.MessageBox(parent=self.parent,
                           message=_("No attribute table linked to "
-                                    "vector map <%(vector)s> found. %(msg)s "
+                                    "vector map <%(vector)s> found. %(msg)s"
                                     "\nYou can disable this message from digitization settings. Or "
                                     "you can create and link attribute table to the vector map "
                                     "using Attribute Table Manager.") % 
@@ -3281,12 +3280,13 @@
         self.btnOK.Enable(False)
 
         self.label = wx.StaticText(parent=self.panel, id=wx.ID_ANY,
-                                   label=_("Name for new vector map layer:"))
+                                   label=_("Name for new vector map:"))
         self.mapName = wx.TextCtrl(parent=self.panel, id=wx.ID_ANY,
                                    value='', size=(250, -1),
                                    style=wx.TE_PROCESS_ENTER)
         self.mapName.Bind(wx.EVT_TEXT, self.OnMapName)
 
+        # TODO remove (see Preferences dialog)
         self.overwrite = wx.CheckBox(parent=self.panel, id=wx.ID_ANY,
                                      label=_("Allow output files to overwrite existing files"))
 
@@ -3350,8 +3350,8 @@
 
     app = wx.PySimpleApp()
     f = AttributeManager(parent=None, id=wx.ID_ANY,
-                         title=_("GRASS GIS Attribute Table Manager - vector map layer <%s>") % \
-                             argv[1],
+                         title="%s - <%s>" % (_("GRASS GIS Attribute Table Manager"),
+                                              argv[1]),
                          size=(900,600), vectmap=argv[1])
     f.Show()
 

Modified: grass/trunk/gui/wxpython/gui_modules/digit.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/digit.py	2008-03-09 22:30:16 UTC (rev 30511)
+++ grass/trunk/gui/wxpython/gui_modules/digit.py	2008-03-09 22:32:27 UTC (rev 30512)
@@ -1352,9 +1352,9 @@
         btnApply.SetToolTipString(_("Apply changes for this session"))
         btnApply.SetDefault()
         btnSave.Bind(wx.EVT_BUTTON, self.OnSave)
-        btnSave.SetToolTipString(_("Close window and save changes to user settings file"))
+        btnSave.SetToolTipString(_("Close dialog and save changes to user settings file"))
         btnCancel.Bind(wx.EVT_BUTTON, self.OnCancel)
-        btnCancel.SetToolTipString(_("Close window and ignore changes"))
+        btnCancel.SetToolTipString(_("Close dialog and ignore changes"))
         
         # sizers
         btnSizer = wx.StdDialogButtonSizer()

Modified: grass/trunk/gui/wxpython/gui_modules/location_wizard.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/location_wizard.py	2008-03-09 22:30:16 UTC (rev 30511)
+++ grass/trunk/gui/wxpython/gui_modules/location_wizard.py	2008-03-09 22:32:27 UTC (rev 30512)
@@ -244,7 +244,7 @@
                                      label=_("Select coordinate system"),
                                      style = wx.RB_GROUP)
         self.radio2 = wx.RadioButton(parent=self, id=wx.ID_ANY,
-                                     label=_("Select EPSG code for coordinate system"))
+                                     label=_("Select EPSG code of coordinate system"))
         self.radio3 = wx.RadioButton(parent=self, id=wx.ID_ANY,
                                      label=_("Use coordinate system of selected "
                                              "georeferenced file"))
@@ -252,7 +252,7 @@
                                      label=_("Create custom PROJ.4 parameters "
                                              "string for coordinate system"))
         self.radio5 = wx.RadioButton(parent=self, id=wx.ID_ANY,
-                                     label=_("Create arbitrary non-earth "
+                                     label=_("Use arbitrary non-earth "
                                              "coordinate system (XY)"))
         # layout
         self.sizer.AddGrowableCol(1)
@@ -343,7 +343,7 @@
                        flag=wx.ALIGN_RIGHT | wx.EXPAND | wx.ALL,
                        border=5, pos=(1, 2))
 
-        self.sizer.Add(item=self.MakeLabel(_("Search in projection description:")),
+        self.sizer.Add(item=self.MakeLabel(_("Search in description:")),
                        flag=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL | wx.ALL,
                        border=5, pos=(2, 1))
         self.sizer.Add(item=self.searchb,
@@ -524,7 +524,7 @@
             
         except StandardError, e:
             wx.MessageBox(parent=self,
-                          message=_("Unable to read list: %s ") % e,
+                          message=_("Unable to read list: %s") % e,
                           caption=_("Error"), style=wx.OK | wx.ICON_ERROR)
 
     def OnColumnClick(self, event):
@@ -1113,7 +1113,7 @@
     def OnBrowse(self, event):
         """Choose file"""
         dlg = wx.FileDialog(self,
-                            _("Choose a georeferenced file"),
+                            _("Select georeferenced file"),
                             os.getcwd(), "", "*.*", wx.OPEN)
         if dlg.ShowModal() == wx.ID_OK:
             path = dlg.GetPath()
@@ -1144,7 +1144,7 @@
                                     style=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL)
         self.lcode= self.MakeLabel(_("EPSG code:"),
                                     style=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL)
-        self.lsearch = self.MakeLabel(_("Search in code description:"),
+        self.lsearch = self.MakeLabel(_("Search in description:"),
                                        style=wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL)
 
         # text input
@@ -1316,7 +1316,7 @@
             self.epsglist.Populate(data, update=True)
         except StandardError, e:
             wx.MessageBox(parent=self,
-                          message=_("Unable to read EPGS codes: %s ") % e,
+                          message=_("Unable to read EPGS codes: %s") % e,
                           caption=_("Error"),  style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
 
 class CustomPage(TitledPage):
@@ -1435,13 +1435,13 @@
         self.sizer.Add(item=(10,20),
                        flag=wx.ALIGN_CENTER_HORIZONTAL | wx.ALL,
                        border=5, pos=(5, 0), span=(1, 2))
-        self.sizer.AddGrowableRow(6)
-        self.sizer.Add(item=self.MakeLabel(_("You can set the default extents "
-                                             "and resolution after creating new location%s"
-                                             "or you can set them during a working session.") % os.linesep,
-                                           style=wx.ALIGN_CENTER),
-                       flag=wx.ALIGN_CENTRE | wx.ALL, border=5, pos=(6, 0),
-                       span=(1, 2))
+        # self.sizer.AddGrowableRow(6)
+        #self.sizer.Add(item=self.MakeLabel(_("You can set the default extents "
+        #                                     "and resolution after creating new location%s"
+        #                                     "or you can set them during a working session.") % os.linesep,
+        #                                   style=wx.ALIGN_CENTER),
+        #               flag=wx.ALIGN_CENTRE | wx.ALL, border=5, pos=(6, 0),
+        #               span=(1, 2))
 
     def OnEnterPage(self,event):
         """
@@ -1459,7 +1459,7 @@
             self.lproj4string.SetLabel('')
         else:
             self.lproj4string.Show()
-            self.lproj4stringLabel.SetLabel(_("Proj4 definition:"))
+            self.lproj4stringLabel.SetLabel(_("PROJ.4 definition:"))
             if coordsys == 'proj':
                 self.lproj4string.SetLabel(self.parent.CreateProj4String())
             else:
@@ -1501,7 +1501,7 @@
 
     def OnFinish(self, event):
         dlg = wx.MessageDialog(parent=self.wizard,
-                               message=_("Do you want to create new location '%s'?") % location,
+                               message=_("Do you want to create GRASS location <%s>?") % location,
                                caption=_("Create new location?"),
                                style=wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION)
 
@@ -1613,7 +1613,7 @@
                 dlg = wx.MessageDialog(parent=self.parent,
                                        message=_("Do you want to set the default "
                                                  "region extents and resolution now?"),
-                                       caption=_("New location '%s' created") % self.location,
+                                       caption=_("Location <%s> created") % self.location,
                                        style=wx.YES_NO | wx.YES_DEFAULT | wx.ICON_QUESTION)
                 dlg.CenterOnScreen()
                 if dlg.ShowModal() == wx.ID_YES:
@@ -1626,7 +1626,7 @@
 
             elif success == False:
                 dlg = wx.MessageDialog(parent=self.wizard,
-                                       message=_("Unable to create new location."),
+                                       message="%s." % _("Unable to create new location"),
                                        caption=_("Error"),
                                        style=wx.OK | wx.ICON_ERROR | wx.CENTRE)
                 if dlg.ShowModal() == wx.ID_OK:
@@ -1635,10 +1635,9 @@
                 pass
         else:
             win = wx.MessageBox(parent=self.parent,
-                          message=_("Location wizard canceled.%s"
-                                    "New location not created.") % \
-                              os.linesep,
-                          caption=_("Location wizard"))
+                                message=_("Location wizard canceled. "
+                                          "Location not created."),
+                                caption=_("Location wizard"))
 
     def __readData(self):
         """Get georeferencing information from tables in $GISBASE/etc"""
@@ -1725,9 +1724,11 @@
         # location already exists?
         if os.path.isdir(os.path.join(database,location)):
             dlg = wx.MessageDialog(parent=self.wizard,
-                                   message=_("Unable to create new location: %s already exists")
-                                             % os.path.join(database, location),
-                                   caption=_("ERROR"),
+                                   message="%s <%s>: %s" % \
+                                       (_("Unable to create new location"),
+                                        os.path.join(database, location),
+                                        _("Location already exists in GRASS Database.")),
+                                   caption=_("Error"),
                                    style=wx.OK | wx.ICON_ERROR)
             dlg.ShowModal()
             dlg.Destroy()
@@ -1800,7 +1801,7 @@
 
         except OSError, e:
             dlg = wx.MessageDialog(parent=self.wizard,
-                                   message=_("Unable to create new location: %s") % e,
+                                   message="%s: %s" % (_("Unable to create new location"), e),
                                    caption=_("Error"),
                                    style=wx.OK | wx.ICON_ERROR)
             dlg.ShowModal()
@@ -1901,7 +1902,7 @@
         # should not happend
         if epsgcode == '':
             wx.MessageBox(parent=self,
-                          message=_("EPSG code missing. Unable to create new location"),
+                          message="%s: %s" % (_("Unable to create new location"), _("EPSG code missing.")),
                           caption=_("Error"), style=wx.OK | wx.ICON_ERROR)
             return False
         
@@ -1920,7 +1921,7 @@
             dtrans = ''
             # open a dialog to select datum transform number
             dlg = wx.TextEntryDialog(self.wizard, dtoptions,
-                                     caption=_('Select the number of a datum transformation to use'),
+                                     caption=_('Select datum transformation'),
                                      defaultValue='1',
                                          style=wx.TE_WORDWRAP | wx.MINIMIZE_BOX | wx.MAXIMIZE_BOX|
                                      wx.RESIZE_BORDER |wx.VSCROLL |
@@ -1934,7 +1935,7 @@
                 if dtrans != '':
                     dlg.Destroy()
                 else:
-                    wx.MessageBox(_('You must select a datum transform'))
+                    wx.MessageBox(_('Datum transform is required.'))
                     return False
 
             cmdlist = ['g.proj', '-c',
@@ -1965,7 +1966,10 @@
         # this should not happen
         if not georeffile or not os.path.isfile(georeffile):
             dlg = wx.MessageBox(parent=self.wizard,
-                                message=_("Unable to create new location: could not find file %s") % georeffile,
+                                message="%s: %s ('%s')" % \
+                                    (_("Unable to create new location"),
+                                     _("file not found"),
+                                     georeffile),
                                 caption=("Error"), style=wx.OK | wx.ICON_ERROR)
             return False
 
@@ -2030,7 +2034,7 @@
         # buttons
         #
         self.bset = self.MakeButton(_("&Set region"), id=wx.ID_OK)
-        self.bcancel = self.MakeButton(_("Cancel"), id=wx.ID_CANCEL)
+        self.bcancel = wx.Button(self, id=wx.ID_CANCEL)
         self.bset.SetDefault()
 
         #
@@ -2062,7 +2066,7 @@
                 gcmd.Command(cmdlist)
         else:
             dlg = wx.MessageBox(parent=self,
-                                message=_('A valid location must be selected'),
+                                message=_('Invalid location selected.'),
                                 caption=_("Error"), style=wx.ID_OK | wx.ICON_ERROR)
             return
 

Modified: grass/trunk/gui/wxpython/gui_modules/mapdisp.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2008-03-09 22:30:16 UTC (rev 30511)
+++ grass/trunk/gui/wxpython/gui_modules/mapdisp.py	2008-03-09 22:32:27 UTC (rev 30512)
@@ -918,7 +918,7 @@
                 map = digitToolbar.layers[digitToolbar.layerSelectedID].name
             except:
                 map = None
-                dlg = wx.MessageDialog(self, _("No vector map layer selected for editing"),
+                dlg = wx.MessageDialog(self, _("No vector map selected for editing."),
                                        _("Error"), wx.OK | wx.ICON_ERROR)
                 dlg.ShowModal()
                 dlg.Destroy()
@@ -1502,7 +1502,7 @@
                     map = digitToolbar.layers[digitToolbar.layerSelectedID].name
                 except:
                     map = None
-                    dlg = wx.MessageDialog(self, _("No vector map layer is selected"),
+                    dlg = wx.MessageDialog(self, _("No vector map selected for editing."),
                                            _("Error"), wx.OK | wx.ICON_ERROR)
                     dlg.ShowModal()
                     dlg.Destroy()
@@ -2077,7 +2077,8 @@
         if windpath and not os.path.exists(windpath):
             self.SaveRegion(wind)
         elif windpath and os.path.exists(windpath):
-            overwrite = wx.MessageBox(_("Region file <%s>already exists.\nDo you want to overwrite it?") % (wind),
+            overwrite = wx.MessageBox(_("Region file <%s> already exists. "
+                                        "Do you want to overwrite it?") % (wind),
                                       _("Warning"), wx.YES_NO)
             if (overwrite == wx.YES):
                 self.SaveRegion(wind)
@@ -2795,9 +2796,8 @@
 
         if not self.tree.GetSelections():
             dlg = wx.MessageDialog(parent=self,
-                                   message=_('You must select a map layer in the '
-                                             'Layer Manager to query'),
-                                   caption=_('Nothing to query'),
+                                   message=_('No map layer selected for querying.'),
+                                   caption=_('Message'),
                                    style=wx.OK | wx.ICON_INFORMATION)
             dlg.ShowModal()
             dlg.Destroy()
@@ -3069,7 +3069,7 @@
                         ovltype=ovltype,
                         cmd='d.barscale',
                         drawid=id,
-                        checktxt = _("Show/hide scale and arrow"),
+                        checktxt = _("Show/hide scale and North arrow"),
                         ctrltxt = _("scale object"),
                         params = params)
 
@@ -3303,8 +3303,8 @@
 
         box = wx.BoxSizer(wx.HORIZONTAL)
         label = wx.StaticText(parent=self, id=wx.ID_ANY,
-                              label=_("Drag %s with mouse in pointer mode\nto position. "
-                                      "Double-click to change options" % ctrltxt))
+                              label=_("Drag %s with mouse in pointer mode to position. "
+                                      "Double-click to change options." % ctrltxt))
         box.Add(item=label, proportion=0,
                 flag=wx.ALIGN_CENTRE|wx.ALL, border=5)
         sizer.Add(item=box, proportion=0,

Modified: grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py	2008-03-09 22:30:16 UTC (rev 30511)
+++ grass/trunk/gui/wxpython/gui_modules/mcalc_builder.py	2008-03-09 22:32:27 UTC (rev 30512)
@@ -49,9 +49,9 @@
         self.Centre(wx.BOTH)
 
         if dimension == 3:
-            self.SetTitle(_("GRASS 3D Map Calculator") )
+            self.SetTitle(_("GRASS %s Map Calculator") % "3D" )
         else:
-            self.SetTitle(_("GRASS Map Calculator") )
+            self.SetTitle(_("GRASS %s Map Calculator") % "2D" )
 
         #
         # variables

Modified: grass/trunk/gui/wxpython/gui_modules/preferences.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/preferences.py	2008-03-09 22:30:16 UTC (rev 30511)
+++ grass/trunk/gui/wxpython/gui_modules/preferences.py	2008-03-09 22:32:27 UTC (rev 30512)
@@ -303,8 +303,8 @@
             else:
                 return settings[group][key][subkey]
         except KeyError:
-            raise gcmd.SettingsError(_("Unable to get value of '%s:%s:%s'.") %
-                                     (group, key, subkey))
+            raise gcmd.SettingsError("%s %s:%s:%s." % (_("Unable to get value"),
+                                                       group, key, subkey))
         
     def Set(self, group, key, subkey, value, internal=False):
         """Set value by key/subkey
@@ -326,7 +326,7 @@
                 raise KeyError
             settings[group][key][subkey] = value
         except KeyError:
-            raise gcmd.SettingsError(_("Unable to set '%s:%s:%s'") % (group, key, subkey),)
+            raise gcmd.SettingsError("%s '%s:%s:%s'" % (_("Unable to set "), group, key, subkey))
 
 globalSettings = Settings()
 
@@ -363,15 +363,14 @@
 
         # bindigs
         btnDefault.Bind(wx.EVT_BUTTON, self.OnDefault)
-        btnDefault.SetToolTipString(_("Revert settings to default "
-                                      "(to apply changes press button 'Apply')"))
+        btnDefault.SetToolTipString(_("Revert settings to default and apply changes"))
         btnApply.Bind(wx.EVT_BUTTON, self.OnApply)
         btnApply.SetToolTipString(_("Apply changes for this session"))
         btnSave.Bind(wx.EVT_BUTTON, self.OnSave)
-        btnSave.SetToolTipString(_("Close window and save changes to user settings file"))
+        btnSave.SetToolTipString(_("Close dialog and save changes to user settings file"))
         btnSave.SetDefault()
         btnCancel.Bind(wx.EVT_BUTTON, self.OnCancel)
-        btnCancel.SetToolTipString(_("Close window and ignore changes"))
+        btnCancel.SetToolTipString(_("Close dialog and ignore changes"))
 
         # sizers
         btnSizer = wx.BoxSizer(wx.HORIZONTAL)
@@ -481,7 +480,7 @@
         #
         row = 0
         rasterOverlay = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                                    label=_("Overlay raster map layers"),
+                                    label=_("Overlay raster maps"),
                                     name='IsChecked')
         rasterOverlay.SetValue(self.settings.Get(group='display', key='rasterOverlay', subkey='enabled'))
         self.winId['display:rasterOverlay:enabled'] = rasterOverlay.GetId()
@@ -527,7 +526,7 @@
         row += 1
         # close
         close = wx.CheckBox(parent=panel, id=wx.ID_ANY,
-                            label=_("Close on finish"),
+                            label=_("Close dialog on finish"),
                             name="IsChecked")
         close.SetValue(self.settings.Get(group='cmd', key='closeDlg', subkey='enabled'))
         self.winId['cmd:closeDlg:enabled'] = close.GetId()
@@ -727,7 +726,7 @@
                                "Map topology is rebuild on each operation which can "
                                "significantly slow-down response. The vdigit is a native "
                                "interface which uses v.edit functionality, but doesn't "
-                               "call the command itself."),
+                               "call the module itself."),
                              self.GetSize()[0]-50, wx.ClientDC(self))
 
         gridSizer.Add(item=wx.StaticText(parent=panel, id=wx.ID_ANY,
@@ -773,7 +772,7 @@
         """Button 'Save' pressed"""
         self.__UpdateSettings()
         file = self.settings.SaveToFile()
-        self.parent.goutput.cmd_stdout.write(_('Settings saved to file <%s>.') % file)
+        self.parent.goutput.cmd_stdout.write(_('Settings saved to file \'%s\'.') % file)
         self.Close()
 
     def OnApply(self, event):

Modified: grass/trunk/gui/wxpython/gui_modules/render.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/render.py	2008-03-09 22:30:16 UTC (rev 30511)
+++ grass/trunk/gui/wxpython/gui_modules/render.py	2008-03-09 22:32:27 UTC (rev 30512)
@@ -107,8 +107,8 @@
                       'overlay']
 
         if self.type not in layertypes:
-            raise gcmd.GException(_("Type <%(type)s> of layer <%(name)s> is not supported yet") % \
-                                      {'type' : self.type, 'name' : self.name})
+            raise gcmd.GStdError(_("<%(name)s>: layer type <%(type)s> is not supported yet.") % \
+                                     {'type' : self.type, 'name' : self.name})
         
         #
         # start monitor
@@ -244,8 +244,7 @@
         """
 
         if not os.getenv("GISBASE"):
-            print >> sys.stderr, _("GISBASE not set, you must be "
-                                   "in GRASS GIS to run this program")
+            print >> sys.stderr, _("GISBASE not set. You must be in GRASS GIS to run this program.")
             sys.exit(1)
 
         gisenvCmd = gcmd.Command(["g.gisenv"])
@@ -722,8 +721,7 @@
         Debug.msg (3, "Map.AddLayer(): layer=%s" % layer.name)
         if l_render:
             if not layer.Render():
-                print >> sys.stderr, _("Could not render layer <%s>\n") % \
-                                      (name)
+                raise gcmd.GStdError(_("Unable to render map layer <%s>.") % (name))
 
         return self.layers[-1]
 
@@ -786,7 +784,7 @@
             self.layers[oldlayerindex] = newlayer
 
         if l_render and not layer.Render():
-            raise gcmd.GException(_("Unable render layer <%s>") % 
+            raise gcmd.GException(_("Unable to render map layer <%s>.") % 
                                   (name))
 
         return self.layers[-1]
@@ -895,7 +893,7 @@
         self.overlays.append(overlay)
 
         if l_render and command != '' and not overlay.Render():
-            raise gcmd.GException(_("Unable render overlay <%s>") % 
+            raise gcmd.GException(_("Unable render overlay <%s>.") % 
                                   (name))
 
         self.ovlookup[ovltype] = overlay
@@ -929,7 +927,7 @@
             self.ovlookup[ovltype] = newoverlay
 
         if l_render and command != '' and not overlay.Render():
-            raise gcmd.GException(_("Unable render overlay <%s>") % 
+            raise gcmd.GException(_("Unable render overlay <%s>.") % 
                                   (name))
 
         return self.overlays[-1]

Modified: grass/trunk/gui/wxpython/gui_modules/rules.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/rules.py	2008-03-09 22:30:16 UTC (rev 30511)
+++ grass/trunk/gui/wxpython/gui_modules/rules.py	2008-03-09 22:32:27 UTC (rev 30512)
@@ -53,20 +53,20 @@
             seltype = 'cell'
         elif self.cmd[0] == 'r.reclass':
             label1 = _('Reclassify raster map using rules')
-            label2 = _('Map to reclassify:')
-            label3 = _('Reclassified map:')
+            label2 = _('Raster map to reclassify:')
+            label3 = _('Reclassified raster map:')
             label4 = _('Enter reclassification rules')
             seltype = 'cell'
         elif self.cmd[0] == 'r.recode':
             label1 = _('Recode raster map using rules')
-            label2 = _('Map to recode:')
-            label3 = _('Recoded map:')
+            label2 = _('Raster map to recode:')
+            label3 = _('Recoded raster map:')
             label4 = _('Enter recoding rules')
             seltype = 'cell'
         elif self.cmd[0] == 'v.reclass':
             label1 = _('Reclassify vector map using SQL rules')
-            label2 = _('Map to reclassify:')
-            label3 = _('Reclassified map:')
+            label2 = _('Vector map to reclassify:')
+            label3 = _('Reclassified vector map:')
             label4 = _('Enter reclassification rules')
             seltype = 'vector'
 
@@ -98,7 +98,7 @@
             boxSizer.Add(item=self.selectionOutput,
                          pos=(row,1))
             row += 1
-
+            # TODO remove (see Preferences dialog)
             self.ovrwrtcheck = wx.CheckBox(parent=self, id=wx.ID_ANY, label=_('overwrite existing file'))
             self.ovrwrtcheck.SetValue(self.overwrite)
             boxSizer.Add(item=self.ovrwrtcheck,

Modified: grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py
===================================================================
--- grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py	2008-03-09 22:30:16 UTC (rev 30511)
+++ grass/trunk/gui/wxpython/gui_modules/wxgui_utils.py	2008-03-09 22:32:27 UTC (rev 30512)
@@ -308,8 +308,8 @@
         """
         mapLayer = self.GetPyData(self.layer_selected)[0]['maplayer']
         if not mapLayer.name:
-            dlg = wx.MessageDialog(self, _("Unable to display histogram for "
-                                           "raster map layer"),
+            dlg = wx.MessageDialog(self, _("Unable to display histogram of "
+                                           "raster map."),
                                    _("Error"), wx.OK | wx.ICON_ERROR)
             dlg.ShowModal()
             dlg.Destroy()
@@ -1149,7 +1149,7 @@
                                  'd.rhumbline'    : 'rhumb',
                                  'd.labels'       : 'labels'}[cmdlist[0]]
                 except KeyError:
-                    wx.MessageBox(message=_("Command '%s' not yet implemented") % cmdlist[0])
+                    wx.MessageBox(message=_("Command '%s' not yet implemented.") % cmdlist[0])
                     return False
 
                 # add layer into layer tree
@@ -1219,7 +1219,7 @@
 
         wildcard = "Text file (*.txt)|*.txt"
         dlg = wx.FileDialog(
-            self, message=_("Save file as ..."), defaultDir=os.getcwd(),
+            self, message=_("Save file as..."), defaultDir=os.getcwd(),
             defaultFile="grass_cmd_history.txt", wildcard=wildcard,
             style=wx.SAVE|wx.FD_OVERWRITE_PROMPT)
 
@@ -1500,7 +1500,7 @@
         bodySizer.AddGrowableRow(2)
         
         # layer type
-        bodySizer.Add(item=wx.StaticText(parent=self, label=_("Layer type:")),
+        bodySizer.Add(item=wx.StaticText(parent=self, label=_("Map layer type:")),
                       flag=wx.ALIGN_CENTER_VERTICAL,
                       pos=(0,0))
 

Modified: grass/trunk/gui/wxpython/wxgui.py
===================================================================
--- grass/trunk/gui/wxpython/wxgui.py	2008-03-09 22:30:16 UTC (rev 30511)
+++ grass/trunk/gui/wxpython/wxgui.py	2008-03-09 22:32:27 UTC (rev 30512)
@@ -658,7 +658,7 @@
         if os.path.exists(filename):
             dlg = wx.MessageDialog(self, message=_("Workspace file <%s> already exists. "
                                                    "Do you want to overwrite this file?") % filename,
-                                   caption=_("File exits"), style=wx.OK | wx.CANCEL | wx.ICON_QUESTION)
+                                   caption=_("Warning"), style=wx.OK | wx.CANCEL | wx.ICON_QUESTION)
             if dlg.ShowModal() != wx.ID_OK:
                 dlg.Destroy()
                 return False
@@ -676,7 +676,7 @@
             dlg = wx.MessageDialog(self, message=_("Workspace file <%s> already exists. "
                                                    "Do you want to overwrite this file?") % \
                                        self.workspaceFile,
-                                   caption=_("File exits"), style=wx.OK | wx.CANCEL | wx.ICON_QUESTION)
+                                   caption=_("Warning"), style=wx.OK | wx.CANCEL | wx.ICON_QUESTION)
             if dlg.ShowModal() != wx.ID_OK:
                 dlg.Destroy()
             else:
@@ -972,7 +972,7 @@
         if not maptype or maptype != 'vector':
             dlg = wx.MessageDialog(parent=self,
                                    message=_("Attribute management is available only "
-                                             "for vector map layers"),
+                                             "for vector maps."),
                                    caption=_("Error"), style=wx.OK | wx.ICON_ERROR)
             dlg.ShowModal()
             dlg.Destroy()
@@ -996,8 +996,8 @@
         pointdata = (icon, size)
 
         self.dbmanager = dbm.AttributeManager(parent=self, id=wx.ID_ANY,
-                                              title=_("GRASS GIS Attribute Table Manager - "
-                                                      "vector map layer <%s>") % mapname,
+                                              title="%s - <%s>" % (_("GRASS GIS Attribute Table Manager"),
+                                                                   mapname),
                                               size=wx.Size(500,300), vectmap=mapname,
                                               pointdata=pointdata)
         self.dbmanager.Show()
@@ -1223,10 +1223,11 @@
 
         layerName = str(self.curr_page.maptree.GetItemText(self.curr_page.maptree.layer_selected))
         if layerName:
-            message = _("Do you want to remove map layer <" + layerName + "> "
+            message = _("Do you want to remove map layer <%s> "
+                        "from layer tree?") % layerName
+        else:
+            message = _("Do you want to remove selected map layer "
                         "from layer tree?")
-        else:
-            message = _("Do you want to remove selected layer from layer tree?")
 
         dlg = wx.MessageDialog (parent=self, message=message,
                                 caption=_("Remove map layer"),
@@ -1296,7 +1297,7 @@
 def reexec_with_pythonw():
   if sys.platform == 'darwin' and \
     not sys.executable.endswith('MacOS/Python'):
-    print >> sys.stderr, _('re-executing using pythonw')
+    print >> sys.stderr, 're-executing using pythonw'
     os.execvp('pythonw', ['pythonw', __file__] + sys.argv[1:])
 
 class Usage(Exception):



More information about the grass-commit mailing list