%page args="x, y=_('Page arg 1'), z=_('Page arg 2')"/>
<%!
import random
def gettext(message): return message
_ = gettext
def ungettext(s, p, c):
if c == 1:
return s
return p
top = gettext('Begin')
%>
<%
# TRANSLATOR: Hi there!
hithere = _('Hi there!')
# TRANSLATOR: you should not be seeing this in the .po
rows = [[v for v in range(0,10)] for row in range(0,10)]
hello = _('Hello')
%>
% for row in (hithere, hello, _('Yo')):
${makerow(row)}
% endfor
${makerow(count=2)}
## TRANSLATOR: Ensure so and
## so, thanks
${_('The')} fuzzy ${ungettext('bunny', 'bunnies', random.randint(1, 2))}
<%def name="makerow(row=_('Babel'), count=1)">
% for i in range(count):
% for name in row:
| ${name} | \
% endfor
% endfor
%def>
<%def name="comment()">
%def>
<%call expr="comment">
P.S.
## TRANSLATOR: HTML comment
${_('Goodbye, really!')}
%call>