From 455489c9fe66e2509fb53e577e4848645306ed25 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Mon, 27 Nov 2017 23:47:52 +0100 Subject: [PATCH] Ignore untranslated texts in check_po.pl check_po.pl lists lots of false positives saying that msgstr "" does not have the (h)otkey translated. This patch whitelists those untranslated strings. I also tested (by manually "breaking" a translation) that missing hotkeys still get noticed. This bug probably exists since forever, therefore I propose this patch for 2.9..trunk. (OTOH, nobody noticed it, so maybe trunk is enough ;-) Note: I still get a few false positives for ru.po (no idea why, similar texts in the other languages don't cause this) - ideas and fixes welcome. --- utils/check_po.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/check_po.pl b/utils/check_po.pl index b9ccec857..6c9bb2e93 100755 --- a/utils/check_po.pl +++ b/utils/check_po.pl @@ -38,7 +38,7 @@ sub check_po_for_shortcuts { $msgid = $_; } if ( /^.*msgstr*/ && $looking_for_msgstr ) { - unless (/^.*msgstr.*\(\w{1}?\)*/) { + unless (/^.*msgstr.*\(\w{1}?\)*/ or /^msgstr ""$/) { $errors->{$filename}{$line} = { "msgid" => $msgid, "msgstr" => $_,