# HG changeset patch # User Sylvain Thénault # Date 1270028477 -7200 # Node ID 32b1adfb6b92b7e29972cd3c2d8ff42557bcc42c # Parent 60a237638f574b9f72ce6b1cb3142747ccfa95b9 [i18n] use named substitution to avoid gettext warnings diff -r 60a237638f57 -r 32b1adfb6b92 server/sources/native.py --- a/server/sources/native.py Wed Mar 31 10:56:43 2010 +0200 +++ b/server/sources/native.py Wed Mar 31 11:41:17 2010 +0200 @@ -1031,8 +1031,8 @@ entity = self.repo.vreg['etypes'].etype_class(etype)(session) except Exception: return [session._( - "Can't undo creation of entity %s of type %s, type " - "no more supported" % (eid, etype))] + "Can't undo creation of entity %(eid)s of type %(etype)s, type " + "no more supported" % {'eid': eid, 'etype': etype})] entity.set_eid(eid) # for proper eid/type cache update hook.set_operation(session, 'pendingeids', eid, @@ -1075,8 +1075,8 @@ cu = self.doexec(session, sql) if cu.fetchone() is None: errors.append(session._( - "Can't undo addition of relation %s from %s to %s, doesn't " - "exist anymore" % (rtype, subj, obj))) + "Can't undo addition of relation %(rtype)s from %(subj)s to" + " %(obj)s, doesn't exist anymore" % locals())) if not errors: self.repo.hm.call_hooks('before_delete_relation', session, eidfrom=subj, rtype=rtype, eidto=obj)