Merge pull request #2181 from matrix-org/travis/fix-i18n-script-1

Provide more helpful errors when i18n generation fails
pull/21833/head
Travis Ralston 2018-09-27 12:08:12 -06:00 committed by GitHub
commit cf0c12f679
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 7 deletions

View File

@ -158,6 +158,7 @@ function getTranslationsJs(file) {
} catch (e) {
console.log();
console.error(`ERROR: ${file}:${node.loc.start.line} ${tKey}`);
console.error(e);
process.exit(1);
}
}

View File

@ -228,14 +228,12 @@ function textForRoomAliasesEvent(ev) {
removedAddresses: removedAliases.join(', '),
});
} else {
const args = {
return _t(
'%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.', {
senderName: senderName,
addedAddresses: addedAliases.join(', '),
removedAddresses: removedAliases.join(', '),
};
return _t(
'%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.',
args,
},
);
}
}