mirror of
https://activitypub.software/TransFem-org/Sharkey
synced 2024-11-23 22:45:11 +00:00
optionally list missing translations with verify.js
This commit is contained in:
parent
566d0aa2bf
commit
50c59889b0
1 changed files with 6 additions and 0 deletions
|
@ -1,5 +1,7 @@
|
|||
import locales from './index.js';
|
||||
|
||||
const showUntranslated = process.argv[2] == '-v';
|
||||
|
||||
let valid = true;
|
||||
|
||||
function writeError(type, lang, tree, data) {
|
||||
|
@ -34,6 +36,10 @@ function verify(expected, actual, lang, trace) {
|
|||
writeError('missing_parameter', lang, trace ? `${trace}.${key}` : key, { parameter });
|
||||
}
|
||||
}
|
||||
|
||||
if (showUntranslated && actual[key] == expected[key]) {
|
||||
writeError('untranslated', lang, trace ? `${trace}.${key}` : key, { original: expected[key] });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue