Add support for no-op translations

refs #5600
This commit is contained in:
Johannes Meyer 2015-09-16 14:16:40 +02:00
parent c815a2b486
commit bbadb0b75c
2 changed files with 18 additions and 0 deletions

View File

@ -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')) {
/**

View File

@ -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',