fix spurious missing translation ('Default')

This commit is contained in:
Matthew Hodgson 2017-05-27 15:52:24 +01:00
parent 11b97adf54
commit 6d6b14a26c
2 changed files with 10 additions and 2 deletions

View file

@ -217,14 +217,21 @@ function textForPowerEvent(event) {
const to = event.getContent().users[userId]; const to = event.getContent().users[userId];
if (to !== from) { if (to !== from) {
diff.push( diff.push(
_t('%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s', {userId: userId, fromPowerLevel: Roles.textualPowerLevel(from, userDefault), toPowerLevel: Roles.textualPowerLevel(to, userDefault)}) _t('%(userId)s from %(fromPowerLevel)s to %(toPowerLevel)s', {
userId: userId,
fromPowerLevel: Roles.textualPowerLevel(from, userDefault),
toPowerLevel: Roles.textualPowerLevel(to, userDefault)
})
); );
} }
}); });
if (!diff.length) { if (!diff.length) {
return ''; return '';
} }
return _t('%(senderName)s changed the power level of %(powerLevelDiffText)s.', {senderName: senderName, powerLevelDiffText: diff.join(", ")}); return _t('%(senderName)s changed the power level of %(powerLevelDiffText)s.', {
senderName: senderName,
powerLevelDiffText: diff.join(", ")
});
} }
var handlers = { var handlers = {

View file

@ -214,6 +214,7 @@
"Delete": "Delete", "Delete": "Delete",
"demote": "demote", "demote": "demote",
"Deops user with given id": "Deops user with given id", "Deops user with given id": "Deops user with given id",
"Default": "Default",
"Device ID": "Device ID", "Device ID": "Device ID",
"Devices": "Devices", "Devices": "Devices",
"Devices will not yet be able to decrypt history from before they joined the room": "Devices will not yet be able to decrypt history from before they joined the room", "Devices will not yet be able to decrypt history from before they joined the room": "Devices will not yet be able to decrypt history from before they joined the room",