Changeset 50514
- Timestamp:
- Jan 28, 2012, 2:07:06 AM (13 years ago)
- Location:
- grass/branches/develbranch_6/gui/wxpython
- Files:
-
- 5 edited
-
gmodeler/model.py (modified) (2 diffs)
-
gui_core/goutput.py (modified) (2 diffs)
-
modules/colorrules.py (modified) (2 diffs)
-
psmap/dialogs.py (modified) (2 diffs)
-
wxplot/base.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
grass/branches/develbranch_6/gui/wxpython/gmodeler/model.py
r50394 r50514 386 386 break 387 387 if report: 388 errList.append( _("%s: undefined variable '%s'") % (cmd[0], var))388 errList.append(cmd[0] + ": " + _("undefined variable '%s'") % var) 389 389 ### TODO: check variables in file only optionally 390 390 ### errList += self._substituteFile(action, checkOnly = True) … … 448 448 var = sval.group(2).strip()[1:] # ignore '%' 449 449 cmd = item.GetLog(string = False)[0] 450 errList.append( _("%s: undefined variable '%s'") % (cmd, var))450 errList.append(cmd + ": " + _("undefined variable '%s'") % var) 451 451 452 452 if not checkOnly: -
grass/branches/develbranch_6/gui/wxpython/gui_core/goutput.py
r50394 r50514 760 760 if self.parent.GetName() == 'Modeler': 761 761 self.parent.OnCmdDone(event) 762 763 # Process results here 764 try: 765 ctime = time.time() - event.time 766 if ctime < 60: 767 stime = _("%d sec") % int(ctime) 768 else: 769 mtime = int(ctime / 60) 770 stime = _("%(min)d min %(sec)d sec") % { 'min' : mtime, 771 'sec' : int(ctime - (mtime * 60)) } 772 except KeyError: 773 # stopped deamon 774 stime = _("unknown") 762 775 763 776 if event.aborted: … … 765 778 self.WriteLog(_('Please note that the data are left in inconsistent state ' 766 779 'and may be corrupted'), self.cmdOutput.StyleWarning) 767 self.WriteCmdLog('(%s) %s (%d sec)' % (str(time.ctime()), 768 _('Command aborted'), 769 (time.time() - event.time))) 770 # pid=self.cmdThread.requestId) 771 self.btnCmdAbort.Enable(False) 772 else: 773 try: 774 # Process results here 775 ctime = time.time() - event.time 776 if ctime < 60: 777 stime = _("%d sec") % int(ctime) 778 else: 779 mtime = int(ctime / 60) 780 stime = _("%d min %d sec") % (mtime, 781 int(ctime - (mtime * 60))) 782 783 self.WriteCmdLog('(%s) %s (%s)' % (str(time.ctime()), 784 _('Command finished'), 785 (stime))) 786 except KeyError: 787 # stopped deamon 788 pass 789 790 self.btnCmdAbort.Enable(False) 780 msg = _('Command aborted') 781 else: 782 msg = _('Command finished') 783 784 self.WriteCmdLog('(%s) %s (%s)' % (str(time.ctime()), msg, stime)) 785 self.btnCmdAbort.Enable(False) 791 786 792 787 if event.onDone: -
grass/branches/develbranch_6/gui/wxpython/modules/colorrules.py
r49851 r50514 1169 1169 # currently v.colors need the map to be in current mapset 1170 1170 if self.version7 and self.attributeType == 'color': 1171 message = _("Selected map <% s> is not in current mapset <%s>. "1171 message = _("Selected map <%(map)s> is not in current mapset <%(mapset)s>. " 1172 1172 "Color rules cannot be edited.") % \ 1173 (self.inmap, grass.gisenv()['MAPSET']) 1173 { 'map' : self.inmap, 1174 'mapset' : grass.gisenv()['MAPSET'] } 1174 1175 else: 1175 message = _("Selected map <% s> is not in current mapset <%s>. "1176 message = _("Selected map <%(map)s> is not in current mapset <%(mapset)s>. " 1176 1177 "Attribute table cannot be edited.") % \ 1177 (self.inmap, grass.gisenv()['MAPSET']) 1178 { 'map' : self.inmap, 1179 'mapset' : grass.gisenv()['MAPSET'] } 1178 1180 wx.CallAfter(GMessage, parent = self, message = message) 1179 1181 self.DisableClearAll() … … 1446 1448 if self.properties['min'] or self.properties['max']: 1447 1449 if ctype == float: 1448 range = _("(range: %.1f to %.1f)") % (self.properties['min'], self.properties['max']) 1450 range = "%s: %.1f - %.1f)" % (_("range"), 1451 self.properties['min'], self.properties['max']) 1449 1452 elif ctype == int: 1450 range = _("(range: %d to %d)") % (self.properties['min'], self.properties['max']) 1453 range = "%s: %d - %d)" % (_("range"), 1454 self.properties['min'], self.properties['max']) 1451 1455 if range: 1452 1456 if self.colorTable: -
grass/branches/develbranch_6/gui/wxpython/psmap/dialogs.py
r50451 r50514 1107 1107 return False 1108 1108 if not os.path.exists(instr['epsfile']): 1109 GError(_("Failed to read instruction %s: file %s not found.") % instruction, instr['epsfile']) 1109 GError(_("Failed to read instruction %(inst)s: " 1110 "file %(file)s not found.") % { 'inst' : instruction, 1111 'file' : instr['epsfile'] }) 1110 1112 return False 1111 1113 … … 6014 6016 def SetSizeInfoLabel(self, image): 6015 6017 """!Update image size label""" 6016 self.imagePanel.image['sizeInfo'].SetLabel(_("size: %s x %s pts") % (image.GetWidth(), image.GetHeight())) 6018 self.imagePanel.image['sizeInfo'].SetLabel(_("size: %(width)s x %(height)s pts") % \ 6019 { 'width' : image.GetWidth(), 6020 'height' : image.GetHeight() }) 6017 6021 self.imagePanel.image['sizeInfo'].GetContainingSizer().Layout() 6018 6022 -
grass/branches/develbranch_6/gui/wxpython/wxplot/base.py
r50322 r50514 397 397 398 398 def OnMouseLeftDown(self,event): 399 self.SetStatusText(_("Left Mouse Down at Point: (%.4f, %.4f)") %\400 self.client._getXY(event))399 self.SetStatusText(_("Left Mouse Down at Point:") + \ 400 " (%.4f, %.4f)" % self.client._getXY(event)) 401 401 event.Skip() # allows plotCanvas OnMouseLeftDown to be called 402 402
Note:
See TracChangeset
for help on using the changeset viewer.
