1 import { en } from './src/translations/en';
2 import { eo } from './src/translations/eo';
3 import { es } from './src/translations/es';
4 import { de } from './src/translations/de';
5 import { zh } from './src/translations/zh';
6 import { fr } from './src/translations/fr';
7 import { sv } from './src/translations/sv';
8 import { ru } from './src/translations/ru';
9 import { nl } from './src/translations/nl';
21 let masterKeys = Object.keys(en.translation);
23 let report = 'lang | done | missing\n';
24 report += '--- | --- | ---\n';
26 for (let file of files) {
27 let keys = Object.keys(file.t.translation);
28 let pct: number = (keys.length / masterKeys.length * 100);
29 let missing = difference(masterKeys, keys);
30 report += `${file.n} | ${pct.toFixed(0)}% | ${missing} \n`;
35 function difference(a: Array<string>, b: Array<string>): Array<string> {
36 return a.filter(x => !b.includes(x));