diff --git a/library/Icinga/Application/functions.php b/library/Icinga/Application/functions.php index 3ae0c7ba9..0ec120a8c 100644 --- a/library/Icinga/Application/functions.php +++ b/library/Icinga/Application/functions.php @@ -3,6 +3,23 @@ use Icinga\Util\Translator; + +/** + * No-op translate + * + * Supposed to be used for marking a string as available for translation without actually translating it immediately. + * The returned string is the one given in the input. This does only work with the standard gettext macros t() and mt(). + * + * @param string $messageId + * + * @return string + */ +function N_($messageId) +{ + return $messageId; +} + + if (extension_loaded('gettext')) { /** diff --git a/modules/translation/library/Translation/Util/GettextTranslationHelper.php b/modules/translation/library/Translation/Util/GettextTranslationHelper.php index c3a6d206e..142de8db2 100644 --- a/modules/translation/library/Translation/Util/GettextTranslationHelper.php +++ b/modules/translation/library/Translation/Util/GettextTranslationHelper.php @@ -290,6 +290,7 @@ class GettextTranslationHelper '--keyword=t:1,2c', '--keyword=tp:1,2', '--keyword=tp:1,2,4c', + '--keyword=N_', '--sort-output', '--force-po', '--omit-header',