From 81e1b84129b83216b07cef20d0e4e819d8430912 Mon Sep 17 00:00:00 2001 From: 2-4601 Date: Thu, 6 Oct 2016 17:39:32 +0300 Subject: [PATCH] Fix 2nd person conjugation in exp. timer messages // FREEBIE --- _locales/en/messages.json | 18 ++++++++++++------ js/views/message_view.js | 18 ++++++++++++------ 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/_locales/en/messages.json b/_locales/en/messages.json index 29b55e00..8b9a12af 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -347,9 +347,19 @@ "message": "Unblock this contact to send a message.", "description": "Brief message shown when trying to message a blocked number" }, - "changedTheTimer": { + "youChangedTheTimer": { + "message": "You set the timer to $time$.", + "description": "Message displayed when you change the message expiration timer in a conversation.", + "placeholders": { + "time": { + "content": "$1", + "example": "10m" + } + } + }, + "theyChangedTheTimer": { "message": "$name$ set the timer to $time$.", - "description": "Message displayed when someone changes the message expiration timer in a conversation.", + "description": "Message displayed when someone else changes the message expiration timer in a conversation.", "placeholders": { "name": { "content": "$1", @@ -447,10 +457,6 @@ } } }, - "you": { - "message": "You", - "description": "A gender-neutral second-person prounoun used as a subject, as in, 'You set the timer to 5 seconds'" - }, "safetyNumbersSettingHeader": { "message": "Safety numbers approval", "description": "Description for safety numbers setting" diff --git a/js/views/message_view.js b/js/views/message_view.js index 1e078a65..4dfbbf46 100644 --- a/js/views/message_view.js +++ b/js/views/message_view.js @@ -56,14 +56,20 @@ }, render_attributes: function() { var seconds = this.model.get('expirationTimerUpdate').expireTimer; - var name = this.conversation.getTitle(); + var timerMessage; if (this.conversation.id === textsecure.storage.user.getNumber()) { - name = i18n('you'); + timerMessage = { + content: i18n('youChangedTheTimer', + Whisper.ExpirationTimerOptions.getName(seconds)) + }; + } else { + timerMessage = { + content: i18n('theyChangedTheTimer', [ + this.conversation.getTitle(), + Whisper.ExpirationTimerOptions.getName(seconds)]) + }; } - return { - content: i18n('changedTheTimer', [name, - Whisper.ExpirationTimerOptions.getName(seconds)]) - }; + return timerMessage; } });