[Zope3-checkins] SVN: Zope3/trunk/ Disabled automatic translation of message id's in TAL.

Dmitry Vasiliev dima at hlabs.spb.ru
Thu May 19 06:30:35 EDT 2005


Log message for revision 30413:
  Disabled automatic translation of message id's in TAL.
  
  Changes:
  
      - tal:replace and i18n:translate="" now can use together. Actually
        tal:replace now is just a syntactic sugar for tal:content,
        tal:omit-tag="";
      - tal:content, tal:replace without i18n:translate="" now raises
        a DepricationWarning for MessageID/Message objects;
      - Fixed most PT's to use i18n:translate="". Also most changes
        of revision 30249 has been undone;
      - Fixed tal:replace="default" bug;
  
  Known issues:
  
      - TAL code needs to be cleaned up;
      - Possibly some other PT's should be fixed to use i18n:translate="";
  

Changed:
  U   Zope3/trunk/doc/CHANGES.txt
  U   Zope3/trunk/src/z3checkins/container.pt
  U   Zope3/trunk/src/z3checkins/container_sidebar.pt
  U   Zope3/trunk/src/z3checkins/message.pt
  U   Zope3/trunk/src/z3checkins/message_part.pt
  U   Zope3/trunk/src/z3checkins/message_sidebar.pt
  U   Zope3/trunk/src/z3checkins/rss_container.pt
  U   Zope3/trunk/src/zope/app/apidoc/codemodule/browser/class_index.pt
  U   Zope3/trunk/src/zope/app/apidoc/codemodule/browser/function_index.pt
  U   Zope3/trunk/src/zope/app/apidoc/codemodule/browser/module_index.pt
  U   Zope3/trunk/src/zope/app/apidoc/codemodule/browser/zcmlfile_index.pt
  U   Zope3/trunk/src/zope/app/apidoc/ifacemodule/iface_macros.pt
  U   Zope3/trunk/src/zope/app/applicationcontrol/browser/runtimeinfo.pt
  U   Zope3/trunk/src/zope/app/applicationcontrol/browser/translationdomaincontrol.pt
  U   Zope3/trunk/src/zope/app/applicationcontrol/browser/zodbcontrol.pt
  U   Zope3/trunk/src/zope/app/cache/browser/cacheableedit.pt
  U   Zope3/trunk/src/zope/app/cache/browser/ramedit.pt
  U   Zope3/trunk/src/zope/app/cache/browser/ramstats.pt
  U   Zope3/trunk/src/zope/app/component/browser/site_management.pt
  U   Zope3/trunk/src/zope/app/container/browser/add.pt
  U   Zope3/trunk/src/zope/app/container/browser/commontasks.pt
  U   Zope3/trunk/src/zope/app/container/browser/contents.pt
  U   Zope3/trunk/src/zope/app/container/browser/index.pt
  U   Zope3/trunk/src/zope/app/dublincore/browser/edit.pt
  U   Zope3/trunk/src/zope/app/file/browser/file_add.pt
  U   Zope3/trunk/src/zope/app/file/browser/file_upload.pt
  U   Zope3/trunk/src/zope/app/file/browser/image_edit.pt
  U   Zope3/trunk/src/zope/app/form/browser/add.pt
  U   Zope3/trunk/src/zope/app/form/browser/display.pt
  U   Zope3/trunk/src/zope/app/form/browser/edit.pt
  U   Zope3/trunk/src/zope/app/form/browser/editwizard.pt
  U   Zope3/trunk/src/zope/app/form/browser/objectwidget.pt
  U   Zope3/trunk/src/zope/app/form/browser/orderedSelectionList.pt
  U   Zope3/trunk/src/zope/app/form/browser/subedit.pt
  U   Zope3/trunk/src/zope/app/form/browser/widget_macros.pt
  U   Zope3/trunk/src/zope/app/pagetemplate/tests/test_binding.py
  U   Zope3/trunk/src/zope/app/rotterdam/template.pt
  U   Zope3/trunk/src/zope/app/rotterdam/template_tablelayout.pt
  U   Zope3/trunk/src/zope/app/rotterdam/view_macros.pt
  U   Zope3/trunk/src/zope/app/securitypolicy/browser/grant.pt
  U   Zope3/trunk/src/zope/app/securitypolicy/browser/granting.pt
  U   Zope3/trunk/src/zope/app/securitypolicy/browser/manage_access.pt
  U   Zope3/trunk/src/zope/app/securitypolicy/browser/manage_permissionform.pt
  U   Zope3/trunk/src/zope/app/securitypolicy/browser/manage_roleform.pt
  U   Zope3/trunk/src/zope/app/undo/undo_macros.pt
  U   Zope3/trunk/src/zope/app/workflow/stateful/browser/add.pt
  U   Zope3/trunk/src/zope/app/workflow/stateful/browser/addtransition.pt
  U   Zope3/trunk/src/zope/app/workflow/stateful/browser/contentworkflow_registry.pt
  U   Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_edit.pt
  U   Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_index.pt
  U   Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_states.pt
  U   Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_transitions.pt
  U   Zope3/trunk/src/zope/app/workflow/stateful/browser/filterTest.pt
  U   Zope3/trunk/src/zope/app/workflow/stateful/browser/instance_manage.pt
  U   Zope3/trunk/src/zope/app/workflow/stateful/browser/published_content.pt
  U   Zope3/trunk/src/zope/app/zopetop/widget_macros.pt
  U   Zope3/trunk/src/zope/app/zptpage/browser/inlinecode.pt
  U   Zope3/trunk/src/zope/tal/talgenerator.py
  U   Zope3/trunk/src/zope/tal/talgettext.py
  U   Zope3/trunk/src/zope/tal/talinterpreter.py
  A   Zope3/trunk/src/zope/tal/tests/input/test22.xml
  A   Zope3/trunk/src/zope/tal/tests/output/test22.xml
  U   Zope3/trunk/src/zope/tal/tests/test_htmltalparser.py
  U   Zope3/trunk/src/zope/tal/tests/test_talgettext.py
  U   Zope3/trunk/src/zope/tal/tests/test_talinterpreter.py

-=-
Modified: Zope3/trunk/doc/CHANGES.txt
===================================================================
--- Zope3/trunk/doc/CHANGES.txt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/doc/CHANGES.txt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -591,6 +591,10 @@
 
     Bug Fixes
 
+      - Disabled automatic translation of message id's in TAL.
+
+      - Fixed tal:replace="default" bug.
+
       - Fixed issue #380: Local Utility don't get correct removed
 
       - Fixed issue #369: DAV is broken on the trunk.

Modified: Zope3/trunk/src/z3checkins/container.pt
===================================================================
--- Zope3/trunk/src/z3checkins/container.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/z3checkins/container.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<title tal:content="view/title">Zope 3 Checkins</title>
+<title tal:content="view/title" i18n:translate="">Zope 3 Checkins</title>
 <style type="text/css">
   * { font-size: small; }
   h1 { font-size: medium; margin-bottom: 0.5ex; }
@@ -29,7 +29,7 @@
                   size python:int(request.get('size', '20'));
                   opt_size python:(size != 20) and '&amp;size=%d' % size or ''"
                   >
-<h1 tal:replace="view/title">Zope 3 Checkins</h1>
+<h1 tal:replace="view/title" i18n:translate="">Zope 3 Checkins</h1>
 
 <div class="toolbar"
      tal:define="first_batch python:start <= 0">
@@ -50,16 +50,17 @@
    tal:attributes="href view/archive_url"
    href="http://mail.zope.org/pipermail/zope3-checkins/">List archives</a>
 <a tal:condition="first_batch"
-   href="javascript:window.location.reload()">Refresh</a>
+   href="javascript:window.location.reload()" i18n:translate="">Refresh</a>
 <a tal:condition="not: first_batch"
-   tal:attributes="href request/URL">Latest checkins</a>
+   tal:attributes="href request/URL" i18n:translate="">Latest checkins</a>
 </div>
 
 <div class="navigation">
 <a tal:define="prev python:max(0, start - size)"
    tal:condition="python: start > 0"
    tal:attributes="href string:${request/URL}?start=${prev}${opt_size}"
-   >Previous <span tal:replace="size">20</span></a>
+   i18n:translate="">Previous <span i18n:name="count"
+   tal:replace="size">20</span></a>
 </div>
 
 <div tal:replace="structure view/renderCheckins" />
@@ -67,8 +68,9 @@
 <div class="navigation">
 <a tal:define="next python:start + size"
    tal:condition="python: next < view.count()"
-   tal:attributes="href string:${request/URL}?start=${next}${opt_size}">Next
-   <span tal:replace="size">20</span></a>
+   tal:attributes="href string:${request/URL}?start=${next}${opt_size}"
+   i18n:translate="">Next <span i18n:name="count"
+   tal:replace="size">20</span></a>
 </div>
 
 </body>

Modified: Zope3/trunk/src/z3checkins/container_sidebar.pt
===================================================================
--- Zope3/trunk/src/z3checkins/container_sidebar.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/z3checkins/container_sidebar.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -1,6 +1,6 @@
 <html>
 <head>
-<title tal:content="view/title">Zope 3 Checkins</title>
+<title tal:content="view/title" i18n:translate="">Zope 3 Checkins</title>
 <style type="text/css">
   * { font-size: small; }
   h1 { font-size: medium; margin-bottom: 0.5ex; }
@@ -25,25 +25,27 @@
                   start python:int(request.get('start', '0'));
                   size python:int(request.get('size', '20'));
                   opt_size python:(size != 20) and '&amp;size=%d' % size or ''">
-<h1 tal:replace="view/title">Zope 3 Checkins</h1>
+<h1 tal:replace="view/title" i18n:translate="">Zope 3 Checkins</h1>
 
 <div class="toolbar"
      tal:define="first_batch python:start <= 0">
 <a tal:condition="view/archive_url"
    tal:attributes="href view/archive_url"
    target="_content"
-   href="http://mail.zope.org/pipermail/zope3-checkins/">List archives</a>
+   href="http://mail.zope.org/pipermail/zope3-checkins/"
+   i18n:translate="">List archives</a>
 <a tal:condition="first_batch"
-   href="javascript:window.location.reload()">Refresh</a>
+   href="javascript:window.location.reload()" i18n:translate="">Refresh</a>
 <a tal:condition="not: first_batch"
-   tal:attributes="href request/URL">Newest checkins</a>
+   tal:attributes="href request/URL" i18n:translate="">Newest checkins</a>
 </div>
 
 <div class="navigation">
 <a tal:define="prev python:max(0, start - size)"
    tal:condition="python: start > 0"
-   tal:attributes="href string:${request/URL}?start=${prev}${opt_size}">Previous
-   <span tal:replace="size">20</span></a>
+   tal:attributes="href string:${request/URL}?start=${prev}${opt_size}"
+   i18n:translate="">Previous
+   <span i18n:name="count" tal:replace="size">20</span></a>
 </div>
 
 <div tal:replace="structure view/renderCheckins" />
@@ -51,8 +53,9 @@
 <div class="navigation">
 <a tal:define="next python:start + size"
    tal:condition="python: next < view.count()"
-   tal:attributes="href string:${request/URL}?start=${next}${opt_size}">Next
-   <span tal:replace="size">20</span></a>
+   tal:attributes="href string:${request/URL}?start=${next}${opt_size}"
+   i18n:translate="">Next
+   <span i18n:name="count" tal:replace="size">20</span></a>
 </div>
 
 </body>

