aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2022-01-26 00:41:06 +0100
committer0neGal <mail@0negal.com>2022-01-26 00:41:06 +0100
commitca9ac01957973cd0b8d3fbd640da1fdbb135a4e7 (patch)
tree7edf0492b69c7cc21da004fc2d82f537011cae42 /build
parent66204f6f58dc90e1e9ee40c7ea691927d0c50b8d (diff)
downloadViper-ca9ac01957973cd0b8d3fbd640da1fdbb135a4e7.tar.gz
Viper-ca9ac01957973cd0b8d3fbd640da1fdbb135a4e7.zip
added lang/maintainers.json, updated langs.js
langs.js now prints out a proper good looking output, and also now takes advantage of maintainers.json to provide proper information.
Diffstat (limited to 'build')
-rw-r--r--build/langs.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/build/langs.js b/build/langs.js
index 0e82022..9e21dff 100644
--- a/build/langs.js
+++ b/build/langs.js
@@ -1,10 +1,14 @@
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]) {
@@ -13,6 +17,16 @@ langs.forEach((localefile) => {
}
if (missing.length > 0) {
- console.error(`${localefile} is missing: ${missing}`)
+ 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]}`)
+ }
}
})