[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/translation - __init__.py:1.4 configure.zcml:1.10 exportimport.pt:1.4 exportimport.py:1.5 synchronize.pt:1.6 synchronize.py:1.5 translate.pt:1.5 translatemessage.pt:1.4

Stephan Richter srichter at cosmos.phy.tufts.edu
Thu Aug 7 14:42:12 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/services/translation
In directory cvs.zope.org:/tmp/cvs-serv26029/services/translation

Modified Files:
	__init__.py configure.zcml exportimport.pt exportimport.py 
	synchronize.pt synchronize.py translate.pt translatemessage.pt 
Log Message:
Internationalized the rest of zope/app/browser.

I also took the chance to clean up some old code and remove a lot of cruft.
(This is the reason I decided to do it instead of letting a less 
experienced developer do it.)

I now consider I18n of the Zope core done. What does this mean to you?

1. All code you check into the CVS must be internationalized. That means:

   (a) Python and PT code must be properly tagged.

   (b) zope.pot must be updated. This can be done with::

       [zope/app/translation_files]$ python extract.py

       Note: You do not need to merge the new POT file with the catalogs.

2. Any code snippet that has no I18n is considered a bug! Therefore, please
   take care and do the I18n and make code so when you see missing spots.

Finally I would like to mention that some forms might experience some 
hickups, as I changed and moved around a lot of templates and was not able
to verify them all by hand. Please let me know, if something that used to 
work is not working anymore.


=== Zope3/src/zope/app/browser/services/translation/__init__.py 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/services/translation/__init__.py:1.3	Fri Jul 18 12:40:12 2003
+++ Zope3/src/zope/app/browser/services/translation/__init__.py	Thu Aug  7 13:41:34 2003
@@ -17,7 +17,9 @@
 """
 from zope.i18n.interfaces import ITranslationService
 
-class BaseView(object):
+__metaclass__ = type
+
+class BaseView:
 
     __used_for__ = ITranslationService
 


=== Zope3/src/zope/app/browser/services/translation/configure.zcml 1.9 => 1.10 ===
--- Zope3/src/zope/app/browser/services/translation/configure.zcml:1.9	Sun Aug  3 13:49:42 2003
+++ Zope3/src/zope/app/browser/services/translation/configure.zcml	Thu Aug  7 13:41:34 2003
@@ -1,116 +1,61 @@
-<configure
-    xmlns="http://namespaces.zope.org/zope"
-    xmlns:browser="http://namespaces.zope.org/browser"
-    i18n_domain="zope"
-    >
-
-<browser:pages 
-    permission="zope.ManageServices" 
-    for="zope.i18n.interfaces.ITranslationService"
-    class="zope.app.browser.services.translation.translate.Translate">
-
-  <browser:page 
-      name="translate.html" 
-      template="./translate.pt" 
-      menu="zmi_views" title="Translate" />
-
-  <browser:page 
-      name="translateMessage.html" 
-      template="./translatemessage.pt" />
-  
-  <browser:page 
-      name="editMessages.html" 
-      attribute="editMessages" />
-
-  <browser:page 
-      name="deleteMessages.html" 
-      attribute="deleteMessages" />
-  
-  <browser:page 
-      name="addLanguage.html" 
-      attribute="addLanguage" />
-
-  <browser:page 
-      name="changeEditLanguages.html" 
-      attribute="changeEditLanguages" />
-
-  <browser:page 
-      name="deleteLanguages.html" 
-      attribute="deleteLanguages" />
-
-  <browser:page 
-      name="addDomain.html" 
-      attribute="addDomain" />
-  
-  <browser:page 
-      name="changeEditDomains.html" 
-      attribute="changeEditDomains" />
-
-  <browser:page 
-      name="deleteDomains.html" 
-      attribute="deleteDomains" />
-
-  <browser:page 
-      name="changeFilter.html" 
-      attribute="changeFilter" />
-  
-</browser:pages>
-
-
-<browser:pages 
-    permission="zope.ManageServices" 
-    for="zope.i18n.interfaces.ITranslationService"
-    class="zope.app.browser.services.translation.exportimport.ExportImport">
-  
-  <browser:page 
-      name="exportImportForm.html" 
-      template="./exportimport.pt"
-      menu="zmi_views" title="Import/Export" />
-  
-  <browser:page 
-      name="export.html" 
-      attribute="exportMessages" />
-
-  <browser:page 
-      name="import.html" 
-      attribute="importMessages" />
-
-</browser:pages>
-
-
-<browser:pages
-    permission="zope.ManageServices" 
-    for="zope.i18n.interfaces.ITranslationService"
-    class="zope.app.browser.services.translation.synchronize.Synchronize">
-  
-  <browser:page 
-      name="synchronizeForm.html" 
-      template="./synchronize.pt"
-      menu="zmi_views" title="Synchronize" />
-  
-  <browser:page 
-      name="synchronize.html" 
-      attribute="synchronize" />
-  
-  <browser:page 
-      name="synchronizeMessages.html" 
-      attribute="synchronizeMessages" />
-  
-  <browser:page 
-      name="saveSettings.html" 
-      attribute="saveSettings" />
-
-</browser:pages>
-
-<browser:defaultView
-    for="zope.i18n.interfaces.ITranslationService"
-    name="translate.html"/>
-
-<browser:menuItem
-     menu="add_service"
-     for="zope.app.interfaces.container.IAdding"
-     action="TranslationService"
-     title="Translation Service"
-     description="A Persistent Translation Service for TTW development" />
+<configure xmlns="http://namespaces.zope.org/browser">
+
+  <pages 
+      permission="zope.ManageServices" 
+      for="zope.i18n.interfaces.ITranslationService"
+      class="zope.app.browser.services.translation.translate.Translate">
+
+    <page name="translate.html" template="./translate.pt" 
+          menu="zmi_views" title="Translate" />
+    <page name="translateMessage.html" template="./translatemessage.pt" />
+    <page name="editMessages.html" attribute="editMessages" />
+    <page name="deleteMessages.html" attribute="deleteMessages" />
+    <page name="addLanguage.html" attribute="addLanguage" />
+    <page name="changeEditLanguages.html" attribute="changeEditLanguages" />
+    <page name="deleteLanguages.html" attribute="deleteLanguages" />
+    <page name="addDomain.html" attribute="addDomain" />
+    <page name="changeEditDomains.html" attribute="changeEditDomains" />
+    <page name="deleteDomains.html" attribute="deleteDomains" />
+    <page name="changeFilter.html" attribute="changeFilter" />
+
+  </pages>
+
+
+  <pages 
+      permission="zope.ManageServices" 
+      for="zope.i18n.interfaces.ITranslationService"
+      class="zope.app.browser.services.translation.exportimport.ExportImport">
+    
+    <page name="exportImportForm.html" template="./exportimport.pt"
+          menu="zmi_views" title="Import/Export" />
+    <page name="export.html" attribute="exportMessages" />
+    <page name="import.html" attribute="importMessages" />
+
+  </pages>
+
+
+  <pages
+      permission="zope.ManageServices" 
+      for="zope.i18n.interfaces.ITranslationService"
+      class="zope.app.browser.services.translation.synchronize.Synchronize">
+    
+    <page name="synchronizeForm.html" template="./synchronize.pt"
+          menu="zmi_views" title="Synchronize" />
+    <page name="synchronize.html" attribute="synchronize" />
+    <page name="synchronizeMessages.html" attribute="synchronizeMessages" />
+    <page name="saveSettings.html" attribute="saveSettings" />
+
+  </pages>
+
+  <defaultView
+      for="zope.i18n.interfaces.ITranslationService"
+      name="translate.html"/>
+
+  <menuItem
+       menu="add_service"
+       for="zope.app.interfaces.container.IAdding"
+       action="TranslationService"
+       title="Translation Service"
+       description="A Persistent Translation Service for TTW development" />
 
 </configure>


=== Zope3/src/zope/app/browser/services/translation/exportimport.pt 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/services/translation/exportimport.pt:1.3	Wed Jun 25 14:43:10 2003
+++ Zope3/src/zope/app/browser/services/translation/exportimport.pt	Thu Aug  7 13:41:34 2003
@@ -1,58 +1,61 @@
 <html metal:use-macro="views/standard_macros/page">
 <head>
-  <title>Translation Service - Translate</title>
+  <title metal:fill-slot="title" i18n:translate="">
+    Translation Service - Translate
+  </title>
 </head>
 <body>
-
 <div metal:fill-slot="body">
 
-<h3>Import and Export Messages</h3>
-
-<p>Here you can export and import messages from your Translation Service.</p>
+  <h3 i18n:translate="">Import and Export Messages</h3>
 
-<form action="./" method="post" enctype="multipart/form-data"
-      i18n:domain="Zope-I18n">
-  <table cols="4" width="100%" border="0">
-    <tr>
-      <td width="25%">
-        <div class="form-label" i18n:translate="">Select Languages:</div>
-        <div>
-          <select name="languages:list" size="3" style="width: 80%"
-                  multiple="multiple">
-            <option value="" 
-                    tal:attributes="value language"
-                    tal:content="language"
-                    tal:repeat="language view/getAllLanguages"></option>
-          </select>
-        </div>
-      </td>
-      <td width="25%">
-        <div class="form-label" i18n:translate="">Select Domains:</div>
-        <div>
-          <select name="domains:list" size="3" style="width: 80%"
-                  multiple="multiple">
-            <option value="" 
-                    tal:attributes="value domain"
-                    tal:content="domain"
-                    tal:repeat="domain view/getAllDomains"></option>
-          </select>
-        </div>
-      </td>
-      <td width="25%" valign="top">
-        <div class="form-label" i18n:translate="">Import File Name:</div>
-        <div>
-          <input type="file" name="file" size="20" value="" />
-        </div>
-        <div>
-          <input type="submit" name="@@import.html:method" value="Import" />
-          <input type="submit" name="@@export.html:method" value="Export" />
-        </div>
-      </td>
-    </tr>
-  </table>
-</form>
+  <p i18n:translate="">
+    Here you can export and import messages from your Translation Service.
+  </p>
+
+  <form action="./" method="post" enctype="multipart/form-data">
+    <table cols="4" width="100%" border="0">
+      <tr>
+        <td width="25%">
+          <div class="form-label" i18n:translate="">Select Languages:</div>
+          <div>
+            <select name="languages:list" size="3" style="width: 80%"
+                    multiple="multiple">
+              <option value="" 
+                      tal:attributes="value language"
+                      tal:content="language"
+                      tal:repeat="language view/getAllLanguages"></option>
+            </select>
+          </div>
+        </td>
+        <td width="25%">
+          <div class="form-label" i18n:translate="">Select Domains:</div>
+          <div>
+            <select name="domains:list" size="3" style="width: 80%"
+                    multiple="multiple">
+              <option value="" 
+                      tal:attributes="value domain"
+                      tal:content="domain"
+                      tal:repeat="domain view/getAllDomains"></option>
+            </select>
+          </div>
+        </td>
+        <td width="25%" valign="top">
+          <div class="form-label" i18n:translate="">Import File Name:</div>
+          <div>
+            <input type="file" name="file" size="20" value="" />
+          </div>
+          <div>
+            <input type="submit" name="@@import.html:method" value="Import" 
+                   i18n:attributes="value import-button"/>
+            <input type="submit" name="@@export.html:method" value="Export" 
+                   i18n:attributes="value export-button"/>
+          </div>
+        </td>
+      </tr>
+    </table>
+  </form>
 
 </div>
-
 </body>
 </html>


=== Zope3/src/zope/app/browser/services/translation/exportimport.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/services/translation/exportimport.py:1.4	Fri Jul 18 12:40:12 2003
+++ Zope3/src/zope/app/browser/services/translation/exportimport.py	Thu Aug  7 13:41:34 2003
@@ -15,10 +15,9 @@
 
 $Id$
 """
+from zope.app.browser.services.translation import BaseView
 from zope.component import getAdapter
 from zope.i18n.interfaces import IMessageExportFilter, IMessageImportFilter
-
-from zope.app.browser.services.translation import BaseView
 
 
 class ExportImport(BaseView):


=== Zope3/src/zope/app/browser/services/translation/synchronize.pt 1.5 => 1.6 ===
--- Zope3/src/zope/app/browser/services/translation/synchronize.pt:1.5	Mon Jun 30 13:10:55 2003
+++ Zope3/src/zope/app/browser/services/translation/synchronize.pt	Thu Aug  7 13:41:34 2003
@@ -1,43 +1,46 @@
 <html metal:use-macro="views/standard_macros/page">
-  <head>
-    <title>Translation Service - Synchronize</title>
-  </head>
-<body>
+<head>
+  <title metal:fill-slot="title" i18n:translate="">
+    Translation Service - Synchronize
+  </title>
+
+  <style metal:fill-slot="style_slot" type="text/css">
+    <!--
+    .state0 {color: green;}
+    .state1 {color: yellow;}
+    .state2 {color: yellow;}
+    .state3 {color:  red;}
+    .state4 {color:  red;}
+    -->
+  </style>
 
-<div metal:fill-slot="body">
+</head>
 
-<style type="text/css">
-  <!--
-  .state0 {color: green;}
-  .state1 {color: yellow;}
-  .state2 {color: yellow;}
-  .state3 {color:  red;}
-  .state4 {color:  red;}
- -->
-</style>
+<body>
+<div metal:fill-slot="body">
 
   <table cols="4" width="100%" border="0" cellspacing="0">
     <form action="./" method="post">
       <tr>
         <td width="30%">
-          <div class="form-label">Server URL</div>
+          <div class="form-label" i18n:translate="">Server URL</div>
           <div>
             <input type="text" size="40" name="sync_url" value=""
                    tal:attributes="value view/sync_url" />
           </div>
-          <div>Username</div>
+          <div i18n:translate="">Username</div>
           <div>
             <input type="text" size="40" name="sync_username" value=""
                    tal:attributes="value view/sync_username" />
           </div>
-          <div>Password</div>
+          <div i18n:translate="">Password</div>
           <div>
             <input type="password" size="40" name="sync_password" value=""
                    tal:attributes="value view/sync_password" />
           </div>
         </td>
         <td width="25%">
-          <div>Select Domains:</div>
+          <div i18n:translate="">Select Domains:</div>
           <div>
             <select name="sync_domains:list" size="6" style="width: 80%" 
                     multiple="multiple">
@@ -57,7 +60,7 @@
           </div>
         </td>
         <td width="25%">
-          <div>Select Languages:</div>
+          <div i18n:translate="">Select Languages:</div>
           <div>
             <select name="sync_languages:list" size="6" style="width: 80%" 
                     multiple="multiple">
@@ -78,10 +81,16 @@
         </td>
         <td width="20%">
           <div align="center">
-            <div><input type="submit" name="saveSettings.html:method" 
-                        value="Save Settings" /></div><br />
-            <div><input type="submit" name="synchronize.html:method" 
-                        value="Synchronize" /></div>
+            <div>
+              <input type="submit" name="saveSettings.html:method" 
+                     value="Save Settings" 
+                     i18n:attributes="value save-settings-button" />
+            </div><br />
+            <div>
+              <input type="submit" name="synchronize.html:method" 
+                     value="Synchronize"
+                     i18n:attributes="value synchronize-button"/>
+            </div>
           </div>
         </td>
       </tr>
@@ -89,56 +98,56 @@
   </table>
   <br />
 
-<form action="./"
-      tal:condition="view/canConnect">
-  <table cols="5" width="95%" border="0" cellpadding="2" cellspacing="0" 
-         class="listing">
-    <tr>
-      <th width="16">&nbsp;</th>
-      <th width="55%">Message Id</th>
-      <th width="15%">Domain</th>
-      <th width="10%">Language</th>
-      <th width="15%">Status</th>
-    </tr>
-    <tal:block repeat="message python: view.queryMessages().items()">
-      <tr tal:define="number repeat/message/number;
-                      oddrow repeat/message/odd"
-          tal:attributes="class python: oddrow and 'odd' or 'even'">
-        <td width="16">
-          <input type="hidden"
-                     tal:attributes="name python: 'update-msgid-%i' %number;
-                                 value python: message[0][0]" />
-          <input type="hidden"
-                     tal:attributes="name python: 'update-domain-%i' %number;
-                                 value python: message[0][1]" />
-          <input type="hidden"
-                     tal:attributes="name python: 'update-language-%i' %number;
-                                 value python: message[0][2]" />
-          <input type="checkbox" name="message_ids:list"
-                     tal:attributes="value python: number" />
-        </td>
-        <td tal:content="python: message[0][0]">Hello World!</td>
-        <td tal:content="python: message[0][1]">default</td>
-        <td tal:content="python: message[0][2]">en</td>
-        <td>
-          <b tal:content="python: view.getStatus(*message[1])"
-             tal:attributes="class python:'state%i' %
-                             view.getStatus(message[1][0], message[1][1], 0)"
-            >status</b>
-        </td>
+  <form action="./"
+        tal:condition="view/canConnect">
+    <table cols="5" width="95%" border="0" cellpadding="2" cellspacing="0" 
+           class="listing">
+      <tr>
+        <th width="16">&nbsp;</th>
+        <th width="55%" i18n:translate="">Message Id</th>
+        <th width="15%" i18n:translate="">Domain</th>
+        <th width="10%" i18n:translate="">Language</th>
+        <th width="15%" i18n:translate="">Status</th>
       </tr>
-    </tal:block>
-  </table>
-  <div><input type="submit" name="@@synchronizeMessages.html:method" 
-              value="Update" /></div>
-
-</form>
-
-<p tal:condition="python: not view.canConnect()">
-No connection could be made to remote data source.
-</p>
+      <tal:block repeat="message python: view.queryMessages().items()">
+        <tr tal:define="number repeat/message/number;
+                        oddrow repeat/message/odd"
+            tal:attributes="class python: oddrow and 'odd' or 'even'">
+          <td width="16">
+            <input type="hidden"
+                   tal:attributes="name python: 'update-msgid-%i' %number;
+                                   value python: message[0][0]" />
+            <input type="hidden"
+                   tal:attributes="name python: 'update-domain-%i' %number;
+                                   value python: message[0][1]" />
+            <input type="hidden"
+                   tal:attributes="name python: 'update-language-%i' %number;
+                                   value python: message[0][2]" />
+            <input type="checkbox" name="message_ids:list"
+                       tal:attributes="value python: number" />
+          </td>
+          <td tal:content="python: message[0][0]">Hello World!</td>
+          <td tal:content="python: message[0][1]">default</td>
+          <td tal:content="python: message[0][2]">en</td>
+          <td>
+            <b tal:content="python: view.getStatus(*message[1])"
+               tal:attributes="class python:'state%i' %
+                               view.getStatus(message[1][0], message[1][1], 0)"
+              >status</b>
+          </td>
+        </tr>
+      </tal:block>
+    </table>
+    <div>
+      <input type="submit" name="@@synchronizeMessages.html:method" 
+             value="Update" i18n:attributes="value update-button"/>
+    </div>
+  </form>
+
+  <p tal:condition="python: not view.canConnect()" i18n:translate="">
+    No connection could be made to remote data source.
+  </p>
 
 </div>
-
 </body>
 </html>


=== Zope3/src/zope/app/browser/services/translation/synchronize.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/services/translation/synchronize.py:1.4	Fri Jul 18 12:40:12 2003
+++ Zope3/src/zope/app/browser/services/translation/synchronize.py	Thu Aug  7 13:41:34 2003
@@ -18,16 +18,16 @@
 import httplib
 import urllib
 import xmlrpclib
-
 from base64 import encodestring
 
 from zope.app.browser.services.translation import BaseView
+from zope.app.i18n import ZopeMessageIDFactory as _
 
 
 class Synchronize(BaseView):
 
-    messageStatus = ['Up to Date', 'New Remote', 'Out of Date', 'Newer Local',
-                     'Does not exist']
+    messageStatus = [_('Up to Date'), _('New Remote'), _('Out of Date'),
+                     _('Newer Local'), _('Does not exist')]
 
     def __init__(self, context, request):
         super(Synchronize, self).__init__(context, request)


=== Zope3/src/zope/app/browser/services/translation/translate.pt 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/services/translation/translate.pt:1.4	Mon Jun 30 13:10:55 2003
+++ Zope3/src/zope/app/browser/services/translation/translate.pt	Thu Aug  7 13:41:34 2003
@@ -1,72 +1,72 @@
 <html metal:use-macro="views/standard_macros/page">
 <head>
-  <title>Translation Service - Translate</title>
+  <title metal:fill-slot="title" i18n:translate="">
+    Translation Service - Translate
+  </title>
 </head>
-<body>
 
+<body>
 <div metal:fill-slot="body">
-
-<span i18n:domain="Zope-I18n">
-
-<table cols="4" width="100%" border="0">
-  <tr>
-    <td width="25%">
-      <form action="./" method="post">
-        <div class="form-label" i18n:translate="">Select Languages:</div>
-        <div>
-          <select name="languages:list" size="3" style="width: 80%"
-                  multiple="multiple">
-            <tal:block repeat="language view/getAllLanguages">
-              <option value="" 
-                      tal:attributes="value language"
-                      tal:content="language"
-                      tal:condition="python: language not in
-                                     view.getEditLanguages()" ></option>
-              <option value="" selected="1"
-                      tal:attributes="value language"
-                      tal:content="language"
-                      tal:condition="python: language in
-                                     view.getEditLanguages()" ></option>
-            </tal:block>
-          </select>
-        </div>
-        <div>
-          <input class="form-element" type="submit" 
-                 name="@@changeEditLanguages.html:method" value="Edit"
-                 i18n:attributes="value" />
-          <input class="form-element" type="submit" 
-                 name="@@deleteLanguages.html:method" value="Delete"
-                 i18n:attributes="value" />
-        </div>
-      </form>
-    </td>
-    <td width="25%">
-      <form action="./" method="post">
-        <div class="form-label" i18n:translate="">Select Domains:</div>
-        <div>
-          <select name="domains:list" size="3" style="width: 80%"
-                  multiple="multiple">
-            <tal:block repeat="domain view/getAllDomains">
-              <option value="" 
-                      tal:attributes="value domain"
-                      tal:content="domain"
-                      tal:condition="python: domain not in
-                                     view.getEditDomains()" ></option>
-              <option value="" selected="1"
-                      tal:attributes="value domain"
-                      tal:content="domain"
-                      tal:condition="python: domain in
-                                     view.getEditDomains()" ></option>
-            </tal:block>
+  
+  <table cols="4" width="100%" border="0">
+    <tr>
+      <td width="25%">
+        <form action="./" method="post">
+          <div class="form-label" i18n:translate="">Select Languages:</div>
+          <div>
+            <select name="languages:list" size="3" style="width: 80%"
+                    multiple="multiple">
+              <tal:block repeat="language view/getAllLanguages">
+                <option value="" 
+                        tal:attributes="value language"
+                        tal:content="language"
+                        tal:condition="python: language not in
+                                       view.getEditLanguages()" ></option>
+                <option value="" selected="1"
+                        tal:attributes="value language"
+                        tal:content="language"
+                        tal:condition="python: language in
+                                       view.getEditLanguages()" ></option>
+              </tal:block>
+            </select>
+          </div>
+          <div>
+            <input class="form-element" type="submit" 
+                   name="@@changeEditLanguages.html:method" value="Edit"
+                   i18n:attributes="value edit-button" />
+            <input class="form-element" type="submit" 
+                   name="@@deleteLanguages.html:method" value="Delete"
+                   i18n:attributes="value delete-button" />
+          </div>
+        </form>
+      </td>
+      <td width="25%">
+        <form action="./" method="post">
+          <div class="form-label" i18n:translate="">Select Domains:</div>
+          <div>
+            <select name="domains:list" size="3" style="width: 80%"
+                    multiple="multiple">
+              <tal:block repeat="domain view/getAllDomains">
+                <option value="" 
+                        tal:attributes="value domain"
+                        tal:content="domain"
+                        tal:condition="python: domain not in
+                                       view.getEditDomains()" ></option>
+                <option value="" selected="1"
+                        tal:attributes="value domain"
+                        tal:content="domain"
+                        tal:condition="python: domain in
+                                       view.getEditDomains()" ></option>
+              </tal:block>
             </select>
           </div>
           <div>
             <input class="form-element" type="submit" 
                    name="@@changeEditDomains.html:method" value="Edit"
-                   i18n:attributes="value" />
+                   i18n:attributes="value edit-button" />
             <input class="form-element" type="submit" 
                    name="@@deleteDomains.html:method" value="Delete"
-                   i18n:attributes="value" />
+                   i18n:attributes="value delete-button" />
           </div>
         </form>
       </td>
@@ -75,12 +75,14 @@
           <div class="form-label" i18n:translate="">New Language:</div>
           <div>
             <input type="text" name="language" size="20" value="" />
-            <input type="submit" name="@@addLanguage.html:method" value="Add" />
+            <input type="submit" name="@@addLanguage.html:method" value="Add" 
+                   i18n:attributes="value add-button" />
           </div>
           <div class="form-label" i18n:translate="">New Domain:</div>
           <div>
             <input type="text" name="domain" size="20" value="" />
-            <input type="submit" name="@@addDomain.html:method" value="Add" />
+            <input type="submit" name="@@addDomain.html:method" value="Add" 
+                   i18n:attributes="value add-button"/>
           </div>
         </form>
       </td>
@@ -95,7 +97,7 @@
           <div>
             <input type="submit" name="@@changeFilter.html:method" 
                    value="Filter" 
-                   i18n:attributes="value"/>
+                   i18n:attributes="value filter-button"/>
           </div>
         </form>
       </td>
@@ -103,16 +105,16 @@
   </table>
 
   <form action="./" method="post">
-  <table width="100%" cellspacing="0" cellpadding="3" border="0" 
-         class="listing">
-    <tr class="list-header" align="left">
+    <table width="100%" cellspacing="0" cellpadding="3" border="0" 
+           class="listing">
+      <tr class="list-header" align="left">
         <th width="16">&nbsp;</th>
         <th i18n:translate="">Message Id</th>
         <th i18n:translate="">Domain</th>
         <th tal:repeat="language python:view.getEditLanguages()"
             tal:content="language">de</th>
-    </tr>    
-    <tal:block repeat="message python: view.getMessages()">
+      </tr>    
+      <tal:block repeat="message python: view.getMessages()">
       <tr tal:define="oddrow repeat/message/odd"
           tal:attributes="class python: oddrow and 'odd' or 'even'">
               <td>
@@ -142,49 +144,49 @@
                                  message[0], language)"></textarea>
         </td>
       </tr>
