[Zope3-checkins] CVS: Zope3/src/zope/app/browser/cache - cacheable.py:1.5 cacheableedit.pt:1.4 ramedit.pt:1.3
Godefroid Chapelle
gotcha@swing.be
Tue, 8 Apr 2003 16:58:03 -0400
Update of /cvs-repository/Zope3/src/zope/app/browser/cache
In directory cvs.zope.org:/tmp/cvs-serv10882
Modified Files:
cacheable.py cacheableedit.pt ramedit.pt
Log Message:
i18n
=== Zope3/src/zope/app/browser/cache/cacheable.py 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/cache/cacheable.py:1.4 Thu Jan 23 04:53:26 2003
+++ Zope3/src/zope/app/browser/cache/cacheable.py Tue Apr 8 16:58:02 2003
@@ -30,6 +30,9 @@
from zope.app.interfaces.form import WidgetInputError
from zope.app.pagetemplate.viewpagetemplatefile import ViewPageTemplateFile
+from zope.i18n.messageid import MessageIDFactory
+
+_ = MessageIDFactory("zope")
class CacheableView(BrowserView):
@@ -60,9 +63,9 @@
location = getLocationForCache(self.context)
if cache and location:
cache.invalidate(location)
- return self.form(message="Invalidated.")
+ return self.form(message=_(u"Invalidated."))
else:
- return self.form(message="No cache associated with object.")
+ return self.form(message=_(u"No cache associated with object."))
def action(self):
"Change the cacheId"
@@ -73,4 +76,4 @@
return repr(e.errors)
else:
self.cacheable.setCacheId(cacheId)
- return self.form(message="Saved changes.")
+ return self.form(message=_(u"Saved changes."))
=== Zope3/src/zope/app/browser/cache/cacheableedit.pt 1.3 => 1.4 ===
--- Zope3/src/zope/app/browser/cache/cacheableedit.pt:1.3 Thu Jan 23 04:53:26 2003
+++ Zope3/src/zope/app/browser/cache/cacheableedit.pt Tue Apr 8 16:58:02 2003
@@ -1,14 +1,14 @@
-<html metal:use-macro="views/standard_macros/page">
+<html metal:use-macro="views/standard_macros/page" i18n:domain="zope">
<body>
<div metal:fill-slot="body">
- <p>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">
+ <p tal:condition="not: view/current_cache_id" i18n:translate="">
Currently there is no cache associated with the object.
</p>
- <p tal:condition="view/current_cache_id">
+ <p tal:condition="view/current_cache_id" i18n:translate="">
Currently the object uses
<a tal:omit-tag="not:view/current_cache_url"
tal:attributes="href view/current_cache_url"
@@ -17,7 +17,7 @@
<div tal:condition="python: options.has_key('errors') and
options['errors']">
- <span style="font-weight: bold">Errors:</span>
+ <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" />
@@ -31,7 +31,7 @@
<table class="EditTable">
<tr>
- <th class="EditAttributeName">Cache name</th>
+ <th class="EditAttributeName" i18n:translate="">Cache name</th>
<td class="EditAttributeValue"
tal:content="structure view/cacheId">
<input size="20" />
@@ -40,12 +40,12 @@
</table>
<input type="submit" name="ChangeCaching.html:method"
- value="Save Changes" />
+ value="Save Changes" i18n:attributes="value" />
<input type="submit" name="InvalidateCache.html:method"
- value="Invalidate Cached Value" />
+ value="Invalidate Cached Value" i18n:attributes="value" />
</form>
- <div tal:replace="options/message|nothing" />
+ <div tal:content="options/message|nothing" i18n:translate="" />
</div>
</body>
=== Zope3/src/zope/app/browser/cache/ramedit.pt 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/cache/ramedit.pt:1.2 Wed Dec 25 09:12:28 2002
+++ Zope3/src/zope/app/browser/cache/ramedit.pt Tue Apr 8 16:58:02 2003
@@ -1,12 +1,12 @@
-<html metal:use-macro="views/standard_macros/page">
+<html metal:use-macro="views/standard_macros/page" i18n:domain="zope">
<body>
<div metal:fill-slot="body">
- <p>You can configure the RAM Cache here.</p>
+ <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">Errors:</span>
+ <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" />
@@ -17,7 +17,7 @@
<form action="./" method="post" enctype="multipart/form-data">
<table class="EditTable">
<tr>
- <th class="EditAttributeName">Maximum cached entries</th>
+ <th class="EditAttributeName" i18n:translate="">Maximum cached entries</th>
<td class="EditAttributeValue">
<input type="text" name="maxEntries:int"
tal:attributes="value context/maxEntries"/>
@@ -25,7 +25,7 @@
</td>
</tr>
<tr>
- <th class="EditAttributeName">Maximum age of cached entries</th>
+ <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"/>
@@ -33,7 +33,7 @@
</td>
</tr>
<tr>
- <th class="EditAttributeName">Time between cache cleanups</th>
+ <th class="EditAttributeName" i18n:translate="">Time between cache cleanups</th>
<td class="EditAttributeValue">
<input type="text" name="cleanupInterval:int"
tal:attributes="value context/cleanupInterval"/>
@@ -42,8 +42,8 @@
</tr>
</table>
- <input type="submit" name="editAction.html:method" value="Save Changes" />
- <input type="reset" value="Reset" />
+ <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" />