[Zope3-checkins] CVS: Zope3/src/zope/app/browser/services/registration - configure.zcml:1.4 editregistration.pt:1.5 namecomponentregistry.pt:1.6 nameregistry.pt:1.5 registered.pt:1.4

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


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

Modified Files:
	configure.zcml editregistration.pt namecomponentregistry.pt 
	nameregistry.pt registered.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/registration/configure.zcml 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/services/registration/configure.zcml:1.3	Sun Aug  3 13:49:39 2003
+++ Zope3/src/zope/app/browser/services/registration/configure.zcml	Thu Aug  7 13:41:28 2003
@@ -1,98 +1,88 @@
-<configure
-    xmlns='http://namespaces.zope.org/browser'
-    i18n_domain='zope'
-    >
-
-<page
-    for="zope.app.interfaces.services.registration.IRegistrationStatus"
-    name="edit"
-    class=".RegistrationStatusWidget"
-    allowed_interface="zope.app.interfaces.browser.form.IBrowserWidget"
-    permission="zope.ManageServices"
-    />
-
-<page
-    for="zope.app.interfaces.services.registration.IRegistrationStack"
-    name="ChangeRegistrations"
-    template="changeregistrations.pt"
-    class=".ChangeRegistrations"
-    allowed_interface="zope.app.interfaces.browser.form.IFormCollaborationView"
-    permission="zope.ManageServices"
-    />
-
-<editform
-    name="index.html"
-    schema=
-    "zope.app.interfaces.services.registration.INamedComponentRegistration"
-    menu="zmi_views"
-    label="Edit Registration"
-    permission="zope.ManageServices"
-    fields="name componentPath permission status"
-    />
-
-<page
-    name="index.html" 
-    for="zope.app.interfaces.services.registration.INameComponentRegistry"
-    class=".NameComponentRegistryView"
-    permission="zope.ManageServices"
-    attribute="index" 
-    />
-
-<page
-    permission="zope.Public"
-    allowed_interface="zope.app.interfaces.browser.form.IBrowserWidget"
-    for="zope.app.interfaces.services.registration.IComponentPath"
-    name="edit"
-    class=".ComponentPathWidget" 
-    />
-
-<page
-    permission="zope.Public"
-    allowed_interface="zope.app.interfaces.browser.form.IBrowserWidget"
-    for="zope.app.interfaces.services.registration.IComponentPath"
-    name="display"
-    class=".ComponentPathWidget" 
-    />
+<configure xmlns="http://namespaces.zope.org/browser">
+
+  <page
+      for="zope.app.interfaces.services.registration.IRegistrationStatus"
+      name="edit"
+      class=".RegistrationStatusWidget"
+      allowed_interface="zope.app.interfaces.browser.form.IBrowserWidget"
+      permission="zope.ManageServices" />
+
+  <page
+      for="zope.app.interfaces.services.registration.IRegistrationStack"
+      name="ChangeRegistrations"
+      template="changeregistrations.pt"
+      class=".ChangeRegistrations"
+      allowed_interface=
+                   "zope.app.interfaces.browser.form.IFormCollaborationView"
+      permission="zope.ManageServices" />
+
+  <editform
+      name="index.html"
+      schema=
+        "zope.app.interfaces.services.registration.INamedComponentRegistration"
+      menu="zmi_views"
+      label="Edit Registration"
+      permission="zope.ManageServices"
+      fields="name componentPath permission status" />
+
+  <page
+      name="index.html" 
+      for="zope.app.interfaces.services.registration.INameComponentRegistry"
+      class=".NameComponentRegistryView"
+      permission="zope.ManageServices"
+      attribute="index" />
+
+  <page
+      permission="zope.Public"
+      allowed_interface="zope.app.interfaces.browser.form.IBrowserWidget"
+      for="zope.app.interfaces.services.registration.IComponentPath"
+      name="edit"
+      class=".ComponentPathWidget" />
+
+  <page
+      permission="zope.Public"
+      allowed_interface="zope.app.interfaces.browser.form.IBrowserWidget"
+      for="zope.app.interfaces.services.registration.IComponentPath"
+      name="display"
+      class=".ComponentPathWidget" />
 
 <!-- RegistrationManager -->
 
-<page
-   name="index.html" 
-   for="zope.app.interfaces.services.registration.IRegistrationManager"
-   menu="zmi_views" title="Registration"
-   permission="zope.ManageServices"
-   class=".EditRegistration"
-   template="editregistration.pt" 
-   />
+  <page
+     name="index.html" 
+     for="zope.app.interfaces.services.registration.IRegistrationManager"
+     menu="zmi_views" title="Registration"
+     permission="zope.ManageServices"
+     class=".EditRegistration"
+     template="editregistration.pt" />
 
 <!-- For now, we'll allow CMs to be added, but we won't include them
      in the add_component menu. -->
