[printers] fix bug introduced by final view refactoring:   shouldn't be escaped.
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Wed, 12 Oct 2011 19:06:15 +0200
changeset 7940 ac8052334e0d
parent 7937 3453c5f0db21
child 7942 d12c21ea4cd4
[printers] fix bug introduced by final view refactoring: &#160; shouldn't be escaped. Also remove some msgids which should have been removed during this refactoring
web/views/baseviews.py
--- a/web/views/baseviews.py	Tue Oct 11 18:16:06 2011 +0200
+++ b/web/views/baseviews.py	Wed Oct 12 19:06:15 2011 +0200
@@ -132,21 +132,6 @@
     though usually dedicated for cells containing an attribute's value.
     """
     __regid__ = 'final'
-    # record generated i18n catalog messages
-    _('%d&#160;years')
-    _('%d&#160;months')
-    _('%d&#160;weeks')
-    _('%d&#160;days')
-    _('%d&#160;hours')
-    _('%d&#160;minutes')
-    _('%d&#160;seconds')
-    _('%d years')
-    _('%d months')
-    _('%d weeks')
-    _('%d days')
-    _('%d hours')
-    _('%d minutes')
-    _('%d seconds')
 
     def cell_call(self, row, col, props=None, format='text/html'):
         value = self.cw_rset.rows[row][col]
@@ -163,8 +148,9 @@
                 return
         value = self._cw.printable_value(etype, value, props)
         if etype in ('Time', 'Interval'):
-            value = value.replace(' ', '&#160;')
-        self.wdata(value)
+            self.w(value.replace(' ', '&#160;'))
+        else:
+            self.wdata(value)
 
 
 class InContextView(EntityView):