-    </tal:block>
-    <tr><th colspan="3"
-         tal:attributes="colspan python:len(view.getEditLanguages())+3">
-      Add new messages
-    </th></tr>
+      </tal:block>
+      <tr>
+        <th colspan="3"
+           tal:attributes="colspan python:len(view.getEditLanguages())+3">
+          Add new messages
+        </th>
+      </tr>
     
-    <tal:block repeat="count python: range(5)">
+      <tal:block repeat="count python: range(5)">
       <tr tal:define="oddrow repeat/count/odd"
           tal:attributes="class python: oddrow and 'odd' or 'even'">
               <td width="16">&nbsp;</td>
               <td>
                 <textarea cols="20" rows="2" name=""
-                      tal:attributes="name string:new-msg_id-${count}"></textarea> 
+                      tal:attributes="name string:new-msg_id-${count}" /> 
               </td>
               <td>
                 <select name=""
                         tal:attributes="name string:new-domain-${count}">
                   <option value=""
-                                tal:repeat="domain python: view.getEditDomains()"
+                          tal:repeat="domain python: view.getEditDomains()"
                           tal:content="domain"
-                                tal:attributes="value domain">default</option>
+                          tal:attributes="value domain">default</option>
                 </select>
               </td>
               <td tal:repeat="language python:view.getEditLanguages()">
                 <textarea cols="20" rows="2" name=""
