changeset 375:005e0551b2c6

CheckTranslation: fixes and better rendering
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 19 Apr 2009 15:23:44 +0200
parents e93b8be38fcc
children 2425d9e491dc
files data/plugin/action/CheckTranslation.py
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/CheckTranslation.py	Sun Apr 19 15:18:20 2009 +0200
+++ b/data/plugin/action/CheckTranslation.py	Sun Apr 19 15:23:44 2009 +0200
@@ -54,19 +54,21 @@
         trans_page = Page(request, trans_page_name)
 
         orig_status = ["Original:"]
-        orig_status.append("size: %s" % orig_page.size())
+        orig_status.append("size: %d" % orig_page.size())
         last_edit = orig_page.lastEditInfo()
-        orig_status.append(last_edit and "last edit: %(editor)s %(time)s" % last_edit or "")
+        if last_edit:
+            orig_status.append("last edit: %(editor)s %(time)s" % last_edit)
 
         trans_status = ["Translation:"]
-        trans_status.append("size: %s, %s" % trans_page.size())
+        trans_status.append("size: %d" % trans_page.size())
         last_edit = trans_page.lastEditInfo()
-        trans_status.append(last_edit and "last edit: %(editor)s %(time)s" % last_edit or "")
+        if last_edit:
+            trans_status.append("last edit: %(editor)s %(time)s" % last_edit)
 
-        status = orig_status + ["<hr>"] + trans_status
+        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),
-                     '<br>'.join(status)))
+                     status))
 
     table = DataBrowserWidget(request)
     table.setData(data)