aboutsummaryrefslogtreecommitdiff
path: root/build/langs.js
blob: 9e21dff7f42a3b11e4e3d19edc5d0861c0f0ca79 (plain)
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
const fs = require("fs");

let lang = require("../src/lang/en.json");
let maintainers = require("../src/lang/maintainers.json");

langs = fs.readdirSync("src/lang")
langs.forEach((localefile) => {
	if (localefile == "maintainers.json") {return}

	let missing = [];
	let langmaintainers = maintainers.list[localefile.replace(/\..*$/, "")];
	let locale = require("../src/lang/" + localefile)
	for (let i in lang) {
		if (! locale[i]) {
			missing.push(i);
		}
	}

	if (missing.length > 0) {
		console.error(`${localefile} is missing:`)
		for (let i in missing) {
			console.log(`  ${missing[i]}`)
		}

		console.log()

		console.log("Maintainers of language: ")
		for (let i in langmaintainers) {
			console.log(`  ${langmaintainers[i]}`)
		}
	}
})