[Zope3-checkins]
SVN: Zope3/branches/3.2/src/zope/app/applicationcontrol/browser/servercontrol.py
Added two translation slots
Dmitry Vasiliev
dima at hlabs.spb.ru
Sat Dec 17 06:30:13 EST 2005
Log message for revision 40841:
Added two translation slots
Changed:
U Zope3/branches/3.2/src/zope/app/applicationcontrol/browser/servercontrol.py
-=-
Modified: Zope3/branches/3.2/src/zope/app/applicationcontrol/browser/servercontrol.py
===================================================================
--- Zope3/branches/3.2/src/zope/app/applicationcontrol/browser/servercontrol.py 2005-12-17 10:17:23 UTC (rev 40840)
+++ Zope3/branches/3.2/src/zope/app/applicationcontrol/browser/servercontrol.py 2005-12-17 11:30:12 UTC (rev 40841)
@@ -22,6 +22,7 @@
from zope.app.i18n import ZopeMessageFactory as _
+
class ServerControlView(object):
def serverControl(self):
@@ -29,15 +30,14 @@
def action(self):
"""Do the shutdown/restart!"""
- # TODO I18N the responses
control = self.serverControl()
+ time = self.request.get('time', 0)
- if 'time' in self.request:
- time = self.request.get('time', 0)
-
if 'restart' in self.request:
control.restart(time)
- return u"The server will be restarted in %s seconds." % time
+ return _("The server will be restarted in ${number} seconds.",
+ mapping={"number": time})
elif 'shutdown' in self.request:
control.shutdown(time)
- return u"The server will be shutdown in %s seconds." % time
+ return _("The server will be shutdown in ${number} seconds.",
+ mapping={"number": time})
More information about the Zope3-Checkins
mailing list