[i18n] use named substitutions for proper localization stable
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Mon, 14 Dec 2009 10:45:14 +0100
branchstable
changeset 4098 eb4722dd5f86
parent 4097 bc387c49e02b
child 4112 b33a9f3e19d6
child 4113 986fc01be83c
[i18n] use named substitutions for proper localization
server/hooks.py
--- a/server/hooks.py	Thu Dec 10 18:17:28 2009 +0100
+++ b/server/hooks.py	Mon Dec 14 10:45:14 2009 +0100
@@ -536,7 +536,9 @@
                 raise ValidationError(entity.eid, {'by_transition': msg})
             if not tr.has_input_state(fromstate):
                 _ = session._
-                msg = _("transition %s isn't allowed from %s") % (_(tr.name), _(fromstate.name))
+                msg = _("transition %(tr)s isn't allowed from %(st)s") % {'tr': _(tr.name),
+                                                                          'st': _(fromstate.name),
+                                                                          }
                 raise ValidationError(entity.eid, {'by_transition': msg})
             if not tr.may_be_fired(foreid):
                 msg = session._("transition may not be fired")