[EntityTableView] smarter header for MainEntityColRenderer: use plural form only when necessary. Closes #2093182
--- a/web/views/tableview.py Thu Nov 17 18:21:04 2011 +0100
+++ b/web/views/tableview.py Thu Nov 17 18:19:56 2011 +0100
@@ -782,7 +782,11 @@
def default_header(self):
view = self.view
- return u', '.join(self._cw.__(et+'_plural')
+ if len(view.cw_rset) > 1:
+ suffix = '_plural'
+ else:
+ suffix = ''
+ return u', '.join(self._cw.__(et + suffix)
for et in view.cw_rset.column_types(view.cw_col or 0))
def render_entity(self, w, entity):