From 37e0db032bc5ad706c1ba11c7d37b0182e29cc5d Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Wed, 5 Jun 2019 13:48:21 +0200 Subject: [PATCH] generate_lang_file.php : try translating message using gettext before asking it --- public_html/lang/generate_lang_file.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public_html/lang/generate_lang_file.php b/public_html/lang/generate_lang_file.php index 81c6b786..97084121 100755 --- a/public_html/lang/generate_lang_file.php +++ b/public_html/lang/generate_lang_file.php @@ -165,6 +165,9 @@ function add($msg, $context=null) { if (array_key_exists($msg, $translations)) { $translation = $translations[$msg]; } + elseif (_($msg) != $msg) { + $translation = _($msg); + } elseif ($interactive && $format != 'pot') { if ($copyoriginalvalue) { fwrite(STDERR, "\"$msg\"\n\n => Please enter translated string (or leave empty to copy original string) : ");