diff options
-rw-r--r-- | build/langs.js | 18 | ||||
-rw-r--r-- | package.json | 1 |
2 files changed, 19 insertions, 0 deletions
diff --git a/build/langs.js b/build/langs.js new file mode 100644 index 0000000..0e82022 --- /dev/null +++ b/build/langs.js @@ -0,0 +1,18 @@ +const fs = require("fs"); + +let lang = require("../src/lang/en.json"); + +langs = fs.readdirSync("src/lang") +langs.forEach((localefile) => { + let missing = []; + 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: ${missing}`) + } +}) diff --git a/package.json b/package.json index 54bef85..de8dcee 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ } }, "scripts": { + "langs": "node build/langs.js", "start": "npx electron src/index.js", "debug": "npx electron src/index.js --debug", "man": "npx marked-man docs/viper.1.md > docs/viper.1", |