diff -r 4a3b264589dc -r 8eb7883b4223 web/views/schema.py
--- a/web/views/schema.py Thu Oct 21 18:38:36 2010 +0200
+++ b/web/views/schema.py Fri Oct 22 09:15:35 2010 +0200
@@ -18,6 +18,7 @@
"""Specific views for schema related entities"""
__docformat__ = "restructuredtext en"
+_ = unicode
from itertools import cycle
@@ -125,6 +126,7 @@
# set layout permissions in a table for each group of relation
# definition
w = self.w
+ _ = self._cw._
w(u'
')
tmpl = u'
%s %s
%s'
for perm, rdefs in perms.iteritems():
@@ -147,7 +149,7 @@
default_tab = 'schema-diagram'
def call(self):
- self.w(u'
%s
' % _('Schema of the data model'))
+ self.w(u'
%s
' % self._cw._('Schema of the data model'))
self.render_tabs(self.tabs, self.default_tab)
@@ -155,9 +157,11 @@
__regid__ = 'schema-diagram'
def call(self):
- self.w(_(u'
')
+ _ = self._cw._
+ self.w(self._cw._(
+ u'
')
% xml_escape(self._cw.build_url('view', vid='schemagraph', skipmeta=0)))
self.w(u'
' %
(self._cw.build_url('view', vid='owl'),
@@ -397,15 +401,16 @@
def cell_call(self, row, col):
entity = self.cw_rset.get_entity(row, col)
eschema = self._cw.vreg.schema.eschema(entity.name)
- self.w(u'
%s
' % _('This entity type permissions:').capitalize())
+ self.w(u'
%s
' % self._cw._('This entity type permissions:'))
self.permissions_table(eschema)
self.w(u'
')
- self.w(u'
%s
' % _('Attributes permissions:').capitalize())
+ self.w(u'%s
' % self._cw._('Attributes permissions:'))
for attr, etype in eschema.attribute_definitions():
if attr not in META_RTYPES:
rdef = eschema.rdef(attr)
attrtype = str(rdef.rtype)
- self.w(u'%s (%s)
' % (attrtype, _(attrtype)))
+ self.w(u'%s (%s)
'
+ % (attrtype, self._cw._(attrtype)))
self.permissions_table(rdef)
self.w(u'')