monitoring: Use translatePlural for the success message in the DeleteDowntimesCommandForm

This commit is contained in:
Eric Lippmann 2015-08-21 10:28:28 +02:00
parent 8207579e13
commit ed25488cff
1 changed files with 6 additions and 3 deletions

View File

@ -57,15 +57,18 @@ class DeleteDowntimesCommandForm extends CommandForm
{ {
foreach ($this->downtimes as $downtime) { foreach ($this->downtimes as $downtime) {
$delDowntime = new DeleteDowntimeCommand(); $delDowntime = new DeleteDowntimeCommand();
$delDowntime->setDowntimeId($downtime->id); $delDowntime
$delDowntime->setIsService(isset($downtime->service_description)); ->setDowntimeId($downtime->id)
->setIsService(isset($downtime->service_description));
$this->getTransport($this->request)->send($delDowntime); $this->getTransport($this->request)->send($delDowntime);
} }
$redirect = $this->getElement('redirect')->getValue(); $redirect = $this->getElement('redirect')->getValue();
if (! empty($redirect)) { if (! empty($redirect)) {
$this->setRedirectUrl($redirect); $this->setRedirectUrl($redirect);
} }
Notification::success($this->translate('Deleting downtime.')); Notification::success(
$this->translatePlural('Deleting downtime..', 'Deleting downtimes..', count($this->downtimes))
);
return true; return true;
} }