Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | #!/usr/bin/env node import { blue, yellow, white, red, green } from "ansis"; import { checkMissingTranslations } from "./locale/check-translations"; async function runTranslationCheck() { try { console.log(blue`\nChecking for missing translations...\n`); const result = await checkMissingTranslations(); const { hasMissingTranslations, missingTranslations } = result; if (missingTranslations.length > 0) { missingTranslations.forEach(({ key, file, missingLocales }) => { console.log(white`\nš Key: ${key}`); missingLocales.forEach((locale) => { console.log(red` - Missing in š locales/${locale}/${file}.json`); }); console.log(); }); } else { console.log(green`ā All translations present`); } if (hasMissingTranslations) { console.error(red`\nā ļø Some translations are missing. Please add them to maintain full language support.\n`); process.exit(1); } else { console.log(green`\nā All translations are complete!\n`); process.exit(0); } } catch (error) { console.error(red`\nError checking translations: ${error}`); process.exit(1); } } runTranslationCheck(); |