Modified: Zope3/trunk/src/z3checkins/message.pt
===================================================================
--- Zope3/trunk/src/z3checkins/message.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/z3checkins/message.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -40,12 +40,14 @@
      class="icon" src="++resource++branch.png" alt="Branch"
      tal:attributes="title string:Branch: ${context/branch}"/>
 <div class="headers">
-<p><span class="header">From:</span>
+<p><span class="header" i18n:translate="">From:</span>
     <span class="value" tal:content="context/author_name" />
     &lt;<span class="value" tal:content="context/author_email" />&gt;
 </p>
-<p><span class="header">Date:</span> <span class="value" tal:content="context/date/@@rfc822" /></p>
-<p><span class="header">Subject:</span> <span class="value" tal:content="context/subject" /></p>
+<p><span class="header" i18n:translate="">Date:</span>
+    <span class="value" tal:content="context/date/@@rfc822" /></p>
+<p><span class="header" i18n:translate="">Subject:</span>
+    <span class="value" i18n:translate="" tal:content="context/subject" /></p>
 </div>
 <div class="body" tal:content="structure view/body" />
 </body>

Modified: Zope3/trunk/src/z3checkins/message_part.pt
===================================================================
--- Zope3/trunk/src/z3checkins/message_part.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/z3checkins/message_part.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -8,13 +8,14 @@
        tal:attributes="title string:Branch: ${context/branch}"/>
   <span class="date" tal:content="context/date/@@isodatetime" />:
   <span class="author" tal:content="context/author_name" />
-  - <span class="subject" tal:content="context/subject" />
+  - <span class="subject" i18n:translate="" tal:content="context/subject" />
 </a>
 <tal:if condition="context/log_message | nothing">
-<div class="same description" tal:condition="options/same_as_previous">
+<div class="same description" tal:condition="options/same_as_previous"
+    i18n:translate="">
 (Same as above)
 </div>
 <div class="description" tal:condition="not:options/same_as_previous"
-     tal:content="context/log_message" />
+     tal:content="context/log_message" i18n:translate=""/>
 </tal:if>
 </div>

Modified: Zope3/trunk/src/z3checkins/message_sidebar.pt
===================================================================
--- Zope3/trunk/src/z3checkins/message_sidebar.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/z3checkins/message_sidebar.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -11,10 +11,11 @@
   - <span class="subject" tal:content="context/subject" />
 </a>
 <tal:if condition="context/log_message | nothing">
-<div class="same description" tal:condition="options/same_as_previous">
+<div class="same description" tal:condition="options/same_as_previous"
+    i18n:translate="">
 (Same as above)
 </div>
 <div class="description" tal:condition="not:options/same_as_previous"
-     tal:content="context/log_message" />
+     tal:content="context/log_message" i18n:translate=""/>
 </tal:if>
 </div>

Modified: Zope3/trunk/src/z3checkins/rss_container.pt
===================================================================
--- Zope3/trunk/src/z3checkins/rss_container.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/z3checkins/rss_container.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -1,13 +1,18 @@
 <?xml version="1.0"?>
-<rss version="2.0" xmlns:tal="http://xml.zope.org/namespaces/tal">
+<rss version="2.0"
+    xmlns:tal="http://xml.zope.org/namespaces/tal"
+    xmlns:i18n="http://xml.zope.org/namespaces/i18n">
   <channel tal:define="webmaster context/webmaster_email | nothing">
-    <title tal:content="view/title">Zope 3 Checkins</title>
+    <title tal:content="view/title" i18n:translate="">Zope 3 Checkins</title>
     <link tal:content="string:${context/@@absolute_url}"></link>
-    <description tal:content="view/description" tal:condition="view/description">Latest Zope 3 Checkins</description>
+    <description tal:content="view/description"
+        tal:condition="view/description"
+        i18n:translate="">Latest Zope 3 Checkins</description>
     <language>en-us</language>
     <docs>http://backend.userland.com/rss</docs>
     <generator>z3checkins</generator>
     <webMaster tal:condition="webmaster" tal:content="webmaster" />
-<item tal:repeat="item view/checkins" tal:replace="structure item/@@rss|nothing" />
+    <item tal:repeat="item view/checkins"
+        tal:replace="structure item/@@rss|nothing" />
   </channel>
 </rss>

Modified: Zope3/trunk/src/zope/app/apidoc/codemodule/browser/class_index.pt
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/codemodule/browser/class_index.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/apidoc/codemodule/browser/class_index.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -8,7 +8,8 @@
   </h1>
 
   <div class="indent">
-    <div class="documentation" tal:content="structure view/getDoc">
+    <div class="documentation" i18n:translate=""
+        tal:content="structure view/getDoc">
       Here is the doc string
     </div>
   </div>
@@ -92,9 +93,9 @@
       <span class="small"
           tal:condition="python: attr['read_perm'] and attr['write_perm']">
         <i i18n:translate="">Permissions:</i>
-        <span tal:replace="attr/read_perm">zope.View</span>
+        <span tal:replace="attr/read_perm" i18n:translate="">zope.View</span>
             <span i18n:translate="">(read)</span>,
-        <span tal:replace="attr/write_perm">zope.View</span>
+        <span tal:replace="attr/write_perm" i18n:translate="">zope.View</span>
             <span i18n:translate="">(write)</span>
       </span>
     </li>
@@ -134,9 +135,9 @@
       <span class="small"
           tal:condition="python: method['read_perm'] and method['write_perm']">
         <i i18n:translate="">Permissions:</i>
-        <span tal:replace="method/read_perm">zope.View</span>
+        <span tal:replace="method/read_perm" i18n:translate="">zope.View</span>
             <span i18n:translate="">(read)</span>,
-        <span tal:replace="method/write_perm">zope.View</span>
+        <span tal:replace="method/write_perm" i18n:translate="">zope.View</span>
             <span i18n:translate="">(write)</span>
       </span>
     </li>

Modified: Zope3/trunk/src/zope/app/apidoc/codemodule/browser/function_index.pt
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/codemodule/browser/function_index.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/apidoc/codemodule/browser/function_index.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -26,7 +26,7 @@
   </div>
 
   <div 
-      tal:define="attributes view/getAttributes"      
+      tal:define="attributes view/getAttributes"
       tal:condition="attributes">
 
   <h2 class="details-section" i18n:translate="">Attributes</h2>
@@ -34,7 +34,7 @@
   <div class="indent">
 
     <ul class="attr-list">
-    
+
       <li tal:repeat="attr attributes">
         <b><code tal:content="attr/name">attr</code></b>
         <tal:omit-tag condition="not: attr/type_link">
@@ -43,8 +43,8 @@
         </tal:omit-tag>
         <tal:omit-tag condition="attr/type_link">
           (<span i18n:translate="">type:</span>
-          <a href="" 
-             tal:attributes="href 
+          <a href=""
+             tal:attributes="href
                  string:${view/getBaseURL}/Code/${attr/type_link}/index.html">
             <code tal:content="attr/type" /></a>)
         </tal:omit-tag>
@@ -52,7 +52,7 @@
         <i i18n:translate="">Value:</i>
         <code tal:content="attr/value">u''</code><br />
       </li>
-    
+
     </ul>
 
   </div>

Modified: Zope3/trunk/src/zope/app/apidoc/codemodule/browser/module_index.pt
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/codemodule/browser/module_index.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/apidoc/codemodule/browser/module_index.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -6,9 +6,9 @@
 
   <p class="breadcrumbs">
     <span tal:repeat="entry view/getBreadCrumbs">
-      <a href="" 
+      <a href=""
          tal:attributes="href string:${entry/url}/index.html"
-         tal:content="entry/name" />
+         tal:content="entry/name" i18n:translate=""/>
       <tal:omit-tag condition="not: repeat/entry/end">/</tal:omit-tag>
     </span>
   </p>
@@ -16,13 +16,14 @@
   <div class="highlight"
        tal:define="doc view/getDoc"
        tal:condition="doc"
-       tal:content="structure doc">
+       tal:content="structure doc"
+       i18n:translate="">
     Module Documentation
   </div>
 
 
   <table width="100%" valign="top"><tr>
-   
+
   <td tal:repeat="column view/getEntries"><ul>
     <li tal:repeat="entry column">
       <a href=""

Modified: Zope3/trunk/src/zope/app/apidoc/codemodule/browser/zcmlfile_index.pt
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/codemodule/browser/zcmlfile_index.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/apidoc/codemodule/browser/zcmlfile_index.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -3,7 +3,7 @@
   <style type="text/css" media="all">
 
 .directive {
-  font-family: monospace;  
+  font-family: monospace;
   padding: 1px;
   margin: 2px 0px;
 }
@@ -49,4 +49,4 @@
   <div tal:replace="structure context/rootElement/@@display" />
 
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: Zope3/trunk/src/zope/app/apidoc/ifacemodule/iface_macros.pt
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/ifacemodule/iface_macros.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/apidoc/ifacemodule/iface_macros.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -123,7 +123,7 @@
 
   <h3 class="details-section">
     <metal:block use-macro="context/@@apidoc_macros/displaySwitch" />
-    <span tal:content="type">Browser</span>
+    <span i18n:translate="" tal:content="type">Browser</span>
   </h3>
   <metal:block use-macro="context/@@apidoc_macros/display" >
   <div class="indent" metal:fill-slot="content">

Modified: Zope3/trunk/src/zope/app/applicationcontrol/browser/runtimeinfo.pt
===================================================================
--- Zope3/trunk/src/zope/app/applicationcontrol/browser/runtimeinfo.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/applicationcontrol/browser/runtimeinfo.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -10,7 +10,8 @@
      <div class="row">
        <div class="label" i18n:translate="">Uptime</div>
        <div class="field"
-            tal:content="runtime_info/Uptime">Time</div>
+            tal:content="runtime_info/Uptime"
+            i18n:translate="">Time</div>
      </div>
      <div class="row">
        <div class="label" i18n:translate="">System platform</div>

Modified: Zope3/trunk/src/zope/app/applicationcontrol/browser/translationdomaincontrol.pt
===================================================================
--- Zope3/trunk/src/zope/app/applicationcontrol/browser/translationdomaincontrol.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/applicationcontrol/browser/translationdomaincontrol.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -8,7 +8,7 @@
 
     <p tal:define="status view/reloadCatalogs"
          tal:condition="status"
-         tal:content="status" />
+         tal:content="status" i18n:translate=""/>
 
     <div tal:repeat="domainInfo view/getCatalogsInfo">
 

Modified: Zope3/trunk/src/zope/app/applicationcontrol/browser/zodbcontrol.pt
===================================================================
--- Zope3/trunk/src/zope/app/applicationcontrol/browser/zodbcontrol.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/applicationcontrol/browser/zodbcontrol.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -15,7 +15,8 @@
       <div class="row">
         <div class="label"
             i18n:translate="">Size of database</div>
-        <div class="field" tal:content="view/getSize">1.1 MB</div>
+        <div class="field" tal:content="view/getSize"
+            i18n:translate="">1.1 MB</div>
       </div>
 
       <div class="row" tal:define="status view/pack"

Modified: Zope3/trunk/src/zope/app/cache/browser/cacheableedit.pt
===================================================================
--- Zope3/trunk/src/zope/app/cache/browser/cacheableedit.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/cache/browser/cacheableedit.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -50,7 +50,7 @@
              i18n:attributes="value invalidate-cache-button" />
 
     </form>
-    <div tal:content="options/message|nothing" />
+    <div tal:content="options/message|nothing" i18n:translate="" />
 
   </div>
   </body>

