changeset 385:cbc739f4e5eb

CheckTranslation: no link for translated page if it is in the set of not_translated_system_pages
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 12 Jul 2009 11:54:00 +0200
parents 6b6cc67478ff
children 2987a4ef997a
files data/plugin/action/CheckTranslation.py
diffstat 1 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/CheckTranslation.py	Sat May 09 17:29:22 2009 +0200
+++ b/data/plugin/action/CheckTranslation.py	Sun Jul 12 11:54:00 2009 +0200
@@ -32,6 +32,7 @@
     if pageset_name not in i18n.strings.pagesets:
         pageset_name = 'all_pages'
     pageset = getattr(i18n.strings, pageset_name)
+    not_translated_system_pages_set = getattr(i18n.strings, "not_translated_system_pages")
 
     if pagename.startswith(u"MoinI18n/"):
         # if we get called from one of the pages on MoinMaster that contain
@@ -75,17 +76,18 @@
         if last_edit:
             info += " %(editor)s %(time)s" % last_edit
         orig_status.append(info)
-
-        trans_status = [
-            trans_page.link_to(request, trans_page_name) + " " +
-            trans_page.link_to(request, "[raw]", querystr=raw_querystr) + " " +
-            trans_page.link_to(request, "[edit]", querystr=edit_querystr, **edit_attrs)
-        ]
-        info = "%d" % trans_page.size()
-        last_edit = trans_page.lastEditInfo()
-        if last_edit:
-            info += " %(editor)s %(time)s" % last_edit
-        trans_status.append(info)
+        trans_status = [trans_page_name]
+        if trans_page_name not in not_translated_system_pages_set:
+            trans_status = [
+                            trans_page.link_to(request, trans_page_name) + " " +
+                            trans_page.link_to(request, "[raw]", querystr=raw_querystr) + " " +
+                            trans_page.link_to(request, "[edit]", querystr=edit_querystr, **edit_attrs)
+                            ]
+            info = "%d" % trans_page.size()
+            last_edit = trans_page.lastEditInfo()
+            if last_edit:
+                info += " %(editor)s %(time)s" % last_edit
+            trans_status.append(info)
 
         data.addRow(("<br>".join(orig_status), "<br>".join(trans_status)))