-<view
-   for="zope.app.interfaces.services.registration.IRegistrationManager"
-   name="+"
-   menu="zmi_actions" title="Add"
-   permission="zope.ManageServices"
-   class=".RegistrationAdding">
-  <page name="index.html"  attribute="index"  />
-  <page name="action.html" attribute="action" />
-</view>
+  <view
+       for="zope.app.interfaces.services.registration.IRegistrationManager"
+       name="+"
+       menu="zmi_actions" title="Add"
+       permission="zope.ManageServices"
+       class=".RegistrationAdding">
+    <page name="index.html"  attribute="index"  />
+    <page name="action.html" attribute="action" />
+  </view>
 
 <!-- Error views -->
 
-<page
-    for="
-    zope.app.interfaces.services.registration.INoRegistrationManagerError"
-    name="index.html"
-    permission="zope.Public"
-    template="../../exception/user.pt"
-    class="zope.app.browser.exception.user.UserErrorView"
-    />
-<page
-    for="zope.app.interfaces.services.registration.INoLocalServiceError"
-    name="index.html"
-    permission="zope.Public"
-    template="../../exception/user.pt"
-    class="zope.app.browser.exception.user.UserErrorView"
-    />
+  <page
+      for="
+      zope.app.interfaces.services.registration.INoRegistrationManagerError"
+      name="index.html"
+      permission="zope.Public"
+      template="../../exception/user.pt"
+      class="zope.app.browser.exception.user.UserErrorView" />
+
+  <page
+      for="zope.app.interfaces.services.registration.INoLocalServiceError"
+      name="index.html"
+      permission="zope.Public"
+      template="../../exception/user.pt"
+      class="zope.app.browser.exception.user.UserErrorView" />
 
 </configure>


=== Zope3/src/zope/app/browser/services/registration/editregistration.pt 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/services/registration/editregistration.pt:1.4	Mon Jun 30 13:10:56 2003
+++ Zope3/src/zope/app/browser/services/registration/editregistration.pt	Thu Aug  7 13:41:28 2003
@@ -1,59 +1,68 @@
 <html metal:use-macro="views/standard_macros/page">
-  <head>
-    <title>View Registration Manager</title>
-  </head>
-
-  <body metal:fill-slot="body">
-
-    <h2>Registration Manager</h2>
-
-    <form action="." method="POST"
-          tal:define="message view/update"
-          tal:attributes="action request/URL">
-
-      <p tal:condition="message" tal:content="message" />
-
-      <table>
-        <thead>
-          <tr>
-            <th></th>
-            <th align="left">Summary</th>
-          </tr>
-        </thead>
-        <tbody>
-          <tr tal:repeat="config view/configInfo">
-            <td valign="top">
-              <input type="checkbox" name='keys:list' value='1'
-                     tal:attributes="value config/name" />
-            </td>
-            <td>
-              <a href="." tal:attributes="href config/name">
-                <span tal:content="config/line1|default">
-                  Config item <span tal:content="config/name" />
-                </span>
-              </a>
-              <span tal:condition="not:config/active">(disabled)</span>
-              <br />
-              <span tal:content="config/line2|default">
-                (No implementation summary)
+<head>
+  <title metal:fill-slot="title" i18n:translate="">
+    View Registration Manager
+  </title>
+</head>
+<body>
+<div metal:fill-slot="body">
+
+  <h2 i18n:translate="">Registration Manager</h2>
+
+  <form action="." method="POST"
+        tal:define="message view/update"
+        tal:attributes="action request/URL">
+
+    <p tal:condition="message" tal:content="message" />
+
+    <table>
+      <thead>
+        <tr>
+          <th></th>
+          <th align="left" i18n:translate="">Summary</th>
+        </tr>
+      </thead>
+      <tbody>
+        <tr tal:repeat="config view/configInfo">
+          <td valign="top">
+            <input type="checkbox" name='keys:list' value='1'
+                   tal:attributes="value config/name" />
+          </td>
+          <td>
+            <a href="." tal:attributes="href config/name">
+              <span tal:content="config/line1|default">
+                Config item <span tal:content="config/name" />
               </span>
