[Checkins] SVN: Sandbox/malthe/chameleon.zpt/src/chameleon/zpt/i18n.txt Adding translation test.
Malthe Borch
mborch at gmail.com
Thu Oct 2 15:03:11 EDT 2008
Log message for revision 91667:
Adding translation test.
Changed:
U Sandbox/malthe/chameleon.zpt/src/chameleon/zpt/i18n.txt
-=-
Modified: Sandbox/malthe/chameleon.zpt/src/chameleon/zpt/i18n.txt
===================================================================
--- Sandbox/malthe/chameleon.zpt/src/chameleon/zpt/i18n.txt 2008-10-02 18:16:39 UTC (rev 91666)
+++ Sandbox/malthe/chameleon.zpt/src/chameleon/zpt/i18n.txt 2008-10-02 19:03:10 UTC (rev 91667)
@@ -274,3 +274,23 @@
<span title="Mock translation of 'aid'.">Mock translation of 'tid'.</span>
<span>Mock translation of 'tid'.</span>
</div>
+
+Make sure translations play nice with loops.
+
+ >>> body = """\
+ ... <div xmlns="http://www.w3.org/1999/xhtml"
+ ... xmlns:i18n="http://xml.zope.org/namespaces/i18n"
+ ... xmlns:tal="http://xml.zope.org/namespaces/tal" i18n:domain="test">
+ ... <div tal:repeat="i range(1)">
+ ... <span i18n:translate="tid">Default</span>
+ ... </div>
+ ... </div>"""
+
+Not passing a language:
+
+ >>> print PageTemplate(body).render()
+ <div>
+ <div>
+ <span>Default</span>
+ </div>
+ </div>
More information about the Checkins
mailing list