mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Form: Fix translation domain detection while running unit tests
This commit is contained in:
parent
6e61980dd2
commit
ff263946c8
@ -1071,10 +1071,11 @@ class Form extends Zend_Form
|
||||
protected function getTranslationDomain()
|
||||
{
|
||||
$parts = explode('\\', get_called_class());
|
||||
if ($parts[1] === 'Module') {
|
||||
if (count($parts) > 1 && $parts[1] === 'Module') {
|
||||
// Assume format Icinga\Module\ModuleName\Forms\...
|
||||
return strtolower($parts[2]);
|
||||
}
|
||||
|
||||
return 'icinga';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user