[Zope3-checkins] CVS: Zope3/src/zope/app/browser/catalog - advanced.pt:1.3 catalog.py:1.3 configure.zcml:1.8

Stephan Richter srichter at cosmos.phy.tufts.edu
Wed Aug 6 11:42:32 EDT 2003


Update of /cvs-repository/Zope3/src/zope/app/browser/catalog
In directory cvs.zope.org:/tmp/cvs-serv17028/app/browser/catalog

Modified Files:
	advanced.pt catalog.py configure.zcml 
Log Message:
Internationalized a whole bunch templates and screens. I also took the 
oppurtunity to clean some old code up. 

I noticed that particularly the basic Content Objects are in bad shape.

There is still a lot left to do!


=== Zope3/src/zope/app/browser/catalog/advanced.pt 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/catalog/advanced.pt:1.2	Sat Jul 12 23:35:45 2003
+++ Zope3/src/zope/app/browser/catalog/advanced.pt	Wed Aug  6 10:41:26 2003
@@ -1,41 +1,59 @@
 <html metal:use-macro="context/@@standard_macros/page">
-<head>
-<title>Title Here</title>
-</head>
 <body>
 <div metal:fill-slot="body">
-    <table border="0">
+  <table border="0">
     <caption i18n:translate="">Advanced Catalog Thingies</caption>
     <tbody>
       <tr>
-	<span tal:condition="context/getSubscribed" tal:omit-tag="">
-	    <td>Catalog is currently <strong>subscribed</strong> to the objectHub.</td>
-	    <td><form method="post" action="unsubscribe.html">
-	    <input type="submit" name="unsubscribe" value="Unsubscribe">
-	    </form></td>
-	</span>
-	<span tal:condition="not:context/getSubscribed" tal:omit-tag="">
-	    <td>Catalog is currently <strong>unsubscribed</strong> from the objectHub.</td>
-	    <td><form method="post" action="subscribe.html">
-	    <input type="submit" name="subscribe" value="Subscribe">
-	    <input type="checkbox" value="true" name="update" CHECKED> (and reindex all objects, if checked)
-	    </form></td>
-	</span>
+        <span tal:condition="context/getSubscribed" tal:omit-tag="">
+          <td i18n:translate="">
+            Catalog is currently <strong>subscribed</strong> to the 
+            object hub.
+          </td>
+          <td>
+            <form method="post" action="unsubscribe.html">
+              <input type="submit" name="unsubscribe" value="Unsubscribe">
+            </form>
+          </td>
+        </span>
+        <span tal:condition="not:context/getSubscribed" tal:omit-tag="">
+          <td>
+            Catalog is currently <strong>unsubscribed</strong> from the 
+            object hub.
+          </td>
+          <td>
+            <form method="post" action="subscribe.html">
+              <input type="submit" name="subscribe" value="Subscribe"
+                     i18n:attributes="value subscribe-button"/>
+              <input type="checkbox" value="true" name="update" checked=""/> 
+              <span tal:omit-tag="" i18n:translate="">
+                (and reindex all objects, if checked)
+              </span>
+            </form>
+          </td>
+        </span>
       </tr>
       <tr>
         <form method="POST" action="clear.html">
-        <td align="right">Clear all indexes<br><i>not hooked up yet</i></td>
-        <td><input type="submit" name="submit" value="Clear"></td>
+          <td align="right">
+            Clear all indexes<br><i>not hooked up yet</i>
+          </td>
+          <td><input type="submit" name="submit" value="Clear"></td>
         </form>
       </tr>
       <tr>
         <form method="POST" action="reindex.html">
-        <td align="right">Refresh all indexes<br><i>not hooked up yet</i></td>
-        <td><input type="submit" name="submit" value="Refresh"></td>
+          <td align="right">
+            Refresh all indexes<br><i>not hooked up yet</i>
+          </td>
+          <td>
+            <input type="submit" name="submit" value="Refresh"
+                   i18n:attributes="value refresh-button"/>
+          </td>
         </form>
       </tr>
     </tbody>
-    </table>
+  </table>
 </div>
 </body>
 </html>


=== Zope3/src/zope/app/browser/catalog/catalog.py 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/catalog/catalog.py:1.2	Sat Jul 12 23:35:45 2003
+++ Zope3/src/zope/app/browser/catalog/catalog.py	Wed Aug  6 10:41:26 2003
@@ -1,22 +1,23 @@
-from persistence import Persistent
-from zope.interface import implements
-from zope.component import getAdapter
-
-from zope.app.event import publish
-from zope.app.event.objectevent import ObjectCreatedEvent, ObjectModifiedEvent
-
-from zope.app.index.field.index import FieldIndex
-from zope.app.index.text.index import TextIndex
-
-from zope.app.interfaces.container import IAdding
+##############################################################################
+#
+# Copyright (c) 2003 Zope Corporation and Contributors.
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Catalog Views
 