Modified: Zope3/trunk/src/zope/app/cache/browser/ramedit.pt
===================================================================
--- Zope3/trunk/src/zope/app/cache/browser/ramedit.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/cache/browser/ramedit.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -53,7 +53,7 @@
            i18n:attributes="value save-changes-button" />
     <input type="reset" value="Reset" i18n:attributes="value reset-button" />
   </form>
-  <div tal:content="options/message|nothing" />
+  <div tal:content="options/message|nothing" i18n:translate="" />
 
 </div>
 </body>

Modified: Zope3/trunk/src/zope/app/cache/browser/ramstats.pt
===================================================================
--- Zope3/trunk/src/zope/app/cache/browser/ramstats.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/cache/browser/ramstats.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -35,7 +35,7 @@
     </tbody>
   </table>
 
-  <div tal:content="options/message|nothing" />
+  <div tal:content="options/message|nothing" i18n:translate="" />
 </div>
 </body>
 

Modified: Zope3/trunk/src/zope/app/component/browser/site_management.pt
===================================================================
--- Zope3/trunk/src/zope/app/component/browser/site_management.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/component/browser/site_management.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -10,7 +10,7 @@
   <div class="message"
        tal:define="message view/update"
        tal:condition="message"
-       tal:content="message">
+       tal:content="message" i18n:translate="">
     Status Message
   </div>
 
@@ -27,12 +27,12 @@
              tal:attributes="value tool/name" />
       <span 
           tal:content="tool/title"
-          tal:condition="not:tool/exists">
+          tal:condition="not:tool/exists" i18n:translate="">
         Authentication
       </span>
-      <a href="" style="color: green" 
+      <a href="" style="color: green"
           tal:content="tool/title"
-          tal:condition="tool/exists">
+          tal:condition="tool/exists" i18n:translate="">
         Authentication
       </a>
     </div>
@@ -43,16 +43,16 @@
      i18n:attributes="value UNINSTALL-SUBMIT">
   </form>
 
-  <form action="." method="post" 
+  <form action="." method="post"
       tal:repeat="tool view/getTools"
       tal:attributes="action string:#${tool/name}">
     <a name="" tal:attributes="name tool/name" />
     <input type="hidden" name="activeTool" value=""
            tal:attributes="value tool/name" />
     <h3>
-      <b tal:content="tool/title">Caches</b>
+      <b tal:content="tool/title" i18n:translate="">Caches</b>
     </h3>
-    <div tal:content="tool/description">
+    <div tal:content="tool/description" i18n:translate="">
       Description of the tool
     </div>
     <br/>
@@ -99,7 +99,7 @@
         <select name="type_name">
           <option tal:repeat="entry info"
                   tal:attributes="value entry/action"
-                  tal:content="entry/title">RAM Cache</option>
+                  tal:content="entry/title" i18n:translate="">RAM Cache</option>
         </select>
         &nbsp;
         <input type="submit" name="ADD-TOOL-SUBMIT" value="Add"

Modified: Zope3/trunk/src/zope/app/container/browser/add.pt
===================================================================
--- Zope3/trunk/src/zope/app/container/browser/add.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/container/browser/add.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -6,7 +6,8 @@
   <form method="post" action="action.html">
     <table class="TypeListing" cellpadding="3">
 
-      <caption tal:content="view/title | default">Add Content</caption>
+      <caption tal:content="view/title | default"
+        i18n:translate="">Add Content</caption>
 
       <tbody tal:define="infos view/addingInfo">
 
@@ -22,9 +23,10 @@
           <td class="TypeName">
             <label style="font-weight: bold;"
                    tal:attributes="for info/action">
-              <span tal:replace="info/title" >Folder</span>
+              <span tal:replace="info/title" i18n:translate="">Folder</span>
             </label>
-            <div class="TypeDescription" tal:content="info/description">
+            <div class="TypeDescription" tal:content="info/description"
+                i18n:translate="">
               Folders are generic containers for content, including other
               folders.
             </div>

Modified: Zope3/trunk/src/zope/app/container/browser/commontasks.pt
===================================================================
--- Zope3/trunk/src/zope/app/container/browser/commontasks.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/container/browser/commontasks.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -15,7 +15,7 @@
         tal:attributes="
           href string:${baseurl}/@@contents.html?type_name=${info/action};
           class info/selected"
-        tal:content="info/title">Folder
+        tal:content="info/title" i18n:translate="">Folder
       </a>
 
       <a href="#"
@@ -25,7 +25,7 @@
         tal:attributes="
           href string:${baseurl}/@@+/action.html?type_name=${info/action};
           class info/selected"
-        tal:content="info/title">Folder
+        tal:content="info/title" i18n:translate="">Folder
       </a>
 
       <a href="#"
@@ -34,7 +34,7 @@
         tal:attributes="
           href python: info['action'][3:];
           class info/selected"
-        tal:content="info/title">Folder
+        tal:content="info/title" i18n:translate="">Folder
       </a>
     </div>
   </tal:block>

Modified: Zope3/trunk/src/zope/app/container/browser/contents.pt
===================================================================
--- Zope3/trunk/src/zope/app/container/browser/contents.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/container/browser/contents.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -19,7 +19,8 @@
 
       <div class="page_error"
            tal:condition="view/error"
-           tal:content="view/error">
+           tal:content="view/error"
+           i18n:translate="">
         Error message
       </div>
 
@@ -41,7 +42,7 @@
 
         <metal:block tal:condition="view/hasAdding">
         <tr tal:define="names_required context/@@+/nameAllowed"
-	    tal:condition="python:names_required and request.has_key('type_name')">
+            tal:condition="python:names_required and request.has_key('type_name')">
           <td></td>
           <td><input name="new_value" id="focusid" value="" /></td>
           <td></td>
@@ -78,6 +79,7 @@
                      tal:attributes="href
                                  string:${url}/@@SelectedManagementView.html"
                      tal:content="item/id"
+                     i18n:translate=""
                      >foo</a
                   ><a href="#"
                      tal:attributes="href
@@ -96,19 +98,24 @@
                                  string:${request/URL}?retitle_id=${id_quoted}"
                  tal:condition="item/retitleable"
                  tal:content="item/title|default"
+                 i18n:translate=""
                  >&nbsp;&nbsp;&nbsp;&nbsp;</a>
               <span
                  tal:condition="item/plaintitle"
                  tal:content="item/title|default"
+                 i18n:translate=""
                  >&nbsp;&nbsp;&nbsp;&nbsp;</span>
             </td>
 
-            <td><span tal:content="item/size/sizeForDisplay|nothing">
+            <td><span tal:content="item/size/sizeForDisplay|nothing"
+                    i18n:translate="">
                       &nbsp;</span></td>
             <td><span tal:define="created item/created|default"
-                      tal:content="created">&nbsp;</span></td>
+                      tal:content="created"
+                      i18n:translate="">&nbsp;</span></td>
             <td><span tal:define="modified item/modified|default"
-                      tal:content="modified">&nbsp;</span></td>
+                      tal:content="modified"
+                      i18n:translate="">&nbsp;</span></td>
           </tr>
         </metal:block>
 
@@ -147,11 +154,11 @@
                          names_required adding/nameAllowed"
              tal:condition="adding/isSingleMenuItem">
           <input type="submit" name="container_add_button" value="Add"
-	         i18n:attributes="value add-button"
+                 i18n:attributes="value add-button"
                  i18n:domain="zope"
                />
           <input type="text" name="single_new_value" id="focusid"
-		 tal:condition="python:names_required and not has_custom_add_view"
+                 tal:condition="python:names_required and not has_custom_add_view"
                  i18n:domain="zope"
                />
           <input type="hidden" name="single_type_name"
@@ -176,7 +183,7 @@
 
     <script type="text/javascript"><!--
         if (document.containerContentsForm.new_value)
-	        document.containerContentsForm.new_value.focus();
+            document.containerContentsForm.new_value.focus();
         //-->
     </script>
 

Modified: Zope3/trunk/src/zope/app/container/browser/index.pt
===================================================================
--- Zope3/trunk/src/zope/app/container/browser/index.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/container/browser/index.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -16,7 +16,7 @@
 <body>
 <div metal:fill-slot="body">
 
-  <table  
+  <table
       id="sortable" class="listing" summary="Content listing"
       cellpadding="2" cellspacing="0"
       i18n:attributes="summary">
@@ -30,49 +30,37 @@
         <th i18n:translate="">Modified</th>
       </tr>
     </thead>
-  
+
     <tbody>
-  
+
       <tr tal:repeat="info view/listContentInfo">
-        <td> 
-          <a 
-              href="#" 
+        <td>
+          <a
+              href="#"
               tal:attributes="href info/url"
               tal:content="structure info/icon|default" />
         </td>
-  
+
         <td class="ContentTitle">
           <a href="subfolder_id"
              tal:attributes="href info/url"
              tal:content="info/id"
+             i18n:translate=""
           >ID here</a>
         </td>
 
-        <td><span tal:content="info/title|default">&nbsp;</span></td>
-        <td><span tal:content="info/created|default">&nbsp;</span></td>
-        <td><span tal:content="info/modified|default">&nbsp;</span></td>
-  
+        <td><span tal:content="info/title|default"
+            i18n:translate="">&nbsp;</span></td>
+        <td><span tal:content="info/created|default"
+            i18n:translate="">&nbsp;</span></td>
+        <td><span tal:content="info/modified|default"
+            i18n:translate="">&nbsp;</span></td>
+
       </tr>
-  
-      <tr tal:condition="nothing">
-  
-        <td class="ContentIcon">
-          <img alt="Document" src="../../ZMI/www/document_icon.gif" />
-        </td>
-  
-        <td class="ContentTitle">
-           <a href="document_id">Document Title or ID here</a>
-        </td>
-  
-      </tr>
     </tbody>
-  
+
   </table>
 
 </div>
 </body>
 </html>
-
-
-
-

Modified: Zope3/trunk/src/zope/app/dublincore/browser/edit.pt
===================================================================
--- Zope3/trunk/src/zope/app/dublincore/browser/edit.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/dublincore/browser/edit.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -11,7 +11,7 @@
 
     <p tal:condition="data/message"
        tal:content="data/message" 
-       >Message here</p>
+       i18n:translate="">Message here</p>
 
     <div class="row">
       <div class="label" i18n:translate="">Title</div>

Modified: Zope3/trunk/src/zope/app/file/browser/file_add.pt
===================================================================
--- Zope3/trunk/src/zope/app/file/browser/file_add.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/file/browser/file_add.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -8,7 +8,8 @@
 
     <h3 i18n:translate="">Add a File</h3>
 
-    <div tal:define="errors view/errors" tal:content="errors" />
+    <div tal:define="errors view/errors" tal:content="errors"
+        i18n:translate=""/>
 
     <div class="row">
       <div class="label">

Modified: Zope3/trunk/src/zope/app/file/browser/file_upload.pt
===================================================================
--- Zope3/trunk/src/zope/app/file/browser/file_upload.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/file/browser/file_upload.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -8,7 +8,8 @@
 
     <h3 i18n:translate="">Upload a file</h3>
 
-    <div tal:define="errors view/errors" tal:content="errors" />
+    <div tal:define="errors view/errors" tal:content="errors"
+        i18n:translate=""/>
 
     <div class="row">
       <div class="label">

Modified: Zope3/trunk/src/zope/app/file/browser/image_edit.pt
===================================================================
--- Zope3/trunk/src/zope/app/file/browser/image_edit.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/file/browser/image_edit.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -5,12 +5,13 @@
 
   <div metal:use-macro="view/generated_form/macros/body">
 
