view MoinMoin/i18n/ @ 4691:64c2196fc6b3

i18n.strings: add pagesets attribute, add optional_pages list
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 19 Apr 2009 14:11:54 +0200
parents 1cf826dce287
children b033c6e760ba
line wrap: on
line source
# -*- 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.

    TODO i18n.strings / general:
    * check page lists (complete? correct?)
    * update po files on master19 wiki
    * fix "de" translation for more experiments
    * fix other translations (can be done using ##master-page, but help
      from a native speaker would be the preferred solution)
    * use pagelists here + translation from po file if there is no SystemPagesInXxGroup
      for creation of language packs (keep group pages as long as needed!)
    * delete SystemPagesInGermanGroup to try it
    * delete other SystemPagesInXXXGroup if their po file is complete

    TODO "checktranslation" plugin action for master19:
    * uses request.values.get("lang", request.user.lang or "en")
    * uses page lists to create table:
      * | OriginalPageLink (raw) | TranslatedPageLink (edit) | <update> |
      * page links make it easy to see what exists and what not
      * additionally raw and edit links are given to support c&p
      * <update> can indicate an update need for the translation
    * list pages on master19 that are not referenced by any original or
      translated page name (in any supported language)

    @copyright: 2009 MoinMoin:ThomasWaldmann
    @license: GNU GPL, see COPYING for details.

_ = lambda x: x # dummy translation function

# Some basic pages used for every language, but we only need them once in English (don't translate!):
not_translated_system_pages = [

essential_system_pages = [
    _('WikiTipOfTheDay'), # used by RecentChanges
    _('WikiHomePage'), # used by ...?

optional_system_pages = [
    _('FortuneCookies'), # use by RandomQuote macro

translated_system_pages = essential_system_pages + optional_system_pages

all_system_pages = not_translated_system_pages + translated_system_pages

essential_category_pages = [

optional_category_pages = [

all_category_pages = essential_category_pages + optional_category_pages

essential_template_pages = [

optional_template_pages = [

all_template_pages = essential_template_pages + optional_template_pages

# Installation / Configuration / Administration Help:
admin_pages = [

# Stuff that should live on wiki:
obsolete_pages = [

essential_help_pages = [
    _('HelpOnMoinWikiSyntax'), # used by edit action
    _('HelpOnCreoleSyntax'), # used by edit action

optional_help_pages = [
    _('HelpOnFormatting'), # still needed?
    _('HelpOnEditing'), # used by edit action!
    _('HelpOnSlideShows/000 Introduction'),
    _('HelpOnSlideShows/100 Creating the slides'),
    _('HelpOnSlideShows/900 Last but not least: Running your presentation'),
    _('HelpOnSpam '),

all_help_pages = essential_help_pages + optional_help_pages

# Wiki Course:
course_pages = [
    _('WikiCourse/01 What is a MoinMoin wiki?'),
    _('WikiCourse/02 Finding information'),
    _('WikiCourse/03 Staying up to date'),
    _('WikiCourse/04 Creating a wiki account'),
    _('WikiCourse/05 User preferences'),
    _('WikiCourse/06 Your own wiki homepage'),
    _('WikiCourse/07 The text editor'),
    _('WikiCourse/08 Hot Keys'),
    _('WikiCourse/10 Text layout with wiki markup'),
    _('WikiCourse/11 Paragraphs'),
    _('WikiCourse/12 Headlines'),
    _('WikiCourse/13 Lists'),
    _('WikiCourse/14 Text styles'),
    _('WikiCourse/15 Tables'),
    _('WikiCourse/16 Wiki internal links'),
    _('WikiCourse/17 External links'),
    _('WikiCourse/18 Attachments'),
    _('WikiCourse/19 Symbols'),
    _('WikiCourse/20 Dynamic content'),
    _('WikiCourse/21 Macros'),
    _('WikiCourse/22 Parsers'),
    _('WikiCourse/23 Actions'),
    _('WikiCourse/30 The graphical editor'),
    _('WikiCourse/40 Creating more pages'),
    _('WikiCourse/50 Wiki etiquette'),
    _('WikiCourse/51 Applications'),
    _('WikiCourse/52 Structure in the wiki'),

essential_pages = (
    essential_system_pages +
    essential_category_pages +
    essential_template_pages +

optional_pages = (
    optional_system_pages +
    optional_category_pages +
    optional_template_pages +

all_pages = (
    all_system_pages +
    all_category_pages +
    all_template_pages +
    all_help_pages +
    admin_pages +
    obsolete_pages +

# a set with all the *_pages attribute names we have defined above
pagesets = set([attr for attr in globals().keys() if attr.endswith("_pages")])

# we use Sun at index 0 and 7 to be compatible with EU and US day indexing
# schemes, like it is also done within crontab entries:
weekdays = [_('Sun'), _('Mon'), _('Tue'), _('Wed'), _('Thu'), _('Fri'), _('Sat'), _('Sun')]

actions = [

misc = [
    # the editbar link text of the default supplementation page link:

del _ # delete the dummy translation function