changeset 4682:088e291e6a21

rename i18n/dummy to i18n/strings, use it for new approach for SystemPages later
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 13 Apr 2009 23:05:56 +0200
parents b94ed1321130
children 2f5fa1f9aa32
files MoinMoin/i18n/README MoinMoin/i18n/dummy.py MoinMoin/i18n/strings.py
diffstat 3 files changed, 59 insertions(+), 36 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/i18n/README	Mon Apr 13 14:12:49 2009 +0200
+++ b/MoinMoin/i18n/README	Mon Apr 13 23:05:56 2009 +0200
@@ -34,8 +34,9 @@
 the files listed in POTFILES.in.
 
 As not all strings appear in the source code, there is an additional
-file i18n/dummy.py that contains strings that need to be translated, but
-do not appear in src otherwise or are not found by gettext.
+file i18n/strings.py that contains strings that need to be translated, but
+do not appear in src otherwise or are not found by gettext or need to be
+organized somehow.
 
 
 
--- a/MoinMoin/i18n/dummy.py	Mon Apr 13 14:12:49 2009 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-"""
-    This is a dummy file to feed some stuff into gettext system
-    that it would not get otherwise - for automatic generation
-    of the translation files.
-
-"""
-
-def _(text):
-    pass
-
-_('FrontPage')
-_('RecentChanges')
-_('TitleIndex')
-_('WordIndex')
-_('FindPage')
-_('SiteNavigation')
-_('HelpContents')
-_('HelpOnFormatting')
-_('WikiLicense')
-_('MissingPage')
-_('MissingHomePage')
-
-_('Mon'), _('Tue'), _('Wed'), _('Thu'), _('Fri'), _('Sat'), _('Sun')
-
-_('AttachFile')
-_('DeletePage')
-_('LikePages')
-_('LocalSiteMap')
-_('RenamePage')
-_('SpellCheck')
-
-# the editbar link text of the default supplementation page link:
-_('Discussion')
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MoinMoin/i18n/strings.py	Mon Apr 13 23:05:56 2009 +0200
@@ -0,0 +1,56 @@
+# -*- coding: iso-8859-1 -*-
+"""
+    MoinMoin - lists of translateable strings
+
+    MoinMoin uses some translateable strings that do not appear at other
+    places in the source code (and thus, are not found by gettext when
+    extracting translateable strings).
+    Also, some strings need to be organized somehow.
+
+    @copyright: 2009 MoinMoin:ThomasWaldmann
+    @license: GNU GPL, see COPYING for details.
+"""
+
+_ = lambda x: x # dummy translation function
+
+# TODO: check lists against SystemPagesInEnglishGroup
+
+essential_system_pages = [
+    _('FrontPage'),
+    _('RecentChanges'),
+    _('TitleIndex'),
+    _('WordIndex'),
+    _('FindPage'),
+    _('SiteNavigation'),
+    _('HelpContents'),
+    _('HelpOnFormatting'),
+    _('WikiLicense'),
+    _('MissingPage'),
+    _('MissingHomePage'),
+]
+
+optional_system_pages = [
+]
+
+system_pages = essential_system_pages + optional_system_pages
+
+# we use Sun at index 0 and 7 to be compatible with EU/US day indexing scheme,
+# like it is also done by crontab entries etc.
+weekdays = [_('Sun'), _('Mon'), _('Tue'), _('Wed'), _('Thu'), _('Fri'), _('Sat'), _('Sun')]
+
+actions = [
+    _('AttachFile'),
+    _('DeletePage'),
+    _('LikePages'),
+    _('LocalSiteMap'),
+    _('RenamePage'),
+    _('SpellCheck'),
+]
+
+misc = [
+    # the editbar link text of the default supplementation page link:
+    _('Discussion'),
+]
+
+del _ # delete the dummy translation function
+