[Zope3-checkins]
SVN: Zope3/trunk/src/zope/app/component/browser/tools.py
Added translation slots. Removed unused imports and print
statements.
Dmitry Vasiliev
dima at hlabs.spb.ru
Fri May 6 03:55:36 EDT 2005
Log message for revision 30267:
Added translation slots. Removed unused imports and print statements.
Changed:
U Zope3/trunk/src/zope/app/component/browser/tools.py
-=-
Modified: Zope3/trunk/src/zope/app/component/browser/tools.py
===================================================================
--- Zope3/trunk/src/zope/app/component/browser/tools.py 2005-05-06 06:50:56 UTC (rev 30266)
+++ Zope3/trunk/src/zope/app/component/browser/tools.py 2005-05-06 07:55:36 UTC (rev 30267)
@@ -20,10 +20,11 @@
from zope.app import zapi
from zope.app.component import site, interfaces, browser
-from zope.app.container.browser import adding
from zope.app.event import objectevent
+from zope.app.i18n import ZopeMessageIDFactory as _
+
class IToolType(zope.interface.interfaces.IInterface):
"""Interfaces implementing the tool type are considered tools."""
@@ -76,10 +77,10 @@
msg = u''
if "INSTALL-SUBMIT" in self.request:
self.install()
- msg = u'Tools successufully installed.'
+ msg = _(u'Tools successufully installed.')
if "UNINSTALL-SUBMIT" in self.request:
self.uninstall()
- msg = u'Tools successufully uninstalled.'
+ msg = _(u'Tools successufully uninstalled.')
if "ADD-TOOL-SUBMIT" in self.request:
self.action(self.request['type_name'], self.request['id'])
elif "CANCEL-ADD-TOOL-SUBMIT" in self.request:
@@ -87,10 +88,10 @@
self.activeTool = None
elif "ACTIVATE-SUBMIT" in self.request:
self.changeStatus(interfaces.registration.ActiveStatus)
- msg = u'Tools successfully activated.'
+ msg = _(u'Tools successfully activated.')
elif "DEACTIVATE-SUBMIT" in self.request:
self.changeStatus(interfaces.registration.InactiveStatus)
- msg = u'Tools successfully deactivated.'
+ msg = _(u'Tools successfully deactivated.')
elif "ADD-SUBMIT" in self.request:
self.addTool = True
elif "DELETE-SUBMIT" in self.request:
@@ -100,7 +101,7 @@
self.renameList = self.request['selected']
if 'new_names' in self.request:
self.rename()
- msg = u'Tools successullfy renamed.'
+ msg = _(u'Tools successullfy renamed.')
elif "RENAME-CANCEL-SUBMIT" in self.request:
self.activeTool = None
return msg
@@ -111,7 +112,7 @@
if not tool.folder in sm:
folder = site.SiteManagementFolder()
zope.event.notify(objectevent.ObjectCreatedEvent(folder))
- sm[tool.folder] = folder
+ sm[tool.folder] = folder
return sm[tool.folder]
def toolExists(self, interface, name=''):
@@ -183,10 +184,8 @@
tool = self.activeTool
regManager = self.context[tool.folder].registrationManager
names = self.request.form['selected']
- print names
for reg in regManager.values():
if reg.provided.isOrExtends(tool.interface) and reg.name in names:
- print reg.name
reg.status = status
def delete(self):
@@ -229,7 +228,7 @@
self.context = sm
return util
-
+
def nextURL(self):
"""See zope.app.container.interfaces.IAdding"""
return (zapi.absoluteURL(self.context, self.request)
More information about the Zope3-Checkins
mailing list