From 5ddec759a2a71c553cfffbab02033fdb37470a2d Mon Sep 17 00:00:00 2001 From: 0neGal Date: Tue, 23 Jul 2024 17:08:32 +0200 Subject: added "Check localizations" action --- scripts/langs.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'scripts/langs.js') diff --git a/scripts/langs.js b/scripts/langs.js index 23b9924..b2f5287 100644 --- a/scripts/langs.js +++ b/scripts/langs.js @@ -361,10 +361,18 @@ let check = (logging = true) => { // run `check()` if `--check()` is set if (args["check"]) { - let problems = check(); + let has_problems = false; + + // check localizations, and set `has_problems` depending on whether + // any localization files have problems + Object.values(check()).forEach((item) => { + if (item.length) { + has_problems = true; + } + }); // exit with the correct exit code - if (problems.length) { + if (has_problems) { process.exit(1); } else { process.exit(); -- cgit v1.2.3