functions.php: failsafe method initialization
This avoids collisions for modules not using the fake bootstrap in our current tests. Can be removed once we fixed that.
This commit is contained in:
parent
1bbb7a3118
commit
9231746d09
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
use Icinga\Util\Translator;
|
use Icinga\Util\Translator;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* No-op translate
|
* No-op translate
|
||||||
*
|
*
|
||||||
|
@ -19,6 +18,11 @@ function N_($messageId)
|
||||||
return $messageId;
|
return $messageId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Workaround for test issues, this is required unless our tests are able to
|
||||||
|
// accomplish "real" bootstrapping
|
||||||
|
if (function_exists('t')) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (extension_loaded('gettext')) {
|
if (extension_loaded('gettext')) {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue