This commit is contained in:
Tomas Bures 2018-11-18 16:44:49 +01:00
parent 3ad84a6bd5
commit 9f449c0a2f

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
// Example: // Processes statements like these:
// tUI(/*prefix:account*/'account.passwordChangeRequest', language) // tUI(/*prefix:account*/'account.passwordChangeRequest', language)
// /*prefix:helpers*/<Trans i18nKey="userMessagesUnread" count={count}>Hello <strong title={t('nameTitle')}>{{name}}</strong>, you have {{count}} unread message. <Link to="/msgs">Go to messages</Link>.</Trans> // /*prefix:helpers*/<Trans i18nKey="userMessagesUnread" count={count}>Hello <strong title={t('nameTitle')}>{{name}}</strong>, you have {{count}} unread message. <Link to="/msgs">Go to messages</Link>.</Trans>
@ -290,8 +290,8 @@ function processFile(file) {
update(fragments, parseTrans); update(fragments, parseTrans);
if (anyUpdates) { if (anyUpdates) {
// console.log(`Updating ${file}`); console.log(`Updating ${file}`);
// fs.writeFileSync(file, source); fs.writeFileSync(file, source);
anyUpdatesToResDict = true; anyUpdatesToResDict = true;
} }
@ -309,14 +309,11 @@ function run() {
} }
if (anyUpdatesToResDict) { if (anyUpdatesToResDict) {
// console.log(`Updating ${localeFile}`); console.log(`Updating ${localeFile}`);
// fs.writeFileSync(localeFile, JSON.stringify(resDict, null, 2)); fs.writeFileSync(localeFile, JSON.stringify(resDict, null, 2));
console.log(JSON.stringify(resDict, null, 2));
} }
} }
processFile('../client/src/templates/helpers.js');
/*
const rl = readline.createInterface({ const rl = readline.createInterface({
input: process.stdin, input: process.stdin,
output: process.stdout output: process.stdout
@ -330,5 +327,3 @@ rl.question('To proceed type YES: ', (answer) => {
rl.close(); rl.close();
}); });
*/
run();