InstanceConfigForm: Translate exceptions shown to the user

This commit is contained in:
Johannes Meyer 2015-07-23 16:18:44 +02:00
parent 666c401a40
commit 0448323697
1 changed files with 4 additions and 1 deletions

View File

@ -95,7 +95,10 @@ class InstanceConfigForm extends ConfigForm
$instanceName = $data['name'];
if ($this->config->hasSection($instanceName)) {
throw new IcingaException('A monitoring instance with the name "%s" does already exist', $instanceName);
throw new IcingaException(
$this->translate('A monitoring instance with the name "%s" does already exist'),
$instanceName
);
}
unset($data['name']);