[Zope-Checkins] SVN: Products.Five/branches/ajung-zpt-end-game/browser/tests/ add test that exercises the insertion of an i18n Message object

Philipp von Weitershausen philikon at philikon.de
Sat May 20 09:17:55 EDT 2006


Log message for revision 68197:
  add test that exercises the insertion of an i18n Message object
  

Changed:
  U   Products.Five/branches/ajung-zpt-end-game/browser/tests/i18n.pt
  A   Products.Five/branches/ajung-zpt-end-game/browser/tests/i18n.py
  U   Products.Five/branches/ajung-zpt-end-game/browser/tests/test_i18n.py

-=-
Modified: Products.Five/branches/ajung-zpt-end-game/browser/tests/i18n.pt
===================================================================
--- Products.Five/branches/ajung-zpt-end-game/browser/tests/i18n.pt	2006-05-20 13:12:54 UTC (rev 68196)
+++ Products.Five/branches/ajung-zpt-end-game/browser/tests/i18n.pt	2006-05-20 13:17:55 UTC (rev 68197)
@@ -8,5 +8,7 @@
 </table>
 <table summary="Explicit summary" title="Explicit title" i18n:attributes="summary explicit-summary; title explicit-title" >
 </table>
+<p tal:content="view/this_is_a_message">Text should be inserted here and translated automatically</p>
+<p tal:content="view/this_is_a_message" i18n:translate="">Text should be inserted here and translated</p>
 </body>
 </html>

Added: Products.Five/branches/ajung-zpt-end-game/browser/tests/i18n.py
===================================================================
--- Products.Five/branches/ajung-zpt-end-game/browser/tests/i18n.py	2006-05-20 13:12:54 UTC (rev 68196)
+++ Products.Five/branches/ajung-zpt-end-game/browser/tests/i18n.py	2006-05-20 13:17:55 UTC (rev 68197)
@@ -0,0 +1,7 @@
+from zope.i18nmessageid import MessageFactory
+_ = MessageFactory('fivetest')
+from Products.Five import BrowserView
+
+class I18nView(BrowserView):
+    this_is_a_message = _(u'This is a message')
+


Property changes on: Products.Five/branches/ajung-zpt-end-game/browser/tests/i18n.py
___________________________________________________________________
Name: svn:eol-style
   + native

Modified: Products.Five/branches/ajung-zpt-end-game/browser/tests/test_i18n.py
===================================================================
--- Products.Five/branches/ajung-zpt-end-game/browser/tests/test_i18n.py	2006-05-20 13:12:54 UTC (rev 68196)
+++ Products.Five/branches/ajung-zpt-end-game/browser/tests/test_i18n.py	2006-05-20 13:17:55 UTC (rev 68197)
@@ -34,6 +34,7 @@
       ...   <configure package="Products.Five.browser.tests">
       ...     <browser:page
       ...         for="OFS.interfaces.IFolder"
+      ...         class=".i18n.I18nView"
       ...         template="i18n.pt"
       ...         name="i18n.html"
       ...         permission="zope2.View"
@@ -73,6 +74,8 @@
       <table summary="Explizite Zusammenfassung"
              title="Expliziter Titel">
       </table>
+      <p>Dies ist eine Nachricht</p>
+      <p>Dies ist eine Nachricht</p>
       </body>
       </html>
       ...



More information about the Zope-Checkins mailing list