-  <form action=".">   
+  <form action=".">
 
     <table metal:fill-slot="extra_top">
       <tr>
         <td i18n:translate="">Size</td>
-        <td tal:content="view/size">103 x 45 pixels, 43KB</td>            
+        <td tal:content="view/size"
+            i18n:translate="">103 x 45 pixels, 43KB</td>
       </tr>
     </table>
 

Modified: Zope3/trunk/src/zope/app/form/browser/add.pt
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/add.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/form/browser/add.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -13,11 +13,13 @@
         <h3 tal:condition="view/label"
             tal:content="view/label"
             metal:define-slot="heading"
+            i18n:translate=""
             >Edit something</h3>
 
         <p tal:define="status view/update"
            tal:condition="status"
-           tal:content="status" />
+           tal:content="status" 
+           i18n:translate=""/>
 
         <p tal:condition="view/errors" i18n:translate="">
           There are <strong tal:content="python:len(view.errors)"
@@ -71,4 +73,3 @@
   </body>
 
 </html>
-

Modified: Zope3/trunk/src/zope/app/form/browser/display.pt
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/display.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/form/browser/display.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -9,6 +9,7 @@
     <h3 tal:condition="view/label"
         tal:content="view/label"
         metal:define-slot="heading"
+        i18n:translate=""
         >Display something</h3>
 
     <div metal:define-slot="extra_info" tal:replace="nothing">

Modified: Zope3/trunk/src/zope/app/form/browser/edit.pt
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/edit.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/form/browser/edit.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -14,11 +14,13 @@
         <h3 tal:condition="view/label"
             tal:content="view/label"
             metal:define-slot="heading"
+            i18n:translate=""
             >Edit something</h3>
 
         <p tal:define="status view/update"
            tal:condition="status"
-           tal:content="status" />
+           tal:content="status" 
+           i18n:translate=""/>
 
         <p tal:condition="view/errors" i18n:translate="">
           There are <strong tal:content="python:len(view.errors)"
@@ -33,11 +35,11 @@
           <div class="label">Extra top</div>
           <div class="field"><input type="text" style="width:100%" /></div>
         </div>
-        
+
         <div metal:use-macro="context/@@form_macros/widget_rows" />
-        
+
         <div class="separator"></div>
-        
+
         <div class="row"
              metal:define-slot="extra_bottom" tal:replace="nothing">
           <div class="label">Extra bottom</div>

Modified: Zope3/trunk/src/zope/app/form/browser/editwizard.pt
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/editwizard.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/form/browser/editwizard.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -14,6 +14,7 @@
             <h3 tal:condition="view/label"
                 tal:content="view/label"
                 metal:define-slot="heading"
+                i18n:translate=""
                 >Edit something</h3>
 
                 <p tal:condition="view/feedback" tal:content="view/feedback" />

Modified: Zope3/trunk/src/zope/app/form/browser/objectwidget.pt
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/objectwidget.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/form/browser/objectwidget.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -1,5 +1,6 @@
 <fieldset>
-  <legend tal:content="context/legendTitle">The Legend</legend>
+  <legend tal:content="context/legendTitle"
+        i18n:translate="">The Legend</legend>
   <div class="row" tal:repeat="widget context/subwidgets">
     <metal:block use-macro="context/@@form_macros/widget_row" />
   </div>

Modified: Zope3/trunk/src/zope/app/form/browser/orderedSelectionList.pt
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/orderedSelectionList.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/form/browser/orderedSelectionList.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -139,7 +139,7 @@
                           id string:${view/name}.from">
         <option tal:repeat="entry view/choices"
                 tal:attributes="value entry/value"
-                tal:content="entry/text" />
+                tal:content="entry/text" i18n:translate=""/>
       </select>
     </td>
     <td>
@@ -159,7 +159,7 @@
                           id string:${view/name}.to">
         <option tal:repeat="entry view/selected"
                 tal:attributes="value entry/value"
-                tal:content="entry/text" />
+                tal:content="entry/text" i18n:translate=""/>
       </select>
       <input name="foo-empty-marker" type="hidden"
         tal:attributes="name string:${view/name}-empty-marker"/>
@@ -187,4 +187,3 @@
     </td>
   </tr>
 </table>
-

Modified: Zope3/trunk/src/zope/app/form/browser/subedit.pt
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/subedit.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/form/browser/subedit.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -2,25 +2,25 @@
   <h5 metal:define-slot="heading">
     <a tal:attributes="href context/@@absolute_url"
        tal:condition="view/label"
-       tal:content="view/label">
+       tal:content="view/label" i18n:translate="">
          Edit something
     </a>
   </h5>
   <p tal:condition="view/fulledit_label">
     <a tal:attributes="href
          string:${context/@@absolute_url}/${view/fulledit_path}"
-       tal:content="view/fulledit_label">Full edit</a>
+       tal:content="view/fulledit_label" i18n:translate="">Full edit</a>
   </p>
   <p tal:define="status view/update"
      tal:condition="status"
-     tal:content="status" />
+     tal:content="status" i18n:translate=""/>
 
   <div tal:condition="view/errors">
      <ul>
         <li tal:repeat="error view/errors">
            <strong tal:content="error/__class__">
               Error Type</strong>:
-           <span tal:content="error">Error text</span>
+           <span tal:content="error" i18n:translate="">Error text</span>
         </li>
      </ul>
   </div>
@@ -32,9 +32,9 @@
       <div class="label">Extra top</div>
       <div class="field"><input type="text" style="width:100%" /></div>
   </div>
-  
+
   <div metal:use-macro="context/@@form_macros/widget_rows" />
-  
+
   <div class="row"
        metal:define-slot="extra_bottom" tal:replace="nothing">
       <div class="label">Extra bottom</div>

Modified: Zope3/trunk/src/zope/app/form/browser/widget_macros.pt
===================================================================
--- Zope3/trunk/src/zope/app/form/browser/widget_macros.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/form/browser/widget_macros.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -6,10 +6,10 @@
           <div class="label">
             <label for="field.name" title="The widget's hint"
               tal:attributes="for widget/name; title widget/hint"
-              tal:content="widget/label">The Label</label>
+              tal:content="widget/label" i18n:translate="">The Label</label>
           </div>
           <tal:block define="error widget/error"
-            condition="error" content="structure error">
+            condition="error" content="structure error" i18n:translate="">
             The Error
           </tal:block>
           <div class="field" tal:content="structure widget">

Modified: Zope3/trunk/src/zope/app/pagetemplate/tests/test_binding.py
===================================================================
--- Zope3/trunk/src/zope/app/pagetemplate/tests/test_binding.py	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/pagetemplate/tests/test_binding.py	2005-05-19 10:30:35 UTC (rev 30413)
@@ -34,7 +34,7 @@
         comp = PTComponent(Content(), TestRequest())
         self.assertEqual(comp.index(), "42\n")
         self.assertEqual(comp.nothing(), "\n")
-        self.assertEqual(comp.default(), "<span>42</span>\n")
+        self.assertEqual(comp.default(), "42\n")
 
 def test_suite():
     return unittest.makeSuite(BindingTestCase)

Modified: Zope3/trunk/src/zope/app/rotterdam/template.pt
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/template.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/rotterdam/template.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -112,7 +112,7 @@
           <a href=""
             tal:attributes="href view/action;
                             class view/selected;"
-            tal:content="view/title">
+            tal:content="view/title" i18n:translate="">
             label
           </a>
         </tal:block>
@@ -130,7 +130,7 @@
 					><a href="#"
                tal:repeat="info actions"
                tal:attributes="href info/action"
-               tal:content="info/title">
+               tal:content="info/title" i18n:translate="">
               Action name
           </a></span
 				><span tal:condition="help_actions"
@@ -151,7 +151,7 @@
                                            + url + ','
                                            + name + ','
                                            + settings +')'"
-               tal:content="help_info/title">
+               tal:content="help_info/title" i18n:translate="">
               Action name
           </a></span>
       </div>

Modified: Zope3/trunk/src/zope/app/rotterdam/template_tablelayout.pt
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/template_tablelayout.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/rotterdam/template_tablelayout.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -112,8 +112,8 @@
                         <tal:block repeat="view context/@@view_get_menu/zmi_views">
                             <a href=""
                                 tal:attributes="href view/action;
-                                                                class view/selected;"
-                                tal:content="view/title">
+                                    class view/selected;"
+                                tal:content="view/title" i18n:translate="">
                                 label
                             </a>
                         </tal:block>
@@ -129,7 +129,8 @@
                             <li tal:condition="actions" tal:repeat="info actions"
                                 ><a href="#"
                                          tal:attributes="href info/action"
-                                         tal:content="info/title">
+                                         tal:content="info/title"
+                                         i18n:translate="">
                                         Action name
                                 </a></li>
                             <li tal:condition="help_actions" tal:repeat="help_info help_actions"
@@ -148,7 +149,8 @@
                                                                                              + url + ','
                                                                                              + name + ','
                                                                                              + settings +')'"
-                                     tal:content="help_info/title">
+                                     tal:content="help_info/title"
+                                     i18n:translate="">
                                     Action name
                                 </a></li>
                         </ul>

Modified: Zope3/trunk/src/zope/app/rotterdam/view_macros.pt
===================================================================
--- Zope3/trunk/src/zope/app/rotterdam/view_macros.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/rotterdam/view_macros.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -5,6 +5,7 @@
   <title 
     metal:define-slot="title"
     tal:content="options/getTitle|view/getTitle|context/getTitle|default"
+    i18n:translate=""
     >Zope</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <link href="/@@/zopetopBasic.css" rel="stylesheet" type="text/css"
@@ -21,7 +22,7 @@
   <table metal:define-macro="zmi_tabs"><tr>
     <td tal:repeat="view context/@@view_get_menu/zmi_views">
     <a href="" tal:attributes="href view/action" tal:content="view/title"
-       >label</a>
+       i18n:translate="">label</a>
     <tal:block condition="not: repeat/view/end">'</tal:block>
     </td>
    </tr></table>

Modified: Zope3/trunk/src/zope/app/securitypolicy/browser/grant.pt
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/browser/grant.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/securitypolicy/browser/grant.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -12,11 +12,11 @@
 <div metal:fill-slot="body">
 
   <p>
-    <a href="@@AllRolePermissions.html" 
+    <a href="@@AllRolePermissions.html"
        i18n:translate="">Grant permissions to roles</a>
   </p>
   <p>
-    <a href="@@PrincipalRoles.html" 
+    <a href="@@PrincipalRoles.html"
        i18n:translate="">Grant roles to principals</a>
   </p>
 

Modified: Zope3/trunk/src/zope/app/securitypolicy/browser/granting.pt
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/browser/granting.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/securitypolicy/browser/granting.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -5,7 +5,7 @@
   <h2 i18n:translate="">Granting Roles and Permissions to Principals</h2>
   <p tal:define="status view/status"
      tal:condition="status"
-     tal:content="status" />
+     tal:content="status" i18n:translate=""/>
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
   &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 
@@ -34,7 +34,8 @@
                   <div class="label">
                     <label for="field.name" title="The widget's hint"
                            tal:attributes="for widget/name; title widget/hint"
-                           tal:content="widget/label">The Label</label>
+                           tal:content="widget/label"
+                           i18n:translate="">The Label</label>
                   </div>
                 </td>
                 <tal:block tal:content="structure widget">
