view MoinMoin/macro/GetText.py @ 1529:76b4d2324d25

MoinMoin should not record the homepage links as pagelinks, fixes MoinMoinBugs/PageLinksIncludeUnrelatedLinks.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Tue, 05 Sep 2006 00:29:59 +0200
parents 77665d8e2254
children c907c2942372
line wrap: on
line source
# -*- coding: iso-8859-1 -*-
"""
    MoinMoin - Load I18N Text

    This macro has the main purpose of supporting Help* page authors
    to insert the texts that a user actually sees on his screen into
    the description of the related features (which otherwise could
    get very confusing).

    @copyright: 2001 by Jürgen Hermann <jh@web.de>
    @license: GNU GPL, see COPYING for details.
"""

from MoinMoin import wikiutil

Dependencies = ["language"]

def execute(macro, args):
    """ Return a translation of args, or args as is """
    translation = macro.request.getText(args, formatted=False)

    return macro.formatter.text(translation)