translate schema types stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 02 Jul 2009 12:57:51 +0200
branchstable
changeset 2241 fcf08ac5f8c0
parent 2240 ff84892900ac
child 2242 6772f8e859c2
translate schema types
server/hooks.py
--- a/server/hooks.py	Thu Jul 02 12:57:11 2009 +0200
+++ b/server/hooks.py	Thu Jul 02 12:57:51 2009 +0200
@@ -222,9 +222,10 @@
             return
         if self.session.unsafe_execute(*self._rql()).rowcount < 1:
             etype = self.session.describe(self.eid)[0]
-            msg = self.session._('at least one relation %(rtype)s is required on %(etype)s (%(eid)s)')
-            raise ValidationError(self.eid, {self.rtype: msg % {'rtype': self.rtype,
-                                                                'etype': etype,
+            _ = self.session._
+            msg = _('at least one relation %(rtype)s is required on %(etype)s (%(eid)s)')
+            raise ValidationError(self.eid, {self.rtype: msg % {'rtype': _(self.rtype),
+                                                                'etype': _(etype),
                                                                 'eid': self.eid}})
 
     def commit_event(self):