# HG changeset patch # User Adrien Di Mascio # Date 1260783914 -3600 # Node ID eb4722dd5f8689d4f6a3b0826ce4b481ef8a0b5e # Parent bc387c49e02bf446217f14a0bbf0f4c0583e12ba [i18n] use named substitutions for proper localization diff -r bc387c49e02b -r eb4722dd5f86 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")