mirror of
https://github.com/zadam/trilium.git
synced 2026-01-11 00:54:26 +01:00
22 lines
676 B
TypeScript
22 lines
676 B
TypeScript
import { LOCALES } from "../../packages/commons/src/lib/i18n";
|
|
import { getLanguageStats } from "./utils";
|
|
|
|
async function main() {
|
|
const languageStats = await getLanguageStats("client");
|
|
const localeIdsWithCoverage = languageStats.results
|
|
.filter(language => language.translated_percent > 50)
|
|
.map(language => language.language_code);
|
|
|
|
for (const localeId of localeIdsWithCoverage) {
|
|
const locale = LOCALES.find(l => l.id === localeId);
|
|
if (!locale) {
|
|
console.error(`Locale not found for id: ${localeId}`);
|
|
process.exit(1);
|
|
}
|
|
}
|
|
|
|
console.log("Translation coverage check passed.");
|
|
}
|
|
|
|
main();
|