[Zope3-checkins] SVN: Zope3/trunk/src/zope/app/applicationcontrol/browser/servercontrol.py Merged revision 40841 from the 3.2 branch:

Dmitry Vasiliev dima at hlabs.spb.ru
Sat Dec 17 07:28:24 EST 2005


Log message for revision 40844:
  Merged revision 40841 from the 3.2 branch:
  
  Added two translation slots
  

Changed:
  U   Zope3/trunk/src/zope/app/applicationcontrol/browser/servercontrol.py

-=-
Modified: Zope3/trunk/src/zope/app/applicationcontrol/browser/servercontrol.py
===================================================================
--- Zope3/trunk/src/zope/app/applicationcontrol/browser/servercontrol.py	2005-12-17 11:34:32 UTC (rev 40843)
+++ Zope3/trunk/src/zope/app/applicationcontrol/browser/servercontrol.py	2005-12-17 12:28:23 UTC (rev 40844)
@@ -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