From 040acb311f6f8e086ee6ed6a700c39d064cd0c7d Mon Sep 17 00:00:00 2001 From: kkapsner Date: Wed, 12 Sep 2018 22:54:25 +0200 Subject: [PATCH] Added missing translation checker --- .tools/checkMissingTranslation.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .tools/checkMissingTranslation.js diff --git a/.tools/checkMissingTranslation.js b/.tools/checkMissingTranslation.js new file mode 100644 index 0000000..56e7eef --- /dev/null +++ b/.tools/checkMissingTranslation.js @@ -0,0 +1,15 @@ +const en = require("../_locales/en/messages.json"); +const enKeys = Object.keys(en); + +const language = process.argv[2]; + +const la = require("../_locales/" + language + "/messages.json"); +const laKeys = Object.keys(la); + +enKeys.forEach(function(key){ + if (en[key].message){ + if (!la[key] || !la[key].message){ + console.log(key, "missing"); + } + } +}); \ No newline at end of file