[Zope3-checkins] CVS: Zope3/src/zope/app/browser/container - adding.py:1.47

Stephan Richter srichter at cosmos.phy.tufts.edu
Mon Mar 8 18:34:27 EST 2004


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

Modified Files:
	adding.py 
Log Message:


Use new translation API.




=== Zope3/src/zope/app/browser/container/adding.py 1.46 => 1.47 ===
--- Zope3/src/zope/app/browser/container/adding.py:1.46	Sat Mar  6 11:50:12 2004
+++ Zope3/src/zope/app/browser/container/adding.py	Mon Mar  8 18:33:56 2004
@@ -37,6 +37,7 @@
 from zope.app.publisher.browser import BrowserView
 
 from zope.app.i18n import ZopeMessageIDFactory as _
+from zope.i18n import translate
 from zope.app.location import LocationProxy
 from zope.app.container.constraints import checkFactory
 
@@ -87,12 +88,10 @@
         add_button_value = _('add-button', 'Add')
         add_button_label = _('add-button-label','Object Name')
         
-        translation = zapi.getService(self.context,
-                                      zapi.servicenames.Translation)
-        add_button_value = translation.translate(add_button_value,
-                                             context=self.request)
-        add_button_label = translation.translate(add_button_label,
-                                             context=self.request)
+        add_button_value = translate(self.context, add_button_value,
+                                     context=self.request)
+        add_button_label = translate(self.context, add_button_label,
+                                     context=self.request)
         if IContainerNamesContainer.providedBy(container):
             return " <input type='submit' name='UPDATE_SUBMIT' value='%s'>" \
                    % add_button_value




More information about the Zope3-Checkins mailing list