This module reconciles translations between local and global files
node index.js <pathToSearchFolder> <pathToOutputFolder> <supportedLanguageArray> <sourceOfValueTruth: default to "local">
node index.js ../DeedMob ../DeedMob/intl/ en,nl global
- Currently changing path between executions will yield unexpected results, so path would be better relative to the directory, not this directory.
- Source of truth for values of keys (if they have one) is determined by the last argument
- Throw error message if missing language key
- Localized is source of truth on which keys there are
- Alphabetical/deterministic order of object props & keys to minimize git diff problems
Should create global files of structure in output
/* en.js
module.exports = { "../AccountForm/translations": { "profile": "User Profile", "account": "User Account" }, "../ProfileForm/translations" : { "vacancy": "Something" } };
*/