@@ -59,7 +60,8 @@
                   <div class="label">
                     <label for="field.name" title="The widget's hint"
                            tal:attributes="for widget/name; title widget/hint"
-                           tal:content="widget/label">The Label</label>
+                           tal:content="widget/label"
+                           i18n:translate="">The Label</label>
                   </div>
                 </td>
                 <tal:block tal:content="structure widget">

Modified: Zope3/trunk/src/zope/app/securitypolicy/browser/manage_access.pt
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/browser/manage_access.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/securitypolicy/browser/manage_access.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -1,6 +1,6 @@
 <html metal:use-macro="context/@@standard_macros/dialog" i18n:domain="zope">
 <head>
-  <tal:block  
+  <tal:block
       metal:fill-slot="headers" 
       tal:define="global pagetip string:
       For each permission you want to grant (or deny) to a role, 
@@ -15,13 +15,13 @@
 
    <p tal:define="status view/update"
       tal:condition="status"
-      tal:content="status" />
+      tal:content="status" i18n:translate=""/>
 
   <form action="AllRolePermissions.html" method="POST">
 
-    <table width="100%" cellspacing="0" cellpadding="2" border="0" 
+    <table width="100%" cellspacing="0" cellpadding="2" border="0"
            nowrap="nowrap">
-  
+
       <tr class="list-header">
         <td align="left" valign="top">
           <div class="form-label">
@@ -34,7 +34,7 @@
           </div>
         </td>
       </tr>
-  
+
       <tr class="row-normal">
         <td></td>
         <td align="center" tal:repeat="role view/roles">
@@ -42,16 +42,16 @@
             <a href="RolePermissions.html"
               tal:attributes="
               href string:RolePermissions.html?role_to_manage=${role/id}" 
-              tal:content="role/title">Anonymous</a>
+              tal:content="role/title" i18n:translate="">Anonymous</a>
             <input type="hidden" name="r0" value=""
               tal:attributes="
               name string:r${repeat/role/index};
               value  string:${role/id}" />
-  
+
           </div>
         </td>
       </tr>
-  
+
       <tbody tal:repeat="perm view/permissionRoles">
       <tr class="row-normal"
           tal:attributes="class 
@@ -59,10 +59,10 @@
         <td align="left" nowrap="nowrap">
           <div class="list-item">
              <a href="RolesWithPermission.html"
-                tal:attributes="href 
+                tal:attributes="href
            string:RolesWithPermission.html?permission_to_manage=${perm/id}"
                 tal:content="perm/title"
-                >Access Transient Objects</a>
+                i18n:translate="">Access Transient Objects</a>
              <input type="hidden" name="r0" value=""
                  tal:attributes="
                  name string:p${repeat/perm/index};
@@ -71,7 +71,7 @@
         </td>
         <td align="center" tal:repeat="setting perm/roleSettings">
           <select name="p0r0"
-              tal:attributes="name 
+              tal:attributes="name
                   string:p${repeat/perm/index}r${repeat/setting/index}">
             <option value="Unset"
                 tal:repeat="option view/availableSettings"
@@ -82,7 +82,7 @@
         </td>
       </tr>
       </tbody>
-  
+
       <tr>
         <td colspan="5" align="left">
           <div class="form-element">
@@ -97,5 +97,3 @@
 </div>
 </body>
 </html>
-
-

Modified: Zope3/trunk/src/zope/app/securitypolicy/browser/manage_permissionform.pt
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/browser/manage_permissionform.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/securitypolicy/browser/manage_permissionform.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -7,7 +7,7 @@
       background-color: #ffffff;
       border: none;
     }
