changeset 364:5fbb949f75d2

action SystemPages renamed to CheckTranslation
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Wed, 15 Apr 2009 09:19:04 +0200
parents 2bf44dde5191
children 951d12e53825
files data/plugin/action/CheckTranslation.py data/plugin/action/SystemPages.py
diffstat 2 files changed, 48 insertions(+), 48 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/data/plugin/action/CheckTranslation.py	Wed Apr 15 09:19:04 2009 +0200
@@ -0,0 +1,48 @@
+# -*- coding: iso-8859-1 -*-
+"""
+    MoinMoin - CheckTranslation.py
+
+    shows a table of System Pages and their translations to the users language
+    if the user lang is anything else than en
+
+    @copyright: 2009 MoinMoin:ReimarBauer
+    @license: GNU GPL, see COPYING for details.
+"""
+
+from MoinMoin.i18n import strings
+from MoinMoin import i18n
+from MoinMoin.Page import Page
+from MoinMoin.util.dataset import TupleDataset, Column
+from MoinMoin.widget.browser import DataBrowserWidget
+
+
+def execute(pagename, request):
+    _ = request.getText
+    SystemPages = strings.all_pages
+
+    users_lang = i18n.requestLanguage(request)
+    if users_lang == "en":
+        msg = _("Please select an other language than english in your settings for this action")
+        request.theme.add_msg(msg, "err")
+        Page(request, pagename).send_page()
+        return
+
+    data = TupleDataset()
+    data.columns = [
+           Column('en', label=_('Developer language')),
+           Column(users_lang, label=_('Preferred language')),
+        ]
+
+    for page_name in SystemPages:
+        master = Page(request, page_name)
+        translated = Page(request, _(page_name))
+        data.addRow((master.link_to(request, page_name), translated.link_to(request, _(page_name))))
+
+    table = DataBrowserWidget(request)
+    table.setData(data)
+
+    msg = ''.join(table.format(method='GET'))
+    msg = "Help pages and their translations %s" % msg
+    if msg:
+        request.theme.add_msg(msg, "info")
+    Page(request, pagename).send_page()
--- a/data/plugin/action/SystemPages.py	Tue Apr 14 22:54:32 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +0,0 @@
-# -*- coding: iso-8859-1 -*-
-"""
-    MoinMoin - SystemPages
-
-    shows a table of System Pages and their translations to the users language
-    if the user lang is anything else than en
-
-    @copyright: 2009 MoinMoin:ReimarBauer
-    @license: GNU GPL, see COPYING for details.
-"""
-
-from MoinMoin.i18n import strings
-from MoinMoin import i18n
-from MoinMoin.Page import Page
-from MoinMoin.util.dataset import TupleDataset, Column
-from MoinMoin.widget.browser import DataBrowserWidget
-
-
-def execute(pagename, request):
-    _ = request.getText
-    SystemPages = strings.all_pages
-
-    users_lang = i18n.requestLanguage(request)
-    if users_lang == "en":
-        msg = _("Please select an other language than english in your settings for this action")
-        request.theme.add_msg(msg, "err")
-        Page(request, pagename).send_page()
-        return
-
-    data = TupleDataset()
-    data.columns = [
-           Column('en', label=_('Developer language')),
-           Column(users_lang, label=_('Preferred language')),
-        ]
-
-    for page_name in SystemPages:
-        master = Page(request, page_name)
-        translated = Page(request, _(page_name))
-        data.addRow((master.link_to(request, page_name), translated.link_to(request, _(page_name))))
-
-    table = DataBrowserWidget(request)
-    table.setData(data)
-
-    msg = ''.join(table.format(method='GET'))
-    msg = "Help pages and their translations %s" % msg
-    if msg:
-        request.theme.add_msg(msg, "info")
-    Page(request, pagename).send_page()