Add a few missing translatable strings to conversation search view

This commit is contained in:
karissa 2017-02-03 13:29:36 -08:00 committed by lilia
parent b1a37da68b
commit eb5c95e287
2 changed files with 15 additions and 3 deletions

View file

@ -488,5 +488,17 @@
"themeAndroidDark": { "themeAndroidDark": {
"message": "Android (dark)", "message": "Android (dark)",
"description": "Label text for dark Android theme" "description": "Label text for dark Android theme"
},
"newContact": {
"message": "Click to create new contact",
"description": ""
},
"newPhoneNumber": {
"message": "Enter a phone number to add a contact.",
"description": "Placeholder for adding a new number to a contact"
},
"invalidNumberError": {
"message": "Invalid number",
"description": "When a person inputs a number that is invalid"
} }
} }

View file

@ -16,7 +16,7 @@
}, },
render_attributes: function() { render_attributes: function() {
return { return {
number: 'Click to create new contact', number: i18n('newContact'),
title: this.model.getNumber(), title: this.model.getNumber(),
avatar: this.model.getAvatar(), avatar: this.model.getAvatar(),
}; };
@ -105,7 +105,7 @@
this.resetTypeahead(); this.resetTypeahead();
}.bind(this)); }.bind(this));
} else { } else {
this.new_contact_view.$('.number').text("Invalid number"); this.new_contact_view.$('.number').text(i18n('invalidNumberError'));
this.$input.focus(); this.$input.focus();
} }
}, },
@ -144,7 +144,7 @@
if (!this.hintView) { if (!this.hintView) {
this.hintView = new Whisper.HintView({ this.hintView = new Whisper.HintView({
className: 'contact placeholder', className: 'contact placeholder',
content: "Enter a phone number to add a contact." content: i18n('newPhoneNumber')
}).render(); }).render();
this.hintView.$el.insertAfter(this.$input); this.hintView.$el.insertAfter(this.$input);
} }