-    
+
     .row-hilite {
       background-color: #efefef;
       border: none;
@@ -32,8 +32,8 @@
     <p class="form-text" i18n:translate="">
       Roles assigned to the permission
       <strong tal:content="perm/title" 
-          i18n:name="perm_title">Change DTML Methods</strong>
-      (id: <strong tal:content="perm/id" 
+          i18n:name="perm_title" i18n:translate="">Change DTML Methods</strong>
+      (id: <strong tal:content="perm/id"
           i18n:name="perm_id">Zope.Some.Permission</strong>)
     </p>
 
@@ -62,7 +62,7 @@
 
             <tr class="row-normal"
                 tal:repeat="setting perm/roleSettings"
-                tal:attributes="class 
+                tal:attributes="class
           python:path('repeat/setting/even') and 'row-normal' or 'row-hilite'">
               <td align="left" valign="top"
                   tal:define="ir repeat/setting/index"
@@ -75,7 +75,8 @@
                        tal:repeat="option view/availableSettings"
                        tal:attributes="value option/id;
                                        selected python:setting == option['id']"
-                       tal:content="option/shorttitle">+</option>
+                       tal:content="option/shorttitle"
+                       i18n:translate="">+</option>
                 </select>
               </td>
             </tr>

Modified: Zope3/trunk/src/zope/app/securitypolicy/browser/manage_roleform.pt
===================================================================
--- Zope3/trunk/src/zope/app/securitypolicy/browser/manage_roleform.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/securitypolicy/browser/manage_roleform.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -5,7 +5,7 @@
 
   <p tal:define="status view/update"
      tal:condition="status"
-     tal:content="status" />
+     tal:content="status" i18n:translate=""/>
 
 
   <div tal:define="role 
@@ -13,10 +13,11 @@
 
     <p class="form-help" i18n:translate="">
       This page shows the permissions allowed and denied the role
-        <strong tal:content="role/title" 
-                i18n:name="role_title">Great Master Guru</strong>
-        (id: <strong tal:content="role/id" 
-                i18n:name="role_id">Zope.Some.Role</strong>).  
+        <strong tal:content="role/title"
+                i18n:name="role_title"
+                i18n:translate="">Great Master Guru</strong>
+        (id: <strong tal:content="role/id"
+                i18n:name="role_id">Zope.Some.Role</strong>).
       To change settings, simply select different permissions in the
       Allow or Deny lists. Make sure you don't select the same
         permission in both lists though.
@@ -36,7 +37,8 @@
           <td align="left" valign="top"
               tal:repeat="setting availableSettings">
             <div class="form-label">
-              <strong tal:content="setting/title">Allow</strong>
+              <strong tal:content="setting/title"
+                    i18n:translate="">Allow</strong>
             </div>
           </td>
         </tr>
@@ -50,7 +52,8 @@
                       tal:attributes="name string:${setting}:list">
               <option tal:repeat="permissioninfo role/permissionsInfo"
                       tal:content="permissioninfo/title"
-                      tal:attributes="selected 
+                      i18n:translate=""
+                      tal:attributes="selected
                          python:path('permissioninfo/setting') == setting;
                                       value permissioninfo/id"
                       >Sample Permission</option>

Modified: Zope3/trunk/src/zope/app/undo/undo_macros.pt
===================================================================
--- Zope3/trunk/src/zope/app/undo/undo_macros.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/undo/undo_macros.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -14,7 +14,7 @@
   <span tal:condition="showall">
     <p>
       <span i18n:translate="">You are looking at transactions
-      regardless of location.</span> <a href="?" 
+      regardless of location.</span> <a href="?"
       i18n:translate="">View only transactions in this location</a>.
     </p>
   </span>
@@ -22,7 +22,7 @@
   <span tal:condition="not:showall">
     <p>
       <span i18n:translate="">You are looking only at transactions
-      from this location.</span> <a href="?showall=true" 
+      from this location.</span> <a href="?showall=true"
       i18n:translate="">View transactions regardless of location</a>.
     </p>
   </span>
@@ -57,7 +57,7 @@
                  tal:attributes="value item/id" />
         </td>
 
-	<td tal:define="location item/location | nothing">
+    <td tal:define="location item/location | nothing">
           <tal:location replace="location" />
           <tal:if condition="not:location"
                   i18n:translate="label-not-available">not available</tal:if>
@@ -83,7 +83,8 @@
         </td>
 
         <td>
-          <tal:description replace="item/description | nothing" />
+          <tal:description i18n:translate=""
+            replace="item/description | nothing" />
           <tal:if condition="not:item/description"
                   i18n:translate="label-not-available">not available</tal:if>
         </td>
@@ -117,10 +118,9 @@
 </p>
 
 <p metal:define-macro="submit_button">
-  <input type="submit" value="Undo" 
+  <input type="submit" value="Undo"
          i18n:attributes="value undo-button" />
 </p>
 
 </body>
 </html>
-

Modified: Zope3/trunk/src/zope/app/workflow/stateful/browser/add.pt
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/browser/add.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/workflow/stateful/browser/add.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -19,9 +19,10 @@
           <td class="TypeName">
             <label style="font-weight: bold;"
                    tal:attributes="for info/action">
-              <span tal:replace="info/title" >Folder</span>
+              <span tal:replace="info/title" i18n:translate="">Folder</span>
             </label>
-            <div class="TypeDescription" tal:content="info/description">
+            <div class="TypeDescription" tal:content="info/description"
+                i18n:translate="">
               Folders are generic containers for content, including other
               folders.
             </div>
@@ -36,7 +37,7 @@
 
           <td class="Selector">
             <input type="radio" name="type_name" value="" />
-                   
+
           </td>
 
           <td class="TypeName">

Modified: Zope3/trunk/src/zope/app/workflow/stateful/browser/addtransition.pt
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/browser/addtransition.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/workflow/stateful/browser/addtransition.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -5,7 +5,7 @@
 
 <body>
 <div metal:fill-slot="body">
- 
+
   <form action="." method="post" enctype="multipart/form-data">
 
     <div class="row">
@@ -20,7 +20,7 @@
       <div class="field">
         <select name="source">
           <option tal:repeat="state states"
-                  tal:content="state" />
+                  tal:content="state" i18n:translate=""/>
         </select>
       </div>
     </div>
@@ -30,7 +30,7 @@
       <div class="field">
         <select name="destination">
           <option tal:repeat="state states"
-                  tal:content="state" />
+                  tal:content="state" i18n:translate=""/>
         </select>
       </div>
     </div>
@@ -58,7 +58,7 @@
     </div>
 
   </form>
- 
+
 </div> 
 </body>
 </html>

Modified: Zope3/trunk/src/zope/app/workflow/stateful/browser/contentworkflow_registry.pt
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/browser/contentworkflow_registry.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/workflow/stateful/browser/contentworkflow_registry.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -4,13 +4,13 @@
     Process Definition <-> Content Type Registry
   </title>
 </head>
- 
+
 <body>
 <div metal:fill-slot="body">
- 
+
   <p tal:define="status view/update"
      tal:condition="status"
-     tal:content="status" />
+     tal:content="status" i18n:translate=""/>
 
   <p i18n:translate="">
     This screen let's you specify which content types (by interface) can
@@ -18,11 +18,11 @@
 
   <form action="." method="post">
     <h3 i18n:translate="">Available Mappings</h3>
-     
+
     <ul tal:condition="view/process_based">
       <input type="hidden" name="other_view" value="0"/>
       <li tal:repeat="process view/getProcessInterfacesMapping">
-        <b tal:content="process/name" /><br/>
+        <b tal:content="process/name" i18n:translate=""/><br/>
         <tal:block repeat="iface process/ifaces">
           <input type="checkbox" name="mappings:list"
             tal:attributes="value string:${process/name}:${iface}">
@@ -38,7 +38,7 @@
         <tal:block repeat="name iface/names">
           <input type="checkbox" name="mappings:list"
             tal:attributes="value string:${name}:${iface/iface}">
-          <d tal:replace="name"/><br/>
+          <d tal:replace="name" i18n:translate=""/><br/>
         </tal:block>
       </li>
     </ul>
@@ -53,15 +53,15 @@
     </div>
 
     <h3 i18n:translate="">Add new Mapping</h3>
-    
+
     <div class="row" tal:define="widget nocall:view/iface_widget">
       <metal:block use-macro="context/@@form_macros/widget_row" />
     </div>
-    
+
     <div class="row" tal:define="widget nocall:view/name_widget">
       <metal:block use-macro="context/@@form_macros/widget_row" />
     </div>
-    
+
     <div class="row">
       <div class="controls"> 
          <input type="submit" value="Add Mappings" name="ADD"
@@ -69,7 +69,7 @@
        </div>
     </div>
   </form>
- 
+
 </div>
-</body> 
+</body>
 </html>

Modified: Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_edit.pt
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_edit.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_edit.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -10,7 +10,7 @@
 
   <p tal:define="status view/update"
      tal:condition="status"
-     tal:content="status" />
+     tal:content="status" i18n:translate=""/>
 
   <form action="./@@edit.html" method="post">
     <h3 i18n:translate="">Set Workflow-Relevant Data Schema</h3>
@@ -33,8 +33,8 @@
       <h3 i18n:translate="">Map permissions to Schema fields</h3>
 
       <tal:block repeat="pwidget widgets">
-        <h5 tal:content="string:${pwidget/fieldTitle} (${pwidget/fieldName})">
-          FieldName (Field Title)
+        <h5><tal:block tal:replace="pwidget/fieldTitle" i18n:translate=""/>
+        (<tal:block tal:replace="pwidget/fieldName" i18n:translate=""/>)
         </h5>
 
         <div class="row" tal:define="widget nocall:pwidget/getter">

Modified: Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_index.pt
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_index.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_index.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -9,10 +9,10 @@
 <div metal:fill-slot="body">
 
   <p i18n:translate="">
-    Process Definition: 
-    <tal:block tal:replace="view/getName" i18n:name="name"/>
+    Process Definition:
+    <tal:block tal:replace="view/getName" i18n:name="name" i18n:translate=""/>
   </p>
- 
-</div> 
+
+</div>
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_states.pt
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_states.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_states.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -8,7 +8,7 @@
 <div metal:fill-slot="body">
 
   <p i18n:translate="">States</p>
- 
-</div> 
+
+</div>
 </body>
 </html>

Modified: Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_transitions.pt
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_transitions.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/workflow/stateful/browser/definition_transitions.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -8,7 +8,7 @@
 <div metal:fill-slot="body">
 
   <p i18n:translate="">Transitions</p>
- 
-</div> 
+
+</div>
 </body>
 </html>

Modified: Zope3/trunk/src/zope/app/workflow/stateful/browser/filterTest.pt
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/browser/filterTest.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/workflow/stateful/browser/filterTest.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -12,7 +12,3 @@
 </div>
 </body>
 </html>
-
-
-
-

Modified: Zope3/trunk/src/zope/app/workflow/stateful/browser/instance_manage.pt
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/browser/instance_manage.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/workflow/stateful/browser/instance_manage.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -13,33 +13,33 @@
               action="@@workflows.html" 
               tal:define="container_contents view/listContentInfo"
               tal:condition="container_contents">
-          <span i18n:translate="">Workflow:</span> 
+          <span i18n:translate="">Workflow:</span>
           <select name="workflow" size="1">
             <option tal:repeat="workflow container_contents" 
                     tal:attributes="value workflow/id"
-                    tal:content="workflow/name"></option>
+                    tal:content="workflow/name" i18n:translate=""></option>
           </select>
           &nbsp;<input type="submit" value="Choose" 
                        i18n:attributes="value choose-button"/>
         </form>
       </div>
       <div tal:condition="workflow" tal:omit-tag="" i18n:translate="">
-        Workflow: 
-        <div tal:replace="view/getWorkflowTitle" 
-             i18n:name="wf_title"/>
+        Workflow:
+        <div tal:replace="view/getWorkflowTitle"
+             i18n:name="wf_title" i18n:translate=""/>
       </div>
     </div>
     <div metal:define-macro="contents_changeState">
     </div>
-    
+
   </div>
   <br />
   <div metal:define-macro="contents_transitions"
        tal:define="info view/getTransitions"
        tal:condition="info">
       <div i18n:translate="">
-        Current Status: 
-        <div tal:replace="info/status"/>
+        Current Status:
+        <div tal:replace="info/status" i18n:translate=""/>
       </div>
       <br />
       <span i18n:translate="">Possible State Changes:</span>
@@ -52,9 +52,9 @@
           <input type="radio"
                  name="selTransition"
                  tal:attributes="value trans/name"/>
-          <span tal:replace="trans/title"/><br />
+          <span tal:replace="trans/title" i18n:translate=""/><br />
         </div>
-        <input type="submit" value="Make Transition" 
+        <input type="submit" value="Make Transition"
                i18n:attributes="value make-transition-button"/>
         </form>
   </div>
@@ -63,10 +63,10 @@
 
   <p tal:define="status view/update"
      tal:condition="status"
-     tal:content="status" />
+     tal:content="status" i18n:translate=""/>
 
-  <form name="." method="post"> 
-    
+  <form name="." method="post">
+
     <div metal:use-macro="context/@@form_macros/widget_rows" />
 
     <div class="row">
@@ -77,7 +77,7 @@
             i18n:attributes="value submit-button"/>
       </div>
     </div>
-  </form> 
+  </form>
 
 </div>
 </body>

Modified: Zope3/trunk/src/zope/app/workflow/stateful/browser/published_content.pt
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/browser/published_content.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/workflow/stateful/browser/published_content.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -9,7 +9,3 @@
 </div>
 </body>
 </html>
-
-
-
-

Modified: Zope3/trunk/src/zope/app/zopetop/widget_macros.pt
===================================================================
--- Zope3/trunk/src/zope/app/zopetop/widget_macros.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/zopetop/widget_macros.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -14,13 +14,15 @@
                tal:condition="widget/label|nothing">
             <label for="field.name" title="The widget's hint"
                    tal:attributes="for widget/name; title widget/hint"
-                   tal:content="widget/label">The Label</label>
+                   tal:content="widget/label" i18n:translate=""
+                   >The Label</label>
           </div>
           <div class="field" tal:content="structure widget">
             <input type="text" style="width:100%"/>
           </div>
           <div class="error" tal:define="error widget/error"
-               tal:condition="error" tal:content="structure error">
+              tal:condition="error" tal:content="structure error"
+              i18n:translate="">
             The Error
           </div>
         </metal:block>
@@ -128,7 +130,7 @@
            width="150">
       <thead>
         <tr>
-          <th align="center" class="boxtop">Search</th>
+          <th align="center" class="boxtop" i18n:translate="">Search</th>
           <th class="empty">&nbsp;</th>
         </tr>
       </thead>
@@ -154,7 +156,7 @@
       <div class="body">
         <div class="content" tal:repeat="view views">
           <a href="" tal:attributes="href view/action"
-             tal:content="view/title">
+             tal:content="view/title" i18n:translate="">
             View
           </a>
         </div>
@@ -171,7 +173,7 @@
       <div class="body">
         <div class="content" tal:repeat="action actions">
           <a href="" tal:attributes="href action/action"
-             tal:content="action/title">
+             tal:content="action/title" i18n:translate="">
             Action
           </a>
         </div>
@@ -210,7 +212,8 @@
         <a href=""
            tal:attributes="href view/action;
                            class view/selected;"
-           tal:content="view/title">
+           tal:content="view/title"
+           i18n:translate="">
           label
         </a>
       </tal:block>
@@ -224,7 +227,8 @@
         <a href="#"
            tal:repeat="info actions"
            tal:attributes="href info/action"
-           tal:content="info/title">
+           tal:content="info/title"
+           i18n:translate="">
           Action name
         </a>
       </span>

Modified: Zope3/trunk/src/zope/app/zptpage/browser/inlinecode.pt
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/browser/inlinecode.pt	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/app/zptpage/browser/inlinecode.pt	2005-05-19 10:30:35 UTC (rev 30413)
@@ -13,6 +13,7 @@
         <h3 tal:condition="view/label"
             tal:content="view/label"
             metal:define-slot="heading"
+            i18n:translate=""
             >Edit something</h3>
 
         <div style="color:red; font-weight: bold">
@@ -43,7 +44,7 @@
 
         <p tal:define="status view/update"
            tal:condition="status"
-           tal:content="status" />
+           tal:content="status" i18n:translate=""/>
 
          <p tal:condition="view/errors" i18n:translate="">
            There are  <strong tal:content="python:len(view.errors)"
@@ -51,7 +52,7 @@
         </p>
 
         <tal:block repeat="error view/errors">
-          <div class="error" tal:content="error">error</div>
+          <div class="error" tal:content="error" i18n:translate="">error</div>
         </tal:block>
 
         <div metal:use-macro="context/@@form_macros/widget_rows" />

Modified: Zope3/trunk/src/zope/tal/talgenerator.py
===================================================================
--- Zope3/trunk/src/zope/tal/talgenerator.py	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/tal/talgenerator.py	2005-05-19 10:30:35 UTC (rev 30413)
@@ -317,6 +317,17 @@
             assert key == "structure"
             self.emit("insertStructure", cexpr, attrDict, program)
 
+    def emitI18nSubstitution(self, arg, attrDict={}):
+        # TODO: Code duplication is BAD, we need to fix it later
+        key, expr = parseSubstitution(arg)
+        cexpr = self.compileExpression(expr)
+        program = self.popProgram()
+        if key == "text":
+            self.emit("insertI18nText", cexpr, program)
+        else:
+            assert key == "structure"
+            self.emit("insertI18nStructure", cexpr, attrDict, program)
+
     def emitEvaluateCode(self, lang):
         program = self.popProgram()
         self.emit('evaluateCode', lang, program)
@@ -473,6 +484,17 @@
                 self.emitEndElement(name, isend)
             return
 
+        # TODO: All old tal:replace code needs to be removed.
+        # TODO: Ugly hack to work around tal:replace and i18n:translate issue.
+        # I (DV) need to cleanup the code later.
+        replaced = False
+        if ("replace" in taldict and "omit-tag" not in taldict
+            and "content" not in taldict):
+            taldict["omit-tag"] = ""
+            taldict["content"] = taldict["replace"]
+            del taldict["replace"]
+            replaced = True
+
         self.position = position
         for key, value in taldict.items():
             if key not in taldefs.KNOWN_TAL_ATTRIBUTES:
@@ -536,10 +558,6 @@
                 raise TALError(
                     "tal:content and tal:replace are mutually exclusive",
                     position)
-            if msgid is not None:
-                raise I18NError(
-                    "i18n:translate and tal:replace are mutually exclusive",
-                    position)
 
         if content and msgid:
             raise I18NError(
@@ -648,9 +666,11 @@
             # placeholder.
             if varname:
                 todo['i18nvar'] = (varname, I18N_EXPRESSION, replace)
+                self.pushProgram()
             else:
-                todo["replace"] = replace
-            self.pushProgram()
+                omitTag = ""
+                todo["content"] = replace
+                content = replace
         # i18n:name w/o tal:replace uses the content as the interpolation
         # dictionary values
         elif varname:
@@ -691,7 +711,7 @@
                     repldict[key] = None, 1, i18nattrs.get(key)
         else:
             repldict = {}
-        if replace:
+        if replaced:
             todo["repldict"] = repldict
             repldict = {}
         if script:
@@ -701,7 +721,7 @@
             self.pushProgram()
         if content and not varname:
             self.pushProgram()
-        if msgid is not None:
+        if not content and msgid is not None:
             self.pushProgram()
         if content and varname:
             self.pushProgram()
@@ -721,6 +741,9 @@
                 self.emitEndTag(name)
             return
 
+        # TODO: All old tal:replace code needs to be removed.
+        # I (DV) need to cleanup the code later.
+
         self.position = todo.get("position", (None, None))
         defineMacro = todo.get("defineMacro")
         useMacro = todo.get("useMacro")
@@ -755,7 +778,10 @@
         # If there's no tal:content or tal:replace in the tag with the
         # i18n:name, tal:replace is the default.
         if content:
-            self.emitSubstitution(content, {})
+            if msgid is not None:
+                self.emitI18nSubstitution(content, repldict)
+            else:
+                self.emitSubstitution(content, repldict)
         # If we're looking at an implicit msgid, emit the insertTranslation
         # opcode now, so that the end tag doesn't become part of the implicit
         # msgid.  If we're looking at an explicit msgid, it's better to emit
@@ -765,7 +791,7 @@
         #
         # Still, we should emit insertTranslation opcode before i18nVariable
         # in case tal:content, i18n:translate and i18n:name in the same tag
-        if msgid is not None:
+        if not content and msgid is not None:
             if (not varname) or (
                 varname and (varname[1] == I18N_CONTENT)):
                 self.emitTranslation(msgid, i18ndata)
@@ -797,7 +823,7 @@
             self.emitI18nVariable(varname)
         # Do test for "msgid is not None", i.e. we only want to test for
         # explicit msgids here.  See comment above.
-        if msgid is not None:
+        if not content and msgid is not None:
             # in case tal:content, i18n:translate and i18n:name in the
             # same tag insertTranslation opcode has already been
             # emitted
@@ -840,18 +866,17 @@
     # Filter out empty items, eg:
     # i18n:attributes="value msgid; name msgid2;"
     # would result in 3 items where the last one is empty
-    attrs = filter(None, i18nattrs.split(";"))
+    attrs = [spec for spec in i18nattrs.split(";") if spec]
     for spec in attrs:
         parts = spec.split()
-        if len(parts) > 2:
-            raise TALError("illegal i18n:attributes specification: %r" % spec,
-                           position)
         if len(parts) == 2:
             attr, msgid = parts
-        else:
-            # len(parts) == 1
+        elif len(parts) == 1:
             attr = parts[0]
             msgid = None
+        else:
+            raise TALError("illegal i18n:attributes specification: %r" % spec,
+                           position)
         if not xml:
             attr = attr.lower()
         if attr in d:

Modified: Zope3/trunk/src/zope/tal/talgettext.py
===================================================================
--- Zope3/trunk/src/zope/tal/talgettext.py	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/tal/talgettext.py	2005-05-19 10:30:35 UTC (rev 30413)
@@ -96,7 +96,7 @@
     def evaluate(*args):
         # If the result of evaluate ever gets into a message ID, we want
         # to notice the fact in the .pot file.
-        return 'XXX'
+        return '${DYNAMIC_CONTENT}'
 
     def evaluatePathOrVar(*args):
         # Actually this method is never called.

Modified: Zope3/trunk/src/zope/tal/talinterpreter.py
===================================================================
--- Zope3/trunk/src/zope/tal/talinterpreter.py	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/tal/talinterpreter.py	2005-05-19 10:30:35 UTC (rev 30413)
@@ -21,6 +21,8 @@
 # Do not use cStringIO here!  It's not unicode aware. :(
 from StringIO import StringIO
 
+import warnings
+
 from zope.i18nmessageid import MessageID, Message
 from zope.tal.taldefs import quote, TAL_VERSION, METALError
 from zope.tal.taldefs import isCurrentVersion
@@ -156,6 +158,7 @@
         self.engine = engine # Execution engine (aka context)
         self.Default = engine.getDefault()
         self._pending_source_annotation = False
+        self._currentTag = ""
         self._stream_stack = [stream or sys.stdout]
         self.popStream()
         self.debug = debug
@@ -566,6 +569,8 @@
 
     def do_insertText(self, stuff):
         self.interpret(stuff[1])
+    bytecode_handlers["insertText"] = do_insertText
+    bytecode_handlers["insertI18nText"] = do_insertText
 
     def do_insertText_tal(self, stuff):
         text = self.engine.evaluateText(stuff[0])
@@ -576,6 +581,10 @@
             return
         if isinstance(text, (MessageID, Message)):
             # Translate this now.
+            # BBB: Deprecated. Will be removed in 3.3
+            warnings.warn('Automatic translation of message id\'s is'
+                ' deprecated and will be removed in 3.3.'
+                ' Use explicit i18n:translate="" instead.', DeprecationWarning)
             text = self.engine.translate(text)
         # '&' must be done first!
         s = text.replace(
@@ -586,8 +595,26 @@
             self.col = self.col + len(s)
         else:
             self.col = len(s) - (i + 1)
-    bytecode_handlers["insertText"] = do_insertText
 
+    def do_insertI18nText_tal(self, stuff):
+        # TODO: Code duplication is BAD, we need to fix it later
+        text = self.engine.evaluateText(stuff[0])
+        if text is None:
+            return
+        if text is self.Default:
+            self.interpret(stuff[1])
+            return
+        text = self.translate(text, text, {})
+        # '&' must be done first!
+        s = text.replace(
+            "&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+        self._stream_write(s)
+        i = s.rfind('\n')
+        if i < 0:
+            self.col = self.col + len(s)
+        else:
+            self.col = len(s) - (i + 1)
+
     def do_i18nVariable(self, stuff):
         varname, program, expression, structure = stuff
         if expression is None:
@@ -608,6 +635,9 @@
             finally:
                 self.restoreState(state)
         else:
+            # TODO: Seems like this branch not used anymore, we
+            # need to remove it
+
             # Evaluate the value to be associated with the variable in the
             # i18n interpolation dictionary.
             if structure:
@@ -618,6 +648,11 @@
             # evaluate() does not do any I18n, so we do it here.
             if isinstance(value, (MessageID, Message)):
                 # Translate this now.
+                # BBB: Deprecated. Will be removed in 3.3
+                warnings.warn('Automatic translation of message id\'s is'
+                    ' deprecated and will be removed in 3.3.'
+                    ' Use explicit i18n:translate="" instead.',
+                    DeprecationWarning)
                 value = self.engine.translate(value)
 
             if not structure:
@@ -681,6 +716,8 @@
 
     def do_insertStructure(self, stuff):
         self.interpret(stuff[2])
+    bytecode_handlers["insertStructure"] = do_insertStructure
+    bytecode_handlers["insertI18nStructure"] = do_insertStructure
 
     def do_insertStructure_tal(self, (expr, repldict, block)):
         structure = self.engine.evaluateStructure(expr)
@@ -698,8 +735,25 @@
             self.insertHTMLStructure(text, repldict)
         else:
             self.insertXMLStructure(text, repldict)
-    bytecode_handlers["insertStructure"] = do_insertStructure
 
+    def do_insertI18nStructure_tal(self, (expr, repldict, block)):
+        # TODO: Code duplication is BAD, we need to fix it later
+        structure = self.engine.evaluateStructure(expr)
+        if structure is None:
+            return
+        if structure is self.Default:
+            self.interpret(block)
+            return
+        text = self.translate(structure, structure, {})
+        if not (repldict or self.strictinsert):
+            # Take a shortcut, no error checking
+            self.stream_write(text)
+            return
+        if self.html:
+            self.insertHTMLStructure(text, repldict)
+        else:
+            self.insertXMLStructure(text, repldict)
+
     def insertHTMLStructure(self, text, repldict):
         from zope.tal.htmltalparser import HTMLTALParser
         gen = AltTALGenerator(repldict, self.engine, 0)
@@ -910,7 +964,9 @@
     bytecode_handlers_tal["setLocal"] = do_setLocal_tal
     bytecode_handlers_tal["setGlobal"] = do_setGlobal_tal
     bytecode_handlers_tal["insertStructure"] = do_insertStructure_tal
+    bytecode_handlers_tal["insertI18nStructure"] = do_insertI18nStructure_tal
     bytecode_handlers_tal["insertText"] = do_insertText_tal
+    bytecode_handlers_tal["insertI18nText"] = do_insertI18nText_tal
     bytecode_handlers_tal["loop"] = do_loop_tal
     bytecode_handlers_tal["onError"] = do_onError_tal
     bytecode_handlers_tal["<attrAction>"] = attrAction_tal

Added: Zope3/trunk/src/zope/tal/tests/input/test22.xml
===================================================================
--- Zope3/trunk/src/zope/tal/tests/input/test22.xml	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/tal/tests/input/test22.xml	2005-05-19 10:30:35 UTC (rev 30413)
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<body xmlns:tal="http://xml.zope.org/namespaces/tal">
+    <span tal:content="default">content</span>
+    <span tal:omit-tag="" tal:content="default">omit</span>
+    <span tal:replace="default">replace</span>
+</body>

Added: Zope3/trunk/src/zope/tal/tests/output/test22.xml
===================================================================
--- Zope3/trunk/src/zope/tal/tests/output/test22.xml	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/tal/tests/output/test22.xml	2005-05-19 10:30:35 UTC (rev 30413)
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<body>
+    <span>content</span>
+    omit
+    replace
+</body>

Modified: Zope3/trunk/src/zope/tal/tests/test_htmltalparser.py
===================================================================
--- Zope3/trunk/src/zope/tal/tests/test_htmltalparser.py	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/tal/tests/test_htmltalparser.py	2005-05-19 10:30:35 UTC (rev 30413)
@@ -337,9 +337,13 @@
         self._run_check("<p tal:replace='string:foo'>bar</p>", [
              ('setPosition', (1, 0)),
              ('beginScope', {'tal:replace': 'string:foo'}),
-             ('insertText', ('$string:foo$',
-              [('startTag', ('p', [('tal:replace', 'string:foo', 'tal')])),
-               rawtext('bar</p>')])),
+             ('optTag',
+              ('p',
+               '',
+               None,
+               0,
+               [('startTag', ('p', [('tal:replace', 'string:foo', 'tal')]))],
+               [('insertText', ('$string:foo$', [('rawtextOffset', ('bar', 3))]))])),
              ('endScope', ()),
              ])
 
@@ -347,10 +351,13 @@
         self._run_check("<p tal:replace='text string:foo'>bar</p>", [
              ('setPosition', (1, 0)),
              ('beginScope', {'tal:replace': 'text string:foo'}),
-             ('insertText', ('$string:foo$',
-              [('startTag', ('p',
-                             [('tal:replace', 'text string:foo', 'tal')])),
-               rawtext('bar</p>')])),
+             ('optTag',
+              ('p',
+               '',
+               None,
+               0,
+               [('startTag', ('p', [('tal:replace', 'text string:foo', 'tal')]))],
+               [('insertText', ('$string:foo$', [('rawtextOffset', ('bar', 3))]))])),
              ('endScope', ()),
              ])
 
@@ -358,10 +365,14 @@
         self._run_check("<p tal:replace='structure string:<br>'>bar</p>", [
              ('setPosition', (1, 0)),
              ('beginScope', {'tal:replace': 'structure string:<br>'}),
-             ('insertStructure', ('$string:<br>$', {},
-              [('startTag', ('p',
-                [('tal:replace', 'structure string:<br>', 'tal')])),
-               rawtext('bar</p>')])),
+             ('optTag',
+              ('p',
+               '',
+               None,
+               0,
+               [('startTag', ('p', [('tal:replace', 'structure string:<br>', 'tal')]))],
+               [('insertStructure',
+                 ('$string:<br>$', {}, [('rawtextOffset', ('bar', 3))]))])),
              ('endScope', ()),
              ])
 
@@ -375,10 +386,14 @@
                              [('tal:repeat', 'x python:(1,2,3)', 'tal')])),
                ('setPosition', (1, 33)),
                ('beginScope', {'tal:replace': 'x'}),
-               ('insertText', ('$x$',
-                [('startTag', ('span', [('tal:replace', 'x', 'tal')])),
-                 rawtext('dummy</span>')])),
-               ('endScope', ()),
+                ('optTag',
+                 ('span',
+                  '',
+                  None,
+                  0,
+                  [('startTag', ('span', [('tal:replace', 'x', 'tal')]))],
+                  [('insertText', ('$x$', [('rawtextOffset', ('dummy', 5))]))])),
+                ('endScope', ()),
                rawtext('</p>')])),
              ('endScope', ()),
              ])
