diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 38b9d3018..e9f2af36e 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -847,5 +847,39 @@ }, "autoUpdateLaterButtonLabel": { "message": "Later" + }, + "leftTheGroup": { + "message": "$name$ left the group.", + "description": "Shown in the conversation history when someone leaves the group", + "placeholders": { + "name": { + "content": "$1", + "example": "Bob" + } + } + }, + "updatedTheGroup": { + "message": "Updated the group.", + "description": "Shown in the conversation history when someone updates the group" + }, + "titleIsNow": { + "message": "Title is now '$name$'.", + "description": "Shown in the conversation history when someone changes the title of the group", + "placeholders": { + "name": { + "content": "$1", + "example": "Book Club" + } + } + }, + "joinedTheGroup": { + "message": "$names$ joined the group.", + "description": "Shown in the conversation history when people join the group", + "placeholders": { + "names": { + "content": "$1", + "example": "Alice, Bob" + } + } } } diff --git a/js/models/messages.js b/js/models/messages.js index 6de966751..89c8cc297 100644 --- a/js/models/messages.js +++ b/js/models/messages.js @@ -76,15 +76,15 @@ if (this.isGroupUpdate()) { var group_update = this.get('group_update'); if (group_update.left) { - return group_update.left + ' left the group.'; + return i18n('leftTheGroup', group_update.left); } - var messages = ['Updated the group.']; + var messages = [i18n('updatedTheGroup')]; if (group_update.name) { - messages.push("Title is now '" + group_update.name + "'."); + messages.push(i18n('titleIsNow', group_update.name)); } if (group_update.joined) { - messages.push(group_update.joined.join(', ') + ' joined the group.'); + messages.push(i18n('joinedTheGroup', group_update.joined.join(', '))); } return messages.join(' ');