-                  tal:attributes="name string:new-${language}-${count}"></textarea> 
+                  tal:attributes="name string:new-${language}-${count}" /> 
               </td>
       </tr>
-    </tal:block>
-  </table>
+      </tal:block>
+    </table>
     
-  <div>
-    <input class="form-element" type="submit" 
-           name="@@editMessages.html:method" value="Edit Messages"
-           i18n:attributes="value" />&nbsp;
-    <input class="form-element" type="submit" 
-           name="@@deleteMessages.html:method" value="Delete Messages"
-           i18n:attributes="value" />
-  </div>
+    <div>
+      <input class="form-element" type="submit" 
+             name="@@editMessages.html:method" value="Edit Messages"
+             i18n:attributes="value" />&nbsp;
+      <input class="form-element" type="submit" 
+             name="@@deleteMessages.html:method" value="Delete Messages"
+             i18n:attributes="value" />
+    </div>
   </form>
 
-</span>
 </div>
-
 </body>
 </html>


=== Zope3/src/zope/app/browser/services/translation/translatemessage.pt 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/services/translation/translatemessage.pt:1.3	Wed Jun 25 14:43:10 2003
+++ Zope3/src/zope/app/browser/services/translation/translatemessage.pt	Thu Aug  7 13:41:34 2003
@@ -1,41 +1,39 @@
 <html metal:use-macro="views/standard_macros/page">
 <head>
