Provide more helpful errors when i18n generation fails
Also fix TextForEvent.js so it doesn't break the script. Using a variable here is not recognized, so the object has been moved inline instead.
This commit is contained in:
parent
1b4570ffa1
commit
fb262596b2
2 changed files with 6 additions and 7 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue