NavigationConfigForm: Translate non-translated error messages

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-24 15:50:40 +02:00
parent 3f22469c18
commit e8f93e8ea1

View File

@ -464,7 +464,10 @@ class NavigationConfigForm extends ConfigForm
$children = $this->getFlattenedChildren($name); $children = $this->getFlattenedChildren($name);
if (! empty($children)) { if (! empty($children)) {
throw new IcingaException( throw new IcingaException(
'Unable to delete navigation item "%s". There are other items dependent from it: %s', $this->translate(
'Unable to delete navigation item "%s". There'
. ' are other items dependent from it: %s'
),
$name, $name,
join(', ', $children) join(', ', $children)
); );
@ -500,8 +503,10 @@ class NavigationConfigForm extends ConfigForm
if ($parent && $this->hasBeenShared($parent)) { if ($parent && $this->hasBeenShared($parent)) {
throw new IcingaException( throw new IcingaException(
'Unable to unshare navigation item "%s". It is dependent from item "%s".' $this->translate(
. ' Dependent items can only be unshared by unsharing their parent', 'Unable to unshare navigation item "%s". It is dependent from item "%s".'
. ' Dependent items can only be unshared by unsharing their parent'
),
$name, $name,
$parent $parent
); );