@@ -460,16 +475,20 @@
             ('beginScope',
              {'tal:attributes': 'src string:foo.png',
               'tal:replace': 'structure string:<img>'}),
-            ('insertStructure',
-             ('$string:<img>$',
-              {'src': ('$string:foo.png$', 0, None)},
-              [('startTag', ('p',
-                             [('tal:replace', 'structure string:<img>', 'tal'),
-                              ('tal:attributes', 'src string:foo.png',
-                               'tal')])),
-               rawtext('duh</p>')])),
-            ('endScope', ()),
-            ])
+             ('optTag',
+              ('p',
+               '',
+               None,
+               0,
+               [('startTag',
+                 ('p',
+                  [('tal:replace', 'structure string:<img>', 'tal'),
+                   ('tal:attributes', 'src string:foo.png', 'tal')]))],
+               [('insertStructure',
+                 ('$string:<img>$',
+                    {'src': ('$string:foo.png$', False, None)},
+                     [('rawtextOffset', ('duh', 3))]))])),
+             ('endScope', ())])
 
     def test_on_error_1(self):
         self._run_check("<p tal:on-error='string:error' "
@@ -498,16 +517,22 @@
             ('beginScope',
              {'tal:replace': 'notHere', 'tal:on-error': 'string:error'}),
             ('onError',
-             ([('insertText', ('$notHere$',
-                [('startTag', ('p',
+              ([('optTag',
+                 ('p',
+                  '',
+                  None,
+                  0,
+                  [('startTag',
+                    ('p',
+                     [('tal:on-error', 'string:error', 'tal'),
+                      ('tal:replace', 'notHere', 'tal')]))],
+                  [('insertText', ('$notHere$', [('rawtextOffset', ('okay', 4))]))]))],
+               [('startTag',
+                 ('p',
                   [('tal:on-error', 'string:error', 'tal'),
                    ('tal:replace', 'notHere', 'tal')])),
-                 rawtext('okay</p>')]))],
-              [('startTag', ('p',
-                [('tal:on-error', 'string:error', 'tal'),
-                 ('tal:replace', 'notHere', 'tal')])),
-               ('insertText', ('$string:error$', [])),
-               rawtext('</p>')])),
+                ('insertText', ('$string:error$', [])),
+                ('rawtextOffset', ('</p>', 4))])),
             ('endScope', ()),
             ])
 
