[Zope3-checkins] CVS: Zope3/src/zope/app/browser/cache -
cacheableedit.pt:1.5 configure.zcml:1.11 ramedit.pt:1.5
ramstats.pt:1.5
Stephan Richter
srichter at cosmos.phy.tufts.edu
Wed Aug 6 11:42:28 EDT 2003
Update of /cvs-repository/Zope3/src/zope/app/browser/cache
In directory cvs.zope.org:/tmp/cvs-serv17028/app/browser/cache
Modified Files:
cacheableedit.pt configure.zcml ramedit.pt ramstats.pt
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/cache/cacheableedit.pt 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/cache/cacheableedit.pt:1.4 Tue Apr 8 16:58:02 2003
+++ Zope3/src/zope/app/browser/cache/cacheableedit.pt Wed Aug 6 10:41:24 2003
@@ -1,8 +1,10 @@
-<html metal:use-macro="views/standard_macros/page" i18n:domain="zope">
+<html metal:use-macro="views/standard_macros/page">
<body>
<div metal:fill-slot="body">
- <p i18n:translate="">This edit form allows you to associate a cache with this object.</p>
+ <p i18n:translate="">
+ This edit form allows you to associate a cache with this object.
+ </p>
<p tal:condition="not: view/current_cache_id" i18n:translate="">
Currently there is no cache associated with the object.
@@ -12,7 +14,8 @@
Currently the object uses
<a tal:omit-tag="not:view/current_cache_url"
tal:attributes="href view/current_cache_url"
- tal:content="view/current_cache_id"/>.
+ tal:content="view/current_cache_id"
+ i18n:name="cache_id_or_url"/>.
</p>
<div tal:condition="python: options.has_key('errors') and
@@ -39,10 +42,11 @@
</tr>
</table>
- <input type="submit" name="ChangeCaching.html:method"
- value="Save Changes" i18n:attributes="value" />
+ <input type="submit" name="ChangeCaching.html:method" value="Save Changes"
+ i18n:attributes="value save-cahnges-button" />
<input type="submit" name="InvalidateCache.html:method"
- value="Invalidate Cached Value" i18n:attributes="value" />
+ value="Invalidate Cached Value"
+ i18n:attributes="value invalidate-cache-button" />
</form>
<div tal:content="options/message|nothing" i18n:translate="" />
=== Zope3/src/zope/app/browser/cache/configure.zcml 1.10 => 1.11 ===
--- Zope3/src/zope/app/browser/cache/configure.zcml:1.10 Sun Aug 3 13:48:43 2003
+++ Zope3/src/zope/app/browser/cache/configure.zcml Wed Aug 6 10:41:24 2003
@@ -1,55 +1,44 @@
<configure
- xmlns='http://namespaces.zope.org/zope'
- xmlns:browser='http://namespaces.zope.org/browser'
- i18n_domain='zope'
- >
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:browser="http://namespaces.zope.org/browser">
<!-- Menu entry for "add component" menu -->
<browser:menuItem
menu="add_component"
for="zope.app.interfaces.container.IAdding"
title="RAM Cache"
- action="zope.app.caching.RAMCache"
- />
+ action="zope.app.caching.RAMCache" />
<!-- Menu entry for "add cache" menu -->
<browser:menuItem
menu="add_cache"
for="zope.app.interfaces.container.IAdding"
title="RAM Cache"
- action="zope.app.caching.RAMCache"
- />
+ action="zope.app.caching.RAMCache" />
<browser:pages
for="zope.app.interfaces.cache.ram.IRAMCache"
class="zope.app.browser.cache.ram.RAMCacheView"
- permission="zope.Public"
- >
+ permission="zope.Public">
<browser:page name="editAction.html" attribute="action" />
- <browser:page name="index.html" template="ramedit.pt" />
- <browser:page name="stats.html" template="ramstats.pt" />
+ <browser:page name="index.html" template="ramedit.pt" />
+ <browser:page name="stats.html" template="ramstats.pt" />
</browser:pages>
<browser:menuItems menu="zmi_views"
for="zope.app.interfaces.cache.ram.IRAMCache">
- <browser:menuItem title="Edit" action="index.html"/>
+ <browser:menuItem title="Edit" action="index.html"/>
<browser:menuItem title="Statistics" action="stats.html"/>
</browser:menuItems>
<browser:pages
for="zope.app.interfaces.annotation.IAnnotatable"
permission="zope.ManageBindings"
- class="zope.app.browser.cache.cacheable.CacheableView"
- >
-
- <browser:page name="Caching.html"
- attribute="form"
- menu="zmi_views" title="Caching"
- />
- <browser:page name="ChangeCaching.html"
- attribute="action" />
- <browser:page name="InvalidateCache.html"
- attribute="invalidate" />
+ class="zope.app.browser.cache.cacheable.CacheableView">
+ <browser:page name="Caching.html" attribute="form"
+ menu="zmi_views" title="Caching" />
+ <browser:page name="ChangeCaching.html" attribute="action" />
+ <browser:page name="InvalidateCache.html" attribute="invalidate" />
</browser:pages>
</configure>
=== Zope3/src/zope/app/browser/cache/ramedit.pt 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/cache/ramedit.pt:1.4 Mon Jun 30 13:04:41 2003
+++ Zope3/src/zope/app/browser/cache/ramedit.pt Wed Aug 6 10:41:24 2003
@@ -1,53 +1,60 @@
-<html metal:use-macro="views/standard_macros/page" i18n:domain="zope">
- <body>
- <div metal:fill-slot="body">
-
- <p i18n:translate="">You can configure the RAM Cache here.</p>
-
- <div tal:condition="python: options.has_key('errors') and
- options['errors']">
- <span style="font-weight: bold" i18n:translate="">Errors:</span>
- <div tal:repeat="error options/errors | nothing">
- <span tal:replace="python: error[0].title" />:
- <span tal:replace="python: error[1].error_name" />
- </div>
+<html metal:use-macro="views/standard_macros/page">
+<body>
+<div metal:fill-slot="body">
+
+ <p i18n:translate="">You can configure the RAM Cache here.</p>
+
+ <div tal:condition="python: options.has_key('errors') and
+ options['errors']">
+ <span style="font-weight: bold" i18n:translate="">Errors:</span>
+ <div tal:repeat="error options/errors | nothing">
+ <span tal:replace="python: error[0].title" />:
+ <span tal:replace="python: error[1].error_name" />
</div>
- <br />
+ </div>
+ <br />
- <form action="./" method="post" enctype="multipart/form-data">
- <table class="EditTable">
- <tr>
- <th class="EditAttributeName" i18n:translate="">Maximum cached entries</th>
- <td class="EditAttributeValue">
- <input type="text" name="maxEntries:int"
- tal:attributes="value context/maxEntries"/>
-
- </td>
- </tr>
- <tr>
- <th class="EditAttributeName" i18n:translate="">Maximum age of cached entries</th>
- <td class="EditAttributeValue">
- <input type="text" name="maxAge:int"
- tal:attributes="value context/maxAge"/>
-
- </td>
- </tr>
- <tr>
- <th class="EditAttributeName" i18n:translate="">Time between cache cleanups</th>
- <td class="EditAttributeValue">
- <input type="text" name="cleanupInterval:int"
- tal:attributes="value context/cleanupInterval"/>
-
- </td>
- </tr>
- </table>
-
- <input type="submit" name="editAction.html:method" value="Save Changes" i18n:attributes="value" />
- <input type="reset" value="Reset" i18n:attributes="value" />
- </form>
- <div tal:replace="options/message|nothing" />
+ <form action="./" method="post" enctype="multipart/form-data">
+ <table class="EditTable">
+ <tr>
+ <th class="EditAttributeName" i18n:translate="">
+ Maximum cached entries
+ </th>
+ <td class="EditAttributeValue">
+ <input type="text" name="maxEntries:int"
+ tal:attributes="value context/maxEntries"/>
+
+ </td>
+ </tr>
+ <tr>
+ <th class="EditAttributeName" i18n:translate="">
+ Maximum age of cached entries
+ </th>
+ <td class="EditAttributeValue">
+ <input type="text" name="maxAge:int"
+ tal:attributes="value context/maxAge"/>
+
+ </td>
+ </tr>
+ <tr>
+ <th class="EditAttributeName" i18n:translate="">
+ Time between cache cleanups
+ </th>
+ <td class="EditAttributeValue">
+ <input type="text" name="cleanupInterval:int"
+ tal:attributes="value context/cleanupInterval"/>
+
+ </td>
+ </tr>
+ </table>
+
+ <input type="submit" name="editAction.html:method" value="Save Changes"
+ i18n:attributes="value save-changes-button" />
+ <input type="reset" value="Reset" i18n:attributes="value reset-button" />
+ </form>
+ <div tal:content="options/message|nothing" i18n:translate=""/>
- </div>
- </body>
+</div>
+</body>
</html>
=== Zope3/src/zope/app/browser/cache/ramstats.pt 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/cache/ramstats.pt:1.4 Fri Jun 13 13:41:11 2003
+++ Zope3/src/zope/app/browser/cache/ramstats.pt Wed Aug 6 10:41:24 2003
@@ -1,40 +1,40 @@
<html metal:use-macro="views/standard_macros/page">
- <body>
- <div metal:fill-slot="body">
+<body>
+<div metal:fill-slot="body">
- <p><span tal:replace="context/zope:name"/> RAMCache statistics</p>
+ <p><span tal:replace="context/zope:name"/> RAMCache statistics</p>
- <div tal:condition="python: options.has_key('errors') and
- options['errors']">
- <span style="font-weight: bold">Errors:</span>
- <div tal:repeat="error options/errors | nothing">
- <span tal:replace="python: error[0].title" />:
- <span tal:replace="python: error[1].error_name" />
- </div>
+ <div tal:condition="python: options.has_key('errors') and
+ options['errors']">
+ <span style="font-weight: bold" i18n:translate="">Errors:</span>
+ <div tal:repeat="error options/errors | nothing">
+ <span tal:replace="python: error[0].title" />:
+ <span tal:replace="python: error[1].error_name" />
</div>
- <br />
- <table id="sortable" class="listing" summary="Content listing"
- cellpadding="2" cellspacing="0" >
- <thead>
- <th>Path</th>
- <th>Hits</th>
- <th>Misses</th>
- <th>Size, bytes</th>
- <th>Entries</th>
- </thead>
- <tbody>
- <tr tal:repeat="data context/getStatistics">
- <td><span tal:content="data/path"> </span></td>
- <td><span tal:content="data/hits"> </span></td>
- <td><span tal:content="data/misses"> </span></td>
- <td><span tal:content="data/size"> </span></td>
- <td><span tal:content="data/entries"> </span></td>
- </tr>
- </tbody>
- </table>
-
- <div tal:replace="options/message|nothing" />
</div>
- </body>
+ <br />
+ <table id="sortable" class="listing" summary="Content listing"
+ cellpadding="2" cellspacing="0" >
+ <thead>
+ <th i18n:translate="">Path</th>
+ <th i18n:translate="">Hits</th>
+ <th i18n:translate="">Misses</th>
+ <th i18n:translate="">Size, bytes</th>
+ <th i18n:translate="">Entries</th>
+ </thead>
+ <tbody>
+ <tr tal:repeat="data context/getStatistics">
+ <td><span tal:content="data/path"> </span></td>
+ <td><span tal:content="data/hits"> </span></td>
+ <td><span tal:content="data/misses"> </span></td>
+ <td><span tal:content="data/size"> </span></td>
+ <td><span tal:content="data/entries"> </span></td>
+ </tr>
+ </tbody>
+ </table>
+
+ <div tal:content="options/message|nothing" i18n:translate=""/>
+</div>
+</body>
</html>
More information about the Zope3-Checkins
mailing list