mirror of https://github.com/vector-im/riot-web
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.pull/21833/head
parent
1b4570ffa1
commit
fb262596b2
|
@ -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 = {
|
||||
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,
|
||||
'%(senderName)s added %(addedAddresses)s and removed %(removedAddresses)s as addresses for this room.', {
|
||||
senderName: senderName,
|
||||
addedAddresses: addedAliases.join(', '),
|
||||
removedAddresses: removedAliases.join(', '),
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue