[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/ Added new translation slots

Dmitry Vasiliev dima at hlabs.spb.ru
Mon May 30 06:58:50 EDT 2005


Log message for revision 30553:
  Added new translation slots
  

Changed:
  U   Zope3/trunk/src/zope/app/apidoc/ifacemodule/menu.pt
  U   Zope3/trunk/src/zope/app/container/dependency.py

-=-
Modified: Zope3/trunk/src/zope/app/apidoc/ifacemodule/menu.pt
===================================================================
--- Zope3/trunk/src/zope/app/apidoc/ifacemodule/menu.pt	2005-05-30 10:56:37 UTC (rev 30552)
+++ Zope3/trunk/src/zope/app/apidoc/ifacemodule/menu.pt	2005-05-30 10:58:20 UTC (rev 30553)
@@ -5,22 +5,22 @@
   <div metal:fill-slot="menu" class="small">
 
     <div>
-      <span i18n:translate="">Interface Finder:</span> 
+      <span i18n:translate="">Interface Finder:</span>
     </div>
     <form action="menu.html" method="post">
       <input type="checkbox" name="name_only" value="on" checked="checked" />
-      name only search
+      <tal:block i18n:translate="">name only search</tal:block>
       <br />
       <input type="text" name="search_str" 
-             style="font-size: 80%; width=95%" 
+             style="font-size: 80%; width=95%"
              tal:attributes="value request/search_str|nothing" />
-      <input type="submit" name="SUBMIT" value="Find" 
+      <input type="submit" name="SUBMIT" value="Find"
              i18n:attributes="value find-button" style="font-size: 80%"/>
     </form>
 
     <div tal:define="ifaces view/findInterfaces"
          tal:condition="ifaces">
-    
+
       <div tal:repeat="info ifaces">
         <a href="" target="main"
            tal:attributes="href info/url"
@@ -33,7 +33,7 @@
   </div>
 
   <p metal:fill-slot="post_menu" class="small" i18n:translate="">
-    Note: These are only interfaces that are registered with the site manager. 
+    Note: These are only interfaces that are registered with the site manager.
   </p>
 
 </body>

Modified: Zope3/trunk/src/zope/app/container/dependency.py
===================================================================
--- Zope3/trunk/src/zope/app/container/dependency.py	2005-05-30 10:56:37 UTC (rev 30552)
+++ Zope3/trunk/src/zope/app/container/dependency.py	2005-05-30 10:58:20 UTC (rev 30553)
@@ -21,13 +21,15 @@
 __docformat__ = 'restructuredtext'
 
 from zope.app import zapi
+from zope.app.i18n import ZopeMessageIDFactory as _
 from zope.app.dependable.interfaces import IDependable, DependencyError
 
-exception_msg = """
-Removal of object (%s) which has dependents (%s) is not possible !
+exception_msg = _("""
+Removal of object (${object}) which has dependents (${dependents})
+is not possible !
 
-You must desactivate this object before trying to remove it.
-"""
+You must deactivate this object before trying to remove it.
+""")
 
 def CheckDependency(event):
     object = event.object
@@ -35,7 +37,9 @@
     if dependency is not None:
         dependents = dependency.dependents()
         if dependents:
-            objectpath = zapi.getPath(object)
-            raise DependencyError(exception_msg
-                                  % (objectpath,
-                                     ", ".join(dependents)))
+            mapping = {
+                "object": zapi.getPath(object),
+                "dependents": ", ".join(dependents)
+                }
+            exception_msg.mapping = mapping
+            raise DependencyError(exception_msg)



More information about the Zope3-Checkins mailing list