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).
This commit is contained in:
Yuri D'Elia 2022-10-13 20:05:39 +02:00
parent f399e56677
commit 222054f516
1 changed files with 1 additions and 1 deletions

View File

@ -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)))