From 7f3b1087a1c780a146665353a3ae6c92c66432ed Mon Sep 17 00:00:00 2001 From: Mike Cao Date: Wed, 2 Mar 2022 22:23:03 -0800 Subject: [PATCH] Fix check-lang script. Ignore all en-GB. --- lang-ignore.json | 5 +++-- scripts/check-lang.js | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lang-ignore.json b/lang-ignore.json index 2d3c38d1..079d8b98 100644 --- a/lang-ignore.json +++ b/lang-ignore.json @@ -9,6 +9,7 @@ "metrics.device.tablet", "metrics.referrers" ], + "en-GB": "*", "fr-FR": ["metrics.actions", "metrics.pages"], "lt-LT": [ "metrics.device.desktop", @@ -31,6 +32,6 @@ "message.powered-by", "metrics.device.desktop", "metrics.device.tablet", - "metrics.filter.raw", - ], + "metrics.filter.raw" + ] } diff --git a/scripts/check-lang.js b/scripts/check-lang.js index 823d7115..a916180a 100644 --- a/scripts/check-lang.js +++ b/scripts/check-lang.js @@ -23,7 +23,7 @@ files.forEach(file => { keys.forEach(key => { const orig = messages[key]; const check = lang[key]; - const ignored = ignore[id]?.includes(key); + const ignored = ignore[id] === '*' || ignore[id]?.includes(key); if (!ignored && (!check || check === orig)) { console.log(chalk.redBright('*'), chalk.greenBright(`${key}:`), orig); @@ -32,7 +32,7 @@ files.forEach(file => { }); if (count === 0) { - console.log('**👍 Complete!**'); + console.log('**Complete!**'); } } });