-            </td>
-          </tr>
-        </tbody>
-      </table>
-
-      <div class="row">
-        <input type="submit" name='refresh_submit' value="Refresh" />
-        <input type="submit" name='UPDATE_SUBMIT' value="Submit" />
-        <input type="submit" name='remove_submit' value="Remove" />
-        &nbsp;&nbsp;
-        <input type="submit" name='top_submit' value="Top" />
-        <input type="submit" name='up_submit' value="Up" />
-        <input type="submit" name='down_submit' value="Down" />
-        <input type="submit" name='bottom_submit' value="Bottom" />
-      </div>
+            </a>
+            <span tal:condition="not:config/active">(disabled)</span>
+            <br />
+            <span tal:content="config/line2|default">
+              (No implementation summary)
+            </span>
+          </td>
+        </tr>
+      </tbody>
+    </table>
+
+    <div class="row">
+      <input type="submit" name='refresh_submit' value="Refresh" 
+             i18n:attributes="value refresh-button" />
+      <input type="submit" name='UPDATE_SUBMIT' value="Submit" />
+             i18n:attributes="value submit-button" />
+      <input type="submit" name='remove_submit' value="Remove" />
+             i18n:attributes="value remove-button" />
+      &nbsp;&nbsp;
+      <input type="submit" name='top_submit' value="Top"
+             i18n:attributes="value top-button" />
+      <input type="submit" name='up_submit' value="Up"
+             i18n:attributes="value up-button" />
+      <input type="submit" name='down_submit' value="Down"
+             i18n:attributes="value down-button" />
+      <input type="submit" name='bottom_submit' value="Bottom"
+             i18n:attributes="value bottom-button" />
+    </div>
+  </form>
 
-    </form>
-
-  </body>
+</div>
+</body>
 </html>


=== Zope3/src/zope/app/browser/services/registration/namecomponentregistry.pt 1.5 => 1.6 ===
--- Zope3/src/zope/app/browser/services/registration/namecomponentregistry.pt:1.5	Wed Jun 25 18:14:27 2003
+++ Zope3/src/zope/app/browser/services/registration/namecomponentregistry.pt	Thu Aug  7 13:41:28 2003
@@ -1,55 +1,55 @@
 <html metal:use-macro="views/standard_macros/page">
 <body>
 <div metal:fill-slot="body">
-<div metal:define-macro="body">
-<div tal:define="registries view/update">
 
-  <h2 metal:define-slot="heading">Registered fruits in this fruits manager.</h2>
+  <div metal:define-macro="body">
+    <div tal:define="registries view/update">
 
-  <div tal:condition="not:registries">
-       <p metal:define-slot="empty_text">No fruits have been registered</p>
-  </div>
-
-  <div tal:condition="registries">
-
-    <div metal:define-slot="extra_top" tal:condition="nothing">
-
-      <p>For each fruit, the fruit name is given and all of the components
-         registered to provide the fruit are shown.  You may select the
-         component to provide the fruit or disable the fruit.
-      </p>
-
-      <p>Select a fruit name or a component name to visit the fruit or
-         component.
-      </p>
+      <h2 metal:define-slot="heading">
+        Registered fruits in this fruits manager.</h2>
 
+      <div tal:condition="not:registries">
+        <p metal:define-slot="empty_text">No fruits have been registered</p>
+      </div>
     </div>
 
-      <form action="." method="post" tal:attributes="action request/URL">
+    <div tal:condition="registries">
 
-         <div tal:repeat="registry registries">
-           <a href="#"
-              tal:content="registry/name"
-              tal:attributes="href registry/url"
-              tal:condition="registry/active"
-              >Orange</a>
-           <span tal:replace="registry/name"
-                 tal:condition="registry/inactive" />
-           <br />
-           <span tal:content="structure registry/view" />
-         </div>
+      <div metal:define-slot="extra_top" tal:condition="nothing">
 
-      <input type="submit" name="submit_update" value="Update" /><br />
+        <p>For each fruit, the fruit name is given and all of the components
+           registered to provide the fruit are shown.  You may select the
+           component to provide the fruit or disable the fruit.
+        </p>
+
+        <p>Select a fruit name or a component name to visit the fruit or
+          component.</p>
+
+      </div>
+
+        <form action="." method="post" tal:attributes="action request/URL">
+
+          <div tal:repeat="registry registries">
+            <a href="#"
+               tal:content="registry/name"
+               tal:attributes="href registry/url"
+               tal:condition="registry/active">Orange</a>
+            <span tal:replace="registry/name"
+                  tal:condition="registry/inactive" />
+            <br />
+            <span tal:content="structure registry/view" />
+          </div>
+
+          <input type="submit" name="submit_update" value="Update" 
+                 i18n:attributes="value update-button"/><br />
 
       </form>
 
-    <div metal:define-slot="extra_bottom" tal:condition="nothing">
-    </div>
+      <div metal:define-slot="extra_bottom" tal:condition="nothing" />
 
+    </div>
   </div>
 
-</div>
-</div>
 </div>
 </body>
 </html>


=== Zope3/src/zope/app/browser/services/registration/nameregistry.pt 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/services/registration/nameregistry.pt:1.4	Wed Jun 25 17:18:54 2003
+++ Zope3/src/zope/app/browser/services/registration/nameregistry.pt	Thu Aug  7 13:41:28 2003
@@ -1,60 +1,66 @@
 <html metal:use-macro="views/standard_macros/page">
 <body metal:fill-slot="body">
 <div metal:define-macro="body">
