diff --git a/locales/extract.js b/locales/extract.js index 28f31d05..044cbc4f 100644 --- a/locales/extract.js +++ b/locales/extract.js @@ -1,6 +1,6 @@ 'use strict'; -// Example: +// Processes statements like these: // tUI(/*prefix:account*/'account.passwordChangeRequest', language) // /*prefix:helpers*/Hello {{name}}, you have {{count}} unread message. Go to messages. @@ -290,8 +290,8 @@ function processFile(file) { update(fragments, parseTrans); if (anyUpdates) { -// console.log(`Updating ${file}`); -// fs.writeFileSync(file, source); + console.log(`Updating ${file}`); + fs.writeFileSync(file, source); anyUpdatesToResDict = true; } @@ -309,14 +309,11 @@ function run() { } if (anyUpdatesToResDict) { -// console.log(`Updating ${localeFile}`); -// fs.writeFileSync(localeFile, JSON.stringify(resDict, null, 2)); - console.log(JSON.stringify(resDict, null, 2)); + console.log(`Updating ${localeFile}`); + fs.writeFileSync(localeFile, JSON.stringify(resDict, null, 2)); } } -processFile('../client/src/templates/helpers.js'); -/* const rl = readline.createInterface({ input: process.stdin, output: process.stdout @@ -330,5 +327,3 @@ rl.question('To proceed type YES: ', (answer) => { rl.close(); }); -*/ -run(); \ No newline at end of file