[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container - add.pt:1.5 add_confirmed.pt:1.3 adding.py:1.8

Godefroid Chapelle gotcha@swing.be
Tue, 8 Apr 2003 17:44:35 -0400


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

Modified Files:
	add.pt add_confirmed.pt adding.py 
Log Message:
i18n



=== Zope3/src/zope/app/browser/container/add.pt 1.4 => 1.5 ===
--- Zope3/src/zope/app/browser/container/add.pt:1.4	Mon Mar  3 18:16:02 2003
+++ Zope3/src/zope/app/browser/container/add.pt	Tue Apr  8 17:44:35 2003
@@ -1,11 +1,11 @@
-<html metal:use-macro="views/standard_macros/dialog">
+<html metal:use-macro="views/standard_macros/dialog" i18n:domain="zope">
 <body>
 
 <div metal:fill-slot="body">
 <form action="action.html" method="POST">
 <table class="TypeListing" cellpadding="3">
 
-  <caption>Add Content</caption>
+  <caption i18n:translate="">Add Content</caption>
 
     <tbody tal:repeat="info view/addingInfo">
 
@@ -40,7 +40,7 @@
       </td>
 
       <td class="TypeName">
-        <img alt="Folder" src="../../ZMI/www/document_icon.gif" />
+        <img alt="Folder" src="../../ZMI/www/document_icon.gif" i18n:attributes="alt" />
         Document
       </td>
 
@@ -48,7 +48,7 @@
 
     <tr>
       <td class="Selector"><br /></td>
-      <td class="TypeDescription">
+      <td class="TypeDescription" i18n:translate="">
           Documents are simple textual content.
       </td>
     </tr>
@@ -62,7 +62,7 @@
                tal:condition="view/namesAccepted"
 	       tal:attributes="value request/id | nothing"
         />
-        <input type="submit" value=" Add " />
+        <input type="submit" value=" Add " i18n:attributes="value" />
     </td>
   </tr>
 


=== Zope3/src/zope/app/browser/container/add_confirmed.pt 1.2 => 1.3 ===
--- Zope3/src/zope/app/browser/container/add_confirmed.pt:1.2	Wed Dec 25 09:12:29 2002
+++ Zope3/src/zope/app/browser/container/add_confirmed.pt	Tue Apr  8 17:44:35 2003
@@ -1,12 +1,12 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                       "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
+<html xmlns="http://www.w3.org/1999/xhtml" i18n:domain="zope">
 <!--
       metal:use-macro="presentation/standard_macros/html">
   -->
 <body>
 
-<p> Object added successfully. </p>
+<p i18n:translate=""> Object added successfully. </p>
 
 </body>
 </html>


=== Zope3/src/zope/app/browser/container/adding.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/browser/container/adding.py:1.7	Fri Mar  7 07:10:22 2003
+++ Zope3/src/zope/app/browser/container/adding.py	Tue Apr  8 17:44:35 2003
@@ -32,6 +32,8 @@
 from zope.publisher.browser import BrowserView
 from zope.publisher.interfaces import IPublishTraverse
 
+from zope.app.i18n import ZopeMessageIDFactory as _
+
 class Adding(BrowserView):
 
     __implements__ =  IAdding, IPublishTraverse
@@ -105,7 +107,7 @@
 
     def action(self, type_name='', id=''):
         if not type_name:
-            raise UserError("You must select the type of object to add.")
+            raise UserError(_(u"You must select the type of object to add."))
         
         if type_name.startswith('@@'):
             type_name = type_name[2:]
@@ -116,7 +118,7 @@
             return
 
         if not id:
-            raise ValueError("You must specify an id")
+            raise ValueError(_(u"You must specify an id"))
 
         self.contentName = id