~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/macro/GetText.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mfrom: (0.9.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080622211713-fpo2zrq3s5dfecxg
Tags: 1.7.0-3
Simplify /etc/moin/wikilist format: "USER URL" (drop unneeded middle
CONFIG_DIR that was wrongly advertised as DATA_DIR).  Make
moin-mass-migrate handle both formats and warn about deprecation of
the old one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
    the description of the related features (which otherwise could
8
8
    get very confusing).
9
9
 
10
 
    @copyright: 2001 by J�rgen Hermann <jh@web.de>
 
10
    @copyright: 2001 Juergen Hermann <jh@web.de>
11
11
    @license: GNU GPL, see COPYING for details.
12
12
"""
13
13
 
14
 
from MoinMoin import wikiutil
15
 
 
16
14
Dependencies = ["language"]
17
15
 
18
 
def execute(macro, args):
 
16
def macro_GetText(macro, text=u''):
19
17
    """ Return a translation of args, or args as is """
20
 
    translation = macro.request.getText(args, formatted=False)
 
18
    translation = macro.request.getText(text)
21
19
 
22
20
    return macro.formatter.text(translation)
23
21