+$Id$
+"""
 from zope.app.browser.container.adding import Adding
-
-from zope.app.catalog.catalog import Catalog
-
-import time
-
-from zope.app.interfaces.catalog.catalog import ICatalog, ICatalogView
+from zope.app.interfaces.catalog.catalog import ICatalog
+from zope.interface import implements
 
 class CatalogEditView:
     "Provides a user interface for configuring a catalog"
@@ -42,6 +43,7 @@
     def reindex(self):
         self.context.updateIndexes()
 	self.request.response.redirect(".")
+
 
 class IndexAdding(Adding):
     menu_id = 'catalog_index_menu'


=== Zope3/src/zope/app/browser/catalog/configure.zcml 1.7 => 1.8 ===
--- Zope3/src/zope/app/browser/catalog/configure.zcml:1.7	Tue Aug  5 04:33:10 2003
+++ Zope3/src/zope/app/browser/catalog/configure.zcml	Wed Aug  6 10:41:26 2003
@@ -1,108 +1,98 @@
 <configure
     xmlns="http://namespaces.zope.org/zope"
-    xmlns:browser="http://namespaces.zope.org/browser"
-    xmlns:global_translation="http://namespaces.zope.org/gts"
-    i18n_domain='zope'
-    >
+    xmlns:browser="http://namespaces.zope.org/browser">
 
-<global_translation:registerTranslations directory="translation_files"/>
-
-<!-- Allow a catalog to be added to content space -->
-<browser:menuItem menu="add_content"
-  for="zope.app.interfaces.container.IAdding"
-  title="Catalog"
-  action="zope.app.catalog"
-  description="Catalog"
-/>
-
-<browser:icon name="zmi_icon" 
-              for="zope.app.interfaces.catalog.catalog.ICatalog"
-              file="catalog_icon.gif"/>
-
-<browser:menuItem
-  menu="add_component"
-  action="zope.app.catalogutility"
-  title="Catalog"
-  for="zope.app.interfaces.container.IAdding"
-  permission="zope.ManageServices"
-  />
-
-<!-- Standard container 'contents' tab -->
-<browser:page
-  for="zope.app.interfaces.catalog.catalog.ICatalog"
-  name="contents.html"
-  menu="zmi_views"
-  title="Indexes"
-  attribute="contents"
-  class="zope.app.browser.container.contents.Contents"
-  permission="zope.ManageContent"
-/>
-
-<!-- This hooks up a custom add menu. This will be improved when
-     Jim finished refactoring Containers to suck less. -->
-<browser:view
-   for="zope.app.interfaces.catalog.catalog.ICatalog"
-   name="+"
-   menu="zmi_actions" title="Add"
-   class="zope.app.browser.catalog.catalog.IndexAdding"
-   permission="zope.ManageContent">
-   <browser:page name="index.html"  attribute="index" />
-   <browser:page name="action.html" attribute="action" />
-</browser:view>
-
-<!-- the add menu is browser.IndexAdding -->
-<browser:menu id="catalog_index_menu" title="Add Index" />
-
-<!-- Add a couple of items to the add menu -->
-<!-- TextIndex -->
-<browser:addform
-  name="AddTextIndexToCatalog"
-  menu="catalog_index_menu" title="Text Index"
-  schema="zope.app.interfaces.index.text.IUITextCatalogIndex"
-  permission="zope.ManageServices"
-  content_factory="zope.app.index.text.index.TextCatalogIndex"
-  arguments="field_name"
-  keyword_arguments="interface"
-  description="A full text index"
-/>
-
-<!-- FieldIndex -->
-<browser:addform
-  name="AddFieldIndexToCatalog"
-  menu="catalog_index_menu" title="Field Index"
-  schema="zope.app.interfaces.index.field.IUIFieldCatalogIndex"
-  permission="zope.ManageServices"
-  content_factory="zope.app.index.field.index.FieldCatalogIndex"
-  arguments="field_name"
-  keyword_arguments="interface"
-  description="An index of a specific field"
-/>
-
-<!-- KeywordIndex -->
-<browser:addform
-  name="AddKeywordIndexToCatalog"
-  menu="catalog_index_menu" title="Keyword Index"
-  schema="zope.app.interfaces.index.keyword.IUIKeywordCatalogIndex"
-  permission="zope.ManageServices"
-  content_factory="zope.app.index.keyword.index.KeywordCatalogIndex"
-  arguments="field_name"
-  keyword_arguments="interface"
-  description="A keyword index of a specific field"
-/>
-
-<!-- the Advanced tab of the Catalog -->
-<browser:pages
-    for="zope.app.interfaces.catalog.catalog.ICatalog"
-    class="zope.app.browser.catalog.catalog.CatalogEditView"
-    permission="zope.ManageContent">
-
-  <browser:page name="index.html" template="advanced.pt"
-      menu="zmi_views" title="Advanced"/>
-
-  <browser:page name="subscribe.html" attribute="subscribe"/>
-  <browser:page name="unsubscribe.html" attribute="unsubscribe"/>
-  <browser:page name="clear.html" attribute="clear"/>
-  <browser:page name="reindex.html" attribute="reindex"/>
-</browser:pages>
+  <!-- Allow a catalog to be added to content space -->
+  <browser:menuItem 
+      menu="add_content"
+      for="zope.app.interfaces.container.IAdding"
+      title="Catalog"
+      action="zope.app.catalog"
+      description="Catalog" />
+  
+  <browser:icon 
+      name="zmi_icon" 
+      for="zope.app.interfaces.catalog.catalog.ICatalog"
+      file="catalog_icon.gif"/>
+  
+  <browser:menuItem
+      menu="add_component"
+      action="zope.app.catalogutility"
+      title="Catalog"
+      for="zope.app.interfaces.container.IAdding"
+      permission="zope.ManageServices" />
+  
+  <!-- Standard container 'contents' tab -->
+  <browser:page
+      for="zope.app.interfaces.catalog.catalog.ICatalog"
+      name="contents.html"
+      menu="zmi_views"
+      title="Indexes"
+      attribute="contents"
+      class="zope.app.browser.container.contents.Contents"
+      permission="zope.ManageContent" />
+  
+  <!-- This hooks up a custom add menu.  -->
+  <browser:view
+       for="zope.app.interfaces.catalog.catalog.ICatalog"
+       name="+"
+       menu="zmi_actions" title="Add"
+       class="zope.app.browser.catalog.catalog.IndexAdding"
+       permission="zope.ManageContent">
+     <browser:page name="index.html"  attribute="index" />
+     <browser:page name="action.html" attribute="action" />
+  </browser:view>
+  
+  <!-- the add menu is browser.IndexAdding -->
+  <browser:menu id="catalog_index_menu" title="Add Index" />
+  
+  <!-- Add a couple of items to the add menu -->
+  <!-- TextIndex -->
+  <browser:addform
+    name="AddTextIndexToCatalog"
+    menu="catalog_index_menu" title="Text Index"
+    schema="zope.app.interfaces.index.text.IUITextCatalogIndex"
+    permission="zope.ManageServices"
+    content_factory="zope.app.index.text.index.TextCatalogIndex"
+    arguments="field_name"
+    keyword_arguments="interface"
+    description="A full text index" />
+  
+  <!-- FieldIndex -->
+  <browser:addform
+    name="AddFieldIndexToCatalog"
+    menu="catalog_index_menu" title="Field Index"
+    schema="zope.app.interfaces.index.field.IUIFieldCatalogIndex"
+    permission="zope.ManageServices"
+    content_factory="zope.app.index.field.index.FieldCatalogIndex"
+    arguments="field_name"
+    keyword_arguments="interface"
+    description="An index of a specific field" />
+  
+  <!-- KeywordIndex -->
+  <browser:addform
+    name="AddKeywordIndexToCatalog"
+    menu="catalog_index_menu" title="Keyword Index"
+    schema="zope.app.interfaces.index.keyword.IUIKeywordCatalogIndex"
+    permission="zope.ManageServices"
+    content_factory="zope.app.index.keyword.index.KeywordCatalogIndex"
+    arguments="field_name"
+    keyword_arguments="interface"
+    description="A keyword index of a specific field" />
+  
+  <!-- the Advanced tab of the Catalog -->
+  <browser:pages
+      for="zope.app.interfaces.catalog.catalog.ICatalog"
+      class="zope.app.browser.catalog.catalog.CatalogEditView"
+      permission="zope.ManageContent">
+  
+    <browser:page name="index.html" template="advanced.pt"
+        menu="zmi_views" title="Advanced"/>
+  
+    <browser:page name="subscribe.html" attribute="subscribe"/>
+    <browser:page name="unsubscribe.html" attribute="unsubscribe"/>
+    <browser:page name="clear.html" attribute="clear"/>
+    <browser:page name="reindex.html" attribute="reindex"/>
+  </browser:pages>
 
 </configure>




More information about the Zope3-Checkins mailing list