i18n unregistered user errors

// FREEBIE
This commit is contained in:
lilia 2016-05-25 18:57:06 -07:00
parent b6f785737c
commit b2f07984df
2 changed files with 10 additions and 1 deletions

View file

@ -280,5 +280,9 @@
"mediaMessage": {
"message": "Media message",
"description": "Description of a message that has an attachment and no text, displayed in the conversation list as a preview."
},
"unregisteredUser": {
"message": "Number is not registered",
"description": "Error message displayed when sending to an unregistered user."
}
}

View file

@ -11,7 +11,12 @@
templateName: 'error-icon',
className: 'error-icon-container',
render_attributes: function() {
return { message: this.model && this.model.message };
var message;
if (this.model.name === 'UnregisteredUserError') {
message = i18n('unregisteredUser');
this.$el.addClass('unregistered-user-error');
}
return { message: message };
}
});
var NetworkErrorView = Whisper.View.extend({