i18n unregistered user errors
// FREEBIE
This commit is contained in:
parent
b6f785737c
commit
b2f07984df
2 changed files with 10 additions and 1 deletions
|
@ -280,5 +280,9 @@
|
||||||
"mediaMessage": {
|
"mediaMessage": {
|
||||||
"message": "Media message",
|
"message": "Media message",
|
||||||
"description": "Description of a message that has an attachment and no text, displayed in the conversation list as a preview."
|
"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."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,12 @@
|
||||||
templateName: 'error-icon',
|
templateName: 'error-icon',
|
||||||
className: 'error-icon-container',
|
className: 'error-icon-container',
|
||||||
render_attributes: function() {
|
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({
|
var NetworkErrorView = Whisper.View.extend({
|
||||||
|
|
Loading…
Reference in a new issue