changeset 374:e93b8be38fcc

CheckTranslation: more compact rendering
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 19 Apr 2009 15:18:20 +0200
parents 0edec6b35559
children 005e0551b2c6
files data/plugin/action/CheckTranslation.py
diffstat 1 files changed, 9 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/CheckTranslation.py	Sun Apr 19 15:06:24 2009 +0200
+++ b/data/plugin/action/CheckTranslation.py	Sun Apr 19 15:18:20 2009 +0200
@@ -53,21 +53,17 @@
         orig_page = Page(request, orig_page_name)
         trans_page = Page(request, trans_page_name)
 
-        status = []
-        status.append("size: %s, %s" % (orig_page.size(), trans_page.size()))
+        orig_status = ["Original:"]
+        orig_status.append("size: %s" % orig_page.size())
+        last_edit = orig_page.lastEditInfo()
+        orig_status.append(last_edit and "last edit: %(editor)s %(time)s" % last_edit or "")
 
-        orig_last_edit_info = orig_page.lastEditInfo()
-        if orig_last_edit_info:
-            status.append('<hr>')
-            status.append("last original page editor: %(editor)s" % orig_last_edit_info)
-            status.append("last original page edit time: %(time)s" % orig_last_edit_info)
+        trans_status = ["Translation:"]
+        trans_status.append("size: %s, %s" % trans_page.size())
+        last_edit = trans_page.lastEditInfo()
+        trans_status.append(last_edit and "last edit: %(editor)s %(time)s" % last_edit or "")
 
-        trans_last_edit_info = trans_page.lastEditInfo()
-        if trans_last_edit_info:
-            status.append('<hr>')
-            status.append("last translation editor: %(editor)s" % trans_last_edit_info)
-            status.append("last translation edit time: %(time)s" % trans_last_edit_info)
-
+        status = orig_status + ["<hr>"] + 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),
                      '<br>'.join(status)))