From 222054f5164bb903f0fc4a439e64cd9ce2a6ce8e Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Thu, 13 Oct 2022 20:05:39 +0200 Subject: [PATCH] lang: Handle empty translations wrt --no-warning Do not emit empty translation warnings if --no-warning has been specified. We have a special handler for this case already (--warn-empty). --- lang/lang-check.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/lang-check.py b/lang/lang-check.py index cc5310fa4..a1873718d 100755 --- a/lang/lang-check.py +++ b/lang/lang-check.py @@ -211,7 +211,7 @@ def check_translation(entry, msgids, is_pot, no_warning, no_suggest, warn_empty, return (errors == 0) # Missing translation - if len(translation) == 0 and (known_msgid or warn_empty): + if len(translation) == 0 and (warn_empty or (not no_warning and known_msgid)): errors += 1 if rows == 1: print(yellow("[W]: Empty translation for \"%s\" on line %d" % (source, line)))