dabo Commit
Revision 5826
Date: 2010-05-19 06:26:45 -0700 (Wed, 19 May 2010)
Author: Ed
Trac: http://trac.dabodev.com/changeset/5826
Changed:
U trunk/ide/ClassDesigner.py
U trunk/ide/ClassDesignerEditor.py
U trunk/ide/ClassDesignerPropSheet.py
U trunk/ide/ClassDesignerTreeSheet.py
Log:
Changed string substitution to work with localization
Diff:
Modified: trunk/ide/ClassDesigner.py
===================================================================
--- trunk/ide/ClassDesigner.py 2010-05-19 13:21:03 UTC (rev 5825)
+++ trunk/ide/ClassDesigner.py 2010-05-19 13:26:45 UTC (rev 5826)
@@ -1728,7 +1728,7 @@
txt = e.text.strip()
else:
txt = _("<unspecified>")
- dabo.ui.stop(_("Compilation Error: %s\nCode: %s") %
(msg, txt),
+ dabo.ui.stop(_("Compilation Error: %(msg)s\nCode:
%(txt)s") % locals(),
_("Compilation Error"))
self.biz = currbiz
@@ -2082,8 +2082,8 @@
try:
del self._classPropDict[obj][prop]
except StandardError, e:
- dabo.errorLog.write(_("Could not delete custom property
'%s': %s")
- % (prop, e))
+ dabo.errorLog.write(_("Could not delete custom property
'%(prop)s': %(e)s")
+ % locals())
def editObjectProperty(self, prop):
@@ -2467,8 +2467,8 @@
szit = pnl.ControllingSizerItem
if szit is None:
# Something is wrong; write it to the log and
return
- dabo.errorLog.write(_("Attempted to add an
object of class %s to parent %s, but parent has no sizer information.")
- % (cls, pnl))
+ dabo.errorLog.write(_("Attempted to add an
object of class %(cls)s to parent %(pnl)s, but parent has no sizer
information.")
+ % locals())
return
grdsz = isinstance(szit, dui.dSizer.GridSizerItem)
@@ -3148,7 +3148,7 @@
try:
exec "obj.%s = '%s'" % (att,
escVal)
except:
- raise ValueError(_("Could not
set attribute '%s' to value: %s") % (att, val))
+ raise ValueError(_("Could not
set attribute '%(att)s' to value: %(val)s") % locals())
# If the item has children, set their atts, too.
isSizer = isinstance(obj, dui.dSizerMixin)
if isSizer:
Modified: trunk/ide/ClassDesignerEditor.py
===================================================================
--- trunk/ide/ClassDesignerEditor.py 2010-05-19 13:21:03 UTC (rev 5825)
+++ trunk/ide/ClassDesignerEditor.py 2010-05-19 13:26:45 UTC (rev 5826)
@@ -357,7 +357,7 @@
mthd = self.ddMethod.StringValue
if not mthd:
mthd = _("no method")
- self.Caption = _("Editing: %s, %s") % (nm, mthd)
+ self.Caption = _("Editing: %(nm)s, %(mthd)s") % locals()
def onDeactivate(self, evt):
@@ -384,7 +384,7 @@
num = None
if num is not None:
num = int(num)
- disp = _("Error: %s\nLine: %s") % (msg, num)
+ disp = _("Error: %(msg)s\nLine: %(num)s") %
locals()
ed.LineNumber = num-3
ed.showCurrentLine()
ed.hiliteLine(num-1)
Modified: trunk/ide/ClassDesignerPropSheet.py
===================================================================
--- trunk/ide/ClassDesignerPropSheet.py 2010-05-19 13:21:03 UTC (rev 5825)
+++ trunk/ide/ClassDesignerPropSheet.py 2010-05-19 13:26:45 UTC (rev 5826)
@@ -318,8 +318,8 @@
if prop.startswith("Font"):
self.updateGridValues()
except PropertyUpdateException, e:
- dabo.ui.stop(_("Could not set property '%s' to value
'%s'\nReason: '%s'")
- % (prop, val, e))
+ dabo.ui.stop(_("Could not set property '%(prop)s' to
value '%(val)s'\nReason: '%(e)s'")
+ % locals())
self.updateGridValues()
Modified: trunk/ide/ClassDesignerTreeSheet.py
===================================================================
--- trunk/ide/ClassDesignerTreeSheet.py 2010-05-19 13:21:03 UTC (rev 5825)
+++ trunk/ide/ClassDesignerTreeSheet.py 2010-05-19 13:26:45 UTC (rev 5826)
@@ -198,7 +198,7 @@
if isinstance(obj, dui.dBorderSizer):
itmCap = obj.Caption
if itmCap:
- ret = _("BorderSizer ('%s'):
%s") % (itmCap, ornt)
+ ret = _("BorderSizer
('%(itmCap)s'): %(ornt)s") % locals()
else:
ret = _("BorderSizer: %s") %
ornt
else:
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message:
http://leafe.com/archives/byMID/[email protected]