-  <title>Translation Service - Translate</title>
+  <title metal:fill-slot="title" i18n:translate="">
+    Translation Service - Translate
+  </title>
 </head>
-<body>
 
+<body>
 <div metal:fill-slot="body">
 
-<span i18n:domain="Zope-I18n">
+  <form action="./" method="post">
+    <input type="hidden" name="msg_domain" value=""
+           tal:attributes="value request/domain" />
+    <input type="hidden" name="msg_id" value=""
+           tal:attributes="value request/msgid" />
+    <table>
+      <tr>
+        <th i18n:translate="">Message Id</th>
+        <td tal:content="request/msgid">Message Id of the message.</td>
+      </tr>
+      <tr tal:repeat="language view/getEditLanguages">
+        <th tal:content="language">Language</th>
+        <td>
+          <textarea cols="80" rows="10" name=""
+                    tal:attributes="name string:msg_lang_${language}" 
+                    tal:content="python: view.getTranslation(request['domain'], 
+                                 request['msgid'], language)"
+           >Translation of Message</textarea>
+        </td>
+      </tr>
+    </table>
+    <input class="form-element" type="submit" 
+           name="@@editMessage.html:method" value="Edit Message"
+           i18n:attributes="value" />
+  </form>
 
-<form action="./" method="post">
-<input type="hidden" name="msg_domain" value=""
-       tal:attributes="value request/domain" />
-<input type="hidden" name="msg_id" value=""
-       tal:attributes="value request/msgid" />
-<table>
-  <tr>
-    <th i18n:translate="">Message Id</th>
-    <td tal:content="request/msgid">Message Id of the message.</td>
-  </tr>
-  <tr tal:repeat="language view/getEditLanguages">
-    <th tal:content="language">Language</th>
-    <td>
-      <textarea cols="80" rows="10" name=""
-                tal:attributes="name string:msg_lang_${language}" 
-                tal:content="python: view.getTranslation(request['domain'], 
-                             request['msgid'], language)"
-       >Translation of Message</textarea>
-    </td>
-  </tr>
-</table>
-<input class="form-element" type="submit" 
-       name="@@editMessage.html:method" value="Edit Message"
-       i18n:attributes="value" />
-</form>
-
-</span>
 </div>
-
 </body>
 </html>




More information about the Zope3-Checkins mailing list