Fix check-lang script. Ignore all en-GB.

This commit is contained in:
Mike Cao 2022-03-02 22:23:03 -08:00
parent a4311d4773
commit 7f3b1087a1
2 changed files with 5 additions and 4 deletions

View File

@ -9,6 +9,7 @@
"metrics.device.tablet", "metrics.device.tablet",
"metrics.referrers" "metrics.referrers"
], ],
"en-GB": "*",
"fr-FR": ["metrics.actions", "metrics.pages"], "fr-FR": ["metrics.actions", "metrics.pages"],
"lt-LT": [ "lt-LT": [
"metrics.device.desktop", "metrics.device.desktop",
@ -31,6 +32,6 @@
"message.powered-by", "message.powered-by",
"metrics.device.desktop", "metrics.device.desktop",
"metrics.device.tablet", "metrics.device.tablet",
"metrics.filter.raw", "metrics.filter.raw"
], ]
} }

View File

@ -23,7 +23,7 @@ files.forEach(file => {
keys.forEach(key => { keys.forEach(key => {
const orig = messages[key]; const orig = messages[key];
const check = lang[key]; const check = lang[key];
const ignored = ignore[id]?.includes(key); const ignored = ignore[id] === '*' || ignore[id]?.includes(key);
if (!ignored && (!check || check === orig)) { if (!ignored && (!check || check === orig)) {
console.log(chalk.redBright('*'), chalk.greenBright(`${key}:`), orig); console.log(chalk.redBright('*'), chalk.greenBright(`${key}:`), orig);
@ -32,7 +32,7 @@ files.forEach(file => {
}); });
if (count === 0) { if (count === 0) {
console.log('**👍 Complete!**'); console.log('**Complete!**');
} }
} }
}); });