[Checkins] SVN: z3c.table/trunk/ Head cell contents are now translated.
Michael Howitz
mh at gocept.com
Tue Dec 29 04:56:04 EST 2009
Log message for revision 107240:
Head cell contents are now translated.
Changed:
U z3c.table/trunk/CHANGES.txt
U z3c.table/trunk/setup.py
U z3c.table/trunk/src/z3c/table/column.py
U z3c.table/trunk/src/z3c/table/header.py
-=-
Modified: z3c.table/trunk/CHANGES.txt
===================================================================
--- z3c.table/trunk/CHANGES.txt 2009-12-29 09:25:36 UTC (rev 107239)
+++ z3c.table/trunk/CHANGES.txt 2009-12-29 09:56:04 UTC (rev 107240)
@@ -11,19 +11,20 @@
- Fixed tests, so they no longer use ``zope.app.container`` (which was
even not declared as test dependency).
+- Head cell contents are now translated.
Version 0.6.1 (2009-02-22)
--------------------------
-- be smart to not IPhysicallyLocatable objects if we lookup the __name__ value
- in columns.
+- Be smart to not ``IPhysicallyLocatable`` objects if we lookup the
+ ``__name__`` value in columns.
Version 0.6.0 (2008-11-12)
--------------------------
-- Bugfix: Allow to switch the sort order on the header link. This was blocked to
- descending after the first click
+- Bugfix: Allow to switch the sort order on the header link. This was
+ blocked to descending after the first click
- Bugfix: CheckBoxColumn, ensure that we allways use a list for compare
selected items. It was possible that if only one item get selected
Modified: z3c.table/trunk/setup.py
===================================================================
--- z3c.table/trunk/setup.py 2009-12-29 09:25:36 UTC (rev 107239)
+++ z3c.table/trunk/setup.py 2009-12-29 09:56:04 UTC (rev 107240)
@@ -72,6 +72,7 @@
'zope.contentprovider',
'zope.dublincore',
'zope.i18nmessageid',
+ 'zope.i18n',
'zope.interface',
'zope.location',
'zope.schema',
Modified: z3c.table/trunk/src/z3c/table/column.py
===================================================================
--- z3c.table/trunk/src/z3c/table/column.py 2009-12-29 09:25:36 UTC (rev 107239)
+++ z3c.table/trunk/src/z3c/table/column.py 2009-12-29 09:56:04 UTC (rev 107240)
@@ -17,17 +17,16 @@
__docformat__ = "reStructuredText"
from urllib import urlencode
-
-import zope.interface
-import zope.location
-import zope.i18nmessageid
+from z3c.table import interfaces
from zope.dublincore.interfaces import IZopeDublinCore
from zope.security.interfaces import Unauthorized
from zope.traversing import api
from zope.traversing.browser import absoluteURL
+import zope.i18n
+import zope.i18nmessageid
+import zope.interface
+import zope.location
-from z3c.table import interfaces
-
_ = zope.i18nmessageid.MessageFactory('z3c')
@@ -110,7 +109,7 @@
if header:
header.update()
return header.render()
- return self.header
+ return zope.i18n.translate(self.header, context=self.request)
def renderCell(self, item):
"""Cell content."""
@@ -227,7 +226,7 @@
if item in self.selectedItems:
selected='checked="checked"'
return u'<input type="checkbox" class="%s" name="%s" value="%s" %s />' \
- %('checkbox-widget', self.getItemKey(item), self.getItemValue(item),
+ %('checkbox-widget', self.getItemKey(item), self.getItemValue(item),
selected)
Modified: z3c.table/trunk/src/z3c/table/header.py
===================================================================
--- z3c.table/trunk/src/z3c/table/header.py 2009-12-29 09:25:36 UTC (rev 107239)
+++ z3c.table/trunk/src/z3c/table/header.py 2009-12-29 09:56:04 UTC (rev 107240)
@@ -17,12 +17,11 @@
__docformat__ = "reStructuredText"
from urllib import urlencode
-
+from z3c.table import interfaces
+import zope.i18n
import zope.interface
-from z3c.table import interfaces
-
class ColumnHeader(object):
"""ColumnHeader renderer provider"""
@@ -94,6 +93,7 @@
'%s-sortOrder' % prefix: sortOrder})
queryString = '?%s' % (urlencode(args))
- return '<a href="%s" title="Sort">%s</a>' % (queryString,
- self.column.header)
+ return '<a href="%s" title="Sort">%s</a>' % (
+ queryString,
+ zope.i18n.translate(self.column.header, context=self.request))
More information about the checkins
mailing list