changeset 381:7e2f4d3c1007

CheckTranslation: edit link to i18n page added
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 07 May 2009 23:42:43 +0200
parents f58386c66150
children f0b716541202
files data/plugin/action/CheckTranslation.py
diffstat 1 files changed, 8 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/action/CheckTranslation.py	Mon Apr 20 02:36:24 2009 +0200
+++ b/data/plugin/action/CheckTranslation.py	Thu May 07 23:42:43 2009 +0200
@@ -92,7 +92,7 @@
     table = DataBrowserWidget(request)
     table.setData(data)
     page_table = ''.join(table.format(method='GET'))
-    
+
     fmt = request.formatter
     this_page = Page(request, pagename)
     lang_links = [this_page.link_to_raw(request, _lang,
@@ -110,13 +110,19 @@
                                                      'pageset': _pageset_name, })
                      for _pageset_name in i18n.strings.pagesets]
 
+    po_pagename = "MoinI18n/%s" % lang
+    po_page = Page(request, po_pagename)
+    edit_po_page = ""
+    if po_page.exists():
+        edit_po_page = po_page.link_to(request, "[edit]", querystr=edit_querystr, **edit_attrs)
+    lang_i18n = u''.join([fmt.paragraph(1), _("Based on: %s ") % po_pagename, edit_po_page, fmt.paragraph(0)])
 
     pageset_selector = u''.join([fmt.paragraph(1), _("Choose:"), ' ', ' '.join(pageset_links), fmt.paragraph(0)])
-
     title = _("Checking translation '%s' for page set '%s'") % (lang, pageset_name)
     request.theme.send_title(title, page=request.page, pagename=pagename)
     request.write(request.formatter.rawHTML(css_style_defs))
     request.write(request.formatter.startContent("content"))
+    request.write(lang_i18n)
     request.write(lang_selector)
     request.write(pageset_selector)
     request.write(page_table)