-<div tal:define="registries view/update">
 
-  <h2 metal:define-slot="heading">Registered fruits in this fruits manager.</h2>
-
-  <div tal:condition="not:registries">
-       <p metal:define-slot="empty_text">No fruits have been registered</p>
-  </div>
-
-  <div tal:condition="registries">
-
-    <div metal:define-slot="extra_top">
-
-      <p>For each fruit, the fruit name is given and all of the 
-         registrations are shown.  You may select the
-         registration to provide the fruit or disable the fruit.
-      </p>
+  <div tal:define="registries view/update">
 
+    <h2 metal:define-slot="heading">
+      Registered fruits in this fruits manager.</h2>
+    
+    <div tal:condition="not:registries">
+      <p metal:define-slot="empty_text">No fruits have been registered</p>
     </div>
-
+    
+    <div tal:condition="registries">
+    
+      <div metal:define-slot="extra_top">
+    
+        <p>For each fruit, the fruit name is given and all of the 
+           registrations are shown.  You may select the
+           registration to provide the fruit or disable the fruit.
+        </p>
+    
+      </div>
+    
       <form action="." method="post" tal:attributes="action request/URL">
-
-      <table width="100%">
-
-         <tr tal:repeat="registry registries">
-           <td valign="top" align="right">
-              <span
-                 tal:content="registry/name"
-                 tal:condition="registry/active"
-                 >Orange</span>
-              <span tal:replace="registry/name"
-                    tal:condition="registry/inactive" />
-           </td>
-           <td tal:content="structure registry/view">
-           </td>
-         </tr>
-
-      </table>
-
-      <input type="submit" name="submit_update" value="Update" /><br />
-
+    
+        <table width="100%">
+    
+           <tr tal:repeat="registry registries">
+             <td valign="top" align="right">
+                <span
+                   tal:content="registry/name"
+                   tal:condition="registry/active"
+                   >Orange</span>
+                <span tal:replace="registry/name"
+                      tal:condition="registry/inactive" />
+             </td>
+             <td tal:content="structure registry/view">
+             </td>
+           </tr>
+    
+        </table>
+    
+        <input type="submit" name="submit_update" value="Update" 
+               i18n:attributes="value update-button"/><br />
+    
       </form>
-
-    <div metal:define-slot="extra_bottom" />
+    
+      <div metal:define-slot="extra_bottom" />
+    
+    </div>
+    
+    <p metal:define-slot="help_text">
+       To register a fruit, add a fruit component to a <em>package</em> in 
+       <a href="Packages">Packages</a> or to the 
+       <a href="Packages/default">default package</a>. After the fruit is added,
+       add a fruit registration that registers the component to provide a
+       fruit.  These instructions may not apply, depending what kind of fruit
+       you have.
+    </p>
 
   </div>
 
-  <p metal:define-slot="help_text">To register a fruit, add a fruit component
-     to a <em>package</em> in <a href="Packages">Packages</a> or to the <a
-     href="Packages/default">default package</a>. After the fruit is added, add
-     a fruit registration that registers the component to provide a fruit.
-     These instructions may not apply, depending what kind of fruit you have.
-  </p>
-
-</div>
 </div>
 </body>
 </html>


=== Zope3/src/zope/app/browser/services/registration/registered.pt 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/services/registration/registered.pt:1.3	Mon Jun 30 13:10:56 2003
+++ Zope3/src/zope/app/browser/services/registration/registered.pt	Thu Aug  7 13:41:28 2003
@@ -1,25 +1,24 @@
 <html metal:use-macro="context/@@standard_macros/page">
-  <body>
-    <div metal:fill-slot="body">
+<body>
+<div metal:fill-slot="body">
 
-      <p>Registrations for this object:</p>
+  <p i18n:translate="">Registrations for this object:</p>
 
-      <ul>
+  <ul>
+    <li tal:repeat="use view/uses">
 
-        <li tal:repeat="use view/uses">
+      <a href="http://."
+         tal:attributes="href use/url"
+         tal:content="use/description">Description</a>
+      (<span tal:replace="use/status">Active</span>)
 
-          <a href="http://."
-             tal:attributes="href use/url"
-             tal:content="use/description">Description</a>
-          (<span tal:replace="use/status">Active</span>)
+    </li>
+  </ul>
 
-        </li>
-      </ul>
+  <p><a href="addRegistration.html" i18n:translate="">
+    Add a registration for this object
+  </a></p>
 
-      <p><a href="addRegistration.html">
-        Add a registration for this object
-      </a></p>
-
-    </div>
-  </body>
+</div>
+</body>
 </html>




More information about the Zope3-Checkins mailing list