[views] use display_name to translate plural forms instead of using explcit _plural suffix
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Fri, 06 Nov 2009 14:52:38 +0100
changeset 145 629233488671
parent 144 265e1ad99d07
child 146 b509fc2c9435
[views] use display_name to translate plural forms instead of using explcit _plural suffix
views/secondary.py
--- a/views/secondary.py	Fri Nov 06 14:38:33 2009 +0100
+++ b/views/secondary.py	Fri Nov 06 14:52:38 2009 +0100
@@ -35,7 +35,7 @@
         nmb_entries = self.req.execute(self.countrql, args)[0][0]
         label = u'%s %s [%s]' % (self.req._(calendar.MONTHNAMES[month-1]), year,
                                  nmb_entries)
-        vtitle = '%s %s' % (self.req._('BlogEntry_plural'), label)
+        vtitle = '%s %s' % (display_name('BlogEntry', 'plural'), label)
         url = xml_escape(self.build_url('view', rql=rql, month=month, year=year, vtitle=vtitle))
         link = u'<a href="%s" title="">%s</a>' % (url, label)
         items.append( u'<li class="">%s</li>\n' % link )
@@ -180,7 +180,7 @@
         nmb_entries = self.req.execute(self.countrql, args)[0][0]
         label = u'%s %s [%s]' % (self.req._(calendar.MONTHNAMES[month-1]), year,
                                  nmb_entries)
-        vtitle = '%s %s' % (self.req._('BlogEntry_plural'), label)
+        vtitle = '%s %s' % (display_name('BlogEntry', 'plural'), label)
         url = xml_escape(self.build_url('view', rql=rql, vtitle=vtitle,
                                         month=month, year=year))
         if self.req.execute(rql):