How to configure moin for differents languages or use patterns.

See also CategoryMarket.

Brazilian Portuguese©

/!\ The category and template regexes below are required since Moin 1.9.1+ as system pages use them for page naming.

    page_category_regex = ur'(?P<all>Categoria(?P<key>(?!Template)\S+))'
    page_template_regex = ur'(?P<all>TemplateDe(?P<key>\S+))'
    page_dict_regex = ur'(?P<all>Dic(?P<key>\S+))'
    page_group_regex = ur'(?P<all>Grupo(?P<key>\S+))'

Italian Wiki

Tested and working with MoinMoin 1.8.5:

    language_default    = 'it'
    page_category_regex = ur'(?P<all>Categoria(?P<key>(?!Modello)\S+))'
    page_dict_regex     = ur'(?P<all>(?P<key>\S+)Dict)'
    page_group_regex    = ur'(?P<all>Gruppo(?P<key>\S+))'
    page_template_regex = ur'(?P<all>(?P<key>\S+)Modello)'

Russian Wiki

For Russian-only content wiki:

    language_default    = 'ru'
    page_category_regex = ur'(?P<all>Категория(?P<key>\S+))'
    page_dict_regex     = ur'(?P<all>(?P<key>\S+)(Словарь|Dict))'
    page_group_regex    = ur'(?P<all>Группа(?P<key>\S+))'
    page_template_regex = ur'(?P<all>Шаблон(?P<key>\S+))'

For bilingual (Russian/English) wiki (recommended):

    language_default    = 'ru'
    page_category_regex = ur'(?P<all>(Категория|Category)(?P<key>\S+))'
    page_dict_regex     = ur'(?P<all>(?P<key>\S+)(Словарь|Dict))'
    page_group_regex    = ur'(?P<all>((?!.*Group)(?P<ru>Группа))?(?P<key>\S+)(?(ru)|Group))'
    page_template_regex = ur'(?P<all>((?!.*Template)(?P<ru>Шаблон))?(?P<key>\S+)(?(ru)|Template))'

German Wiki

    language_default    = 'de'
    page_category_regex = ur'(?P<all>Kategorie(?P<key>\S+))'
    page_group_regex    = ur'(?P<all>Gruppe(?P<key>\S+))'
    page_template_regex = ur'(?P<all>(?P<key>\S+)Vorlage)'

I like this

    page_category_regex = ur'(?P<all>Kategorie(?P<key>(?!Vorlage)\S+))'
    page_group_regex    = ur'(?P<all>(?P<key>\S+)Gruppe)'
    page_template_regex = ur'(?P<all>(?P<key>\S+)Vorlage)'

Spanish Wiki

    page_category_regex = ur'(?P<all>Categoria(?P<key>(?!Plantilla)\S+))'
    page_dict_regex = ur'(?P<all>(?P<key>\S+)Dict)'
    page_group_regex = ur'(?P<all>(?P<key>\S+)Grupo)'
    page_template_regex = ur'(?P<all>(?P<key>\S+)Plantilla)'

简体中文维基

    page_category_regex = ur'(?P<all>(?P<prefix>Category)?(?P<key>\S+)(?(prefix)|类))'
    page_dict_regex = ur'(?P<all>(?P<key>\S+)(Dict|字典))'
    page_group_regex = ur'(?P<all>(?P<key>\S+)(Group|组))'
    page_template_regex = ur'(?P<all>(?P<key>\S+)(Template|模板))'

French Wiki — Wiki français

    language_default    = 'fr'
    page_category_regex = ur'(?P<all>Cat[ée]gorie(?P<key>\S+))'
    page_dict_regex = ur'(?P<all>Dict(?P<key>\S+))'
    page_group_regex = ur'(?P<all>Groupe(?P<key>\S+))'
    page_template_regex = ur'(?P<all>Mod[eè]le(?P<key>\S+))'


Note: make sure the config file has the right encoding defined on top

MoinMoin: ConfigMarket (last edited 2013-08-06 10:29:06 by papamoll)