[Zope3-checkins] SVN: Zope3/branches/3.3/src/zope/tal/tests/test_talinterpreter.py Added a test for automatic translation of inserted i18n Messages

Philipp von Weitershausen philikon at philikon.de
Sat May 20 09:04:51 EDT 2006


Log message for revision 68194:
  Added a test for automatic translation of inserted i18n Messages
  (I wasn't sure whether this was working now so I just wrote this test since
  I didn't find any other proof that it would, other than the code).
  

Changed:
  U   Zope3/branches/3.3/src/zope/tal/tests/test_talinterpreter.py

-=-
Modified: Zope3/branches/3.3/src/zope/tal/tests/test_talinterpreter.py
===================================================================
--- Zope3/branches/3.3/src/zope/tal/tests/test_talinterpreter.py	2006-05-20 13:03:52 UTC (rev 68193)
+++ Zope3/branches/3.3/src/zope/tal/tests/test_talinterpreter.py	2006-05-20 13:04:50 UTC (rev 68194)
@@ -154,6 +154,16 @@
             '<span i18n:translate="" tal:replace="foo"/>')
         self._check(program, 'FOOVALUE\n')
 
+        # i18n messages defined in Python are translated automatically
+        # (no i18n:translate necessary)
+        program, macros = self._compile(
+            '<span tal:content="foo" />')
+        self._check(program, '<span>FOOVALUE</span>\n')
+
+        program, macros = self._compile(
+            '<span tal:replace="foo" />')
+        self._check(program, 'FOOVALUE\n')
+
     def test_text_variable_translate(self):
         program, macros = self._compile(
             '<span tal:content="bar"/>')



More information about the Zope3-Checkins mailing list