From 3f9e61e338ee924602a8f8c0bbaa4ea789f12345 Mon Sep 17 00:00:00 2001 From: Yuri D'Elia Date: Thu, 13 Oct 2022 20:19:19 +0200 Subject: [PATCH] lang: Add --errors-only to suppress all warnings/suggestions --- lang/lang-check.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lang/lang-check.py b/lang/lang-check.py index a1873718d..618b6b03d 100755 --- a/lang/lang-check.py +++ b/lang/lang-check.py @@ -307,6 +307,9 @@ def main(): parser.add_argument( "--no-suggest", action="store_true", help="Disable suggestions") + parser.add_argument( + "--errors-only", action="store_true", + help="Only check errors") parser.add_argument( "--pot", action="store_true", help="Do not check translations") @@ -331,6 +334,10 @@ def main(): print("{}: file does not exist or is not a regular file".format(args.po), file=stderr) return 1 + if args.errors_only: + args.no_warning = True + args.no_suggest = True + # load the symbol map to supress empty (but unused) translation warnings msgids = None if args.map: