changeset 376:2425d9e491dc

CheckTranslation: more compact rendering
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 19 Apr 2009 15:39:00 +0200
parents 005e0551b2c6
children bf4c9c4190b0
files data/plugin/action/CheckTranslation.py
diffstat 1 files changed, 11 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/CheckTranslation.py	Sun Apr 19 15:23:44 2009 +0200
+++ b/data/plugin/action/CheckTranslation.py	Sun Apr 19 15:39:00 2009 +0200
@@ -39,9 +39,8 @@
 
     data = TupleDataset()
     data.columns = [
-           Column('en', label=_('Original page')),
-           Column(lang, label=_('Translated page')),
-           Column('status', label=_('Status')),
+           Column('en', label=_('Original page') + " " + _("(Link, Size, Last-Edit)")),
+           Column(lang, label=_('Translated page') + " " + _("(Link, Size, Last-Edit)")),
         ]
 
     edit_querystr = {'action': 'edit', 'editor': 'text'}
@@ -53,22 +52,21 @@
         orig_page = Page(request, orig_page_name)
         trans_page = Page(request, trans_page_name)
 
-        orig_status = ["Original:"]
-        orig_status.append("size: %d" % orig_page.size())
+        orig_status = [orig_page.link_to(request, orig_page_name, querystr=raw_querystr), ]
+        info = "%d" % orig_page.size()
         last_edit = orig_page.lastEditInfo()
         if last_edit:
-            orig_status.append("last edit: %(editor)s %(time)s" % last_edit)
+            info += " %(editor)s %(time)s" % last_edit
+        orig_status.append(info)
 
-        trans_status = ["Translation:"]
-        trans_status.append("size: %d" % trans_page.size())
+        trans_status = [trans_page.link_to(request, trans_page_name, querystr=edit_querystr, **edit_attrs), ]
+        info = "%d" % trans_page.size()
         last_edit = trans_page.lastEditInfo()
         if last_edit:
-            trans_status.append("last edit: %(editor)s %(time)s" % last_edit)
+            info += " %(editor)s %(time)s" % last_edit
+        trans_status.append(info)
 
-        status = "<br>".join(orig_status) + "<hr>" + "<br>".join(trans_status)
-        data.addRow((orig_page.link_to(request, orig_page_name, querystr=raw_querystr),
-                     trans_page.link_to(request, trans_page_name, querystr=edit_querystr, **edit_attrs),
-                     status))
+        data.addRow(("<br>".join(orig_status), "<br>".join(trans_status)))
 
     table = DataBrowserWidget(request)
     table.setData(data)