migrate: Don't fail dashboard migration just because a locale is missing
This commit is contained in:
parent
861c5601b6
commit
49e84f2ad0
|
@ -9,6 +9,7 @@ use Icinga\Application\Icinga;
|
|||
use Icinga\Application\Modules\DashboardContainer;
|
||||
use Icinga\Cli\Command;
|
||||
use Icinga\Application\Logger;
|
||||
use Icinga\Exception\IcingaException;
|
||||
use Icinga\Util\Translator;
|
||||
use ReflectionClass;
|
||||
|
||||
|
@ -58,7 +59,12 @@ class DashboardCommand extends Command
|
|||
continue;
|
||||
}
|
||||
|
||||
try {
|
||||
Translator::setupLocale($locale);
|
||||
} catch (IcingaException $e) {
|
||||
Logger::debug('Ignoring locale "%s". Reason: %s', $locale, $e->getMessage());
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($paneItemsProperty->getValue($module) as $paneName => $container) {
|
||||
/** @var DashboardContainer $container */
|
||||
|
|
Loading…
Reference in New Issue