Fix 2nd person conjugation in exp. timer messages

// FREEBIE
This commit is contained in:
2-4601 2016-10-06 17:39:32 +03:00 committed by lilia
parent f8a3ae158c
commit 81e1b84129
2 changed files with 24 additions and 12 deletions

View file

@ -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;
}
});