@@ -601,11 +626,15 @@
     [('rawtextOffset', ('replaceable ', 12)),
      ('setPosition', (1, 36)),
      ('beginScope', {'tal:replace': 'str:here'}),
-     ('insertText',
-      ('$str:here$',
-       [('startTag', ('p', [('tal:replace', 'str:here', 'tal')])),
-        ('rawtextOffset', ('content</p>', 11))])),
-     ('endScope', ())])),
+        ('optTag',
+         ('p',
+          '',
+          None,
+          0,
+          [('startTag', ('p', [('tal:replace', 'str:here', 'tal')]))],
+          [('insertText',
+            ('$str:here$', [('rawtextOffset', ('content', 7))]))])),
+        ('endScope', ())])),
   ('endScope', ()),
   ('rawtextColumn', ('</span>\n', 0))
   ])
@@ -631,12 +660,18 @@
        {'i18n:name': 'name', 'tal:replace': 'str:Lomax'})),
      ('i18nVariable',
       ('name',
-       [('startEndTag',
-         ('span',
-          [('tal:replace', 'str:Lomax', 'tal'),
-           ('i18n:name', 'name', 'i18n')]))],
-       '$str:Lomax$',
-       0)),
+          [('optTag',
+            ('span',
+             '',
+             None,
+             1,
+             [('startEndTag',
+               ('span',
+                [('tal:replace', 'str:Lomax', 'tal'),
+                 ('i18n:name', 'name', 'i18n')]))],
+             [('insertText', ('$str:Lomax$', []))]))],
+          None,
+          0)),
      ('rawtextBeginScope',
       (' was born in\n  ',
        2,
@@ -645,12 +680,18 @@
        {'i18n:name': 'country', 'tal:replace': 'str:Antarctica'})),
      ('i18nVariable',
       ('country',
-       [('startEndTag',
-         ('span',
-          [('tal:replace', 'str:Antarctica', 'tal'),
-           ('i18n:name', 'country', 'i18n')]))],
-       '$str:Antarctica$',
-       0)),
+          [('optTag',
+            ('span',
+             '',
+             None,
+             1,
+             [('startEndTag',
+               ('span',
+                [('tal:replace', 'str:Antarctica', 'tal'),
+                 ('i18n:name', 'country', 'i18n')]))],
+             [('insertText', ('$str:Antarctica$', []))]))],
+          None,
+          0)),
      ('endScope', ()),
      ('rawtextColumn', ('.\n', 0))])),
   ('endScope', ()),
@@ -677,9 +718,7 @@
             [('i18n:translate', '', 'i18n'),
              ('tal:content', 'bar', 'tal'),
              ('i18n:name', 'bar_name', 'i18n')])),
-         ('insertTranslation',
-           ('',
-             [('insertText', ('$bar$', []))])),
+             ('insertI18nText', ('$bar$', [])),
          ('rawtextOffset', ('</span>', 7))],
       None,
         0)),

Modified: Zope3/trunk/src/zope/tal/tests/test_talgettext.py
===================================================================
--- Zope3/trunk/src/zope/tal/tests/test_talgettext.py	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/tal/tests/test_talgettext.py	2005-05-19 10:30:35 UTC (rev 30413)
@@ -18,7 +18,6 @@
 """
 import sys
 import unittest
-import operator
 from StringIO import StringIO
 
 from zope.tal.htmltalparser import HTMLTALParser
@@ -67,7 +66,8 @@
             msgids += domain.keys()
         msgids.sort()
         self.assertEquals(msgids,
-                          ['A <a href="XXX">link</a>.', 'Some XXX text.'])
+            ['A <a href="${DYNAMIC_CONTENT}">link</a>.',
+            'Some ${DYNAMIC_CONTENT} text.'])
 
 
 def test_suite():

Modified: Zope3/trunk/src/zope/tal/tests/test_talinterpreter.py
===================================================================
--- Zope3/trunk/src/zope/tal/tests/test_talinterpreter.py	2005-05-19 08:35:58 UTC (rev 30412)
+++ Zope3/trunk/src/zope/tal/tests/test_talinterpreter.py	2005-05-19 10:30:35 UTC (rev 30413)
@@ -148,11 +148,14 @@
 
 class I18NCornerTestCaseBase(TestCaseBase):
 
-    factory = None # set in subclass to Message and MessageID
+    def factory(self, msgid, default, mapping={}):
+        raise NotImplementedError("abstract method")
 
     def setUp(self):
         self.engine = DummyEngine()
-        self.engine.setLocal('foo', self.factory('FoOvAlUe', 'default'))
+        # Make sure we'll translate the msgid not its unicode representation
+        self.engine.setLocal('foo',
+            self.factory('FoOvAlUe${empty}', 'default', {'empty': ''}))
         self.engine.setLocal('bar', 'BaRvAlUe')
 
     def _check(self, program, expected):
@@ -165,30 +168,34 @@
     def test_simple_messageid_translate(self):
         # This test is mainly here to make sure our DummyEngine works
         # correctly.
-        program, macros = self._compile('<span tal:content="foo"/>')
+        program, macros = self._compile(
+            '<span i18n:translate="" tal:content="foo"/>')
         self._check(program, '<span>FOOVALUE</span>\n')
 
-        program, macros = self._compile('<span tal:replace="foo"/>')
+        program, macros = self._compile(
+            '<span i18n:translate="" tal:replace="foo"/>')
         self._check(program, 'FOOVALUE\n')
 
     def test_replace_with_messageid_and_i18nname(self):
         program, macros = self._compile(
             '<div i18n:translate="" >'
-            '<span tal:replace="foo" i18n:name="foo_name"/>'
+            '<span i18n:translate="" tal:replace="foo" i18n:name="foo_name"/>'
             '</div>')
         self._check(program, '<div>FOOVALUE</div>\n')
 
     def test_pythonexpr_replace_with_messageid_and_i18nname(self):
         program, macros = self._compile(
             '<div i18n:translate="" >'
-            '<span tal:replace="python: foo" i18n:name="foo_name"/>'
+            '<span i18n:translate="" tal:replace="python: foo"'
+            '    i18n:name="foo_name"/>'
             '</div>')
         self._check(program, '<div>FOOVALUE</div>\n')
 
     def test_structure_replace_with_messageid_and_i18nname(self):
         program, macros = self._compile(
             '<div i18n:translate="" >'
-            '<span tal:replace="structure foo" i18n:name="foo_name"/>'
+            '<span i18n:translate="" tal:replace="structure foo"'
+            '    i18n:name="foo_name"/>'
             '</div>')
         self._check(program, '<div>FOOVALUE</div>\n')
 
@@ -196,7 +203,7 @@
         program, macros = self._compile(
             '<div i18n:translate="" >'
             '<em tal:omit-tag="" i18n:name="foo_name">'
-            '<span tal:replace="foo"/>'
+            '<span i18n:translate="" tal:replace="foo"/>'
             '</em>'
             '</div>')
         self._check(program, '<div>FOOVALUE</div>\n')
@@ -204,7 +211,7 @@
     def test_content_with_messageid_and_i18nname(self):
         program, macros = self._compile(
             '<div i18n:translate="" >'
-            '<span tal:content="foo" i18n:name="foo_name"/>'
+            '<span i18n:translate="" tal:content="foo" i18n:name="foo_name"/>'
             '</div>')
         self._check(program, '<div><span>FOOVALUE</span></div>\n')
 
@@ -398,11 +405,17 @@
         self._check(program, u"<div>FOO \u00C0</div>\n")
 
 class I18NCornerTestCaseMessageID(I18NCornerTestCaseBase):
-    factory = MessageID
 
+    def factory(self, msgid, default, mapping={}):
+        m = MessageID(msgid, default)
+        m.mapping = mapping
+        return m
+
 class I18NCornerTestCaseMessage(I18NCornerTestCaseBase):
-    factory = Message
 
+    def factory(self, msgid, default, mapping={}):
+        return Message(msgid, default, mapping=mapping)
+
 class ScriptTestCase(TestCaseBase):
 
     def setUp(self):



More information about the Zope3-Checkins mailing list