comparison MoinMoin/macro/GetText2.py @ 1331:b7352ce35900

Fix GetText2 for incorrect parameters.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Sat, 19 Aug 2006 21:06:53 +0200
parents a36c70e5f0dd
children c907c2942372
comparison
equal deleted inserted replaced
1330:df88b475c1f0 1331:b7352ce35900
20 and the remaining elements are substituted in the message using string 20 and the remaining elements are substituted in the message using string
21 substitution. 21 substitution.
22 """ 22 """
23 sep = args[0] 23 sep = args[0]
24 args = unpackLine(args[1:], sep) 24 args = unpackLine(args[1:], sep)
25 translation = macro.request.getText(args[0], formatted=False) 25 if args:
26 translation = macro.request.getText(args[0], formatted=False)
27 else:
28 translation = u""
26 message = translation % tuple(args[1:]) 29 message = translation % tuple(args[1:])
27 30
28 return macro.formatter.text(message) 31 return macro.formatter.text(message)
29 32