From 978681794f1c03ca97d8c8db2c06a107cc104916 Mon Sep 17 00:00:00 2001 From: Lisa Junger Date: Tue, 28 Oct 2014 16:12:44 +0100 Subject: adds internationalization to send button. --- web-ui/app/js/mail_view/ui/send_button.js | 8 +++++--- web-ui/app/locales/en/translation.json | 1 + web-ui/app/locales/pt/translation.json | 1 + web-ui/app/templates/compose/compose_box.hbs | 2 +- web-ui/app/templates/compose/inline_box.hbs | 2 +- web-ui/test/spec/mail_view/ui/send_button.spec.js | 2 +- 6 files changed, 10 insertions(+), 6 deletions(-) (limited to 'web-ui') diff --git a/web-ui/app/js/mail_view/ui/send_button.js b/web-ui/app/js/mail_view/ui/send_button.js index 5e3986f3..5454ab0a 100644 --- a/web-ui/app/js/mail_view/ui/send_button.js +++ b/web-ui/app/js/mail_view/ui/send_button.js @@ -20,9 +20,10 @@ define([ 'flight/lib/component', 'flight/lib/utils', - 'page/events' + 'page/events', + 'helpers/view_helper' ], - function (defineComponent, utils, events) { + function (defineComponent, utils, events, viewHelper) { return defineComponent(sendButton); @@ -79,13 +80,14 @@ define([ this.trigger(document, events.ui.recipients.doCompleteInput); this.disableButton(); - this.$node.text('Sending...'); + this.$node.text(viewHelper.i18n('sending-mail')); }; this.after('initialize', function () { this.attr.recipients = {}; this.attr.inputHasMail = {}; + this.$node.html(viewHelper.i18n('send-button')); this.on(document, events.ui.recipients.inputHasMail, this.inputHasMail); this.on(document, events.ui.recipients.inputHasNoMail, this.inputHasNoMail); diff --git a/web-ui/app/locales/en/translation.json b/web-ui/app/locales/en/translation.json index ef0aac64..b84f39bb 100644 --- a/web-ui/app/locales/en/translation.json +++ b/web-ui/app/locales/en/translation.json @@ -53,6 +53,7 @@ "signed signature-unknown": "Sender and/or message cannot be trusted.", "not-signed": "Sender could not be securely identified.", "send-button": "Send", + "sending-mail": "Sending...", "draft-button": "Save Draft", "trash-button": "Trash it", "Search..." : "Search...", diff --git a/web-ui/app/locales/pt/translation.json b/web-ui/app/locales/pt/translation.json index a7f4d2a9..19b68c55 100644 --- a/web-ui/app/locales/pt/translation.json +++ b/web-ui/app/locales/pt/translation.json @@ -10,6 +10,7 @@ "Invalid tag name": "Nome de etiqueta inválido", "Could not delete email": "Não foi possível deletar o email", "Could not fetch messages": "Não foi possível buscar as mensagems", + "sending-mail": "Enviando...", "tags": { "inbox": "Caixa de Entrada", diff --git a/web-ui/app/templates/compose/compose_box.hbs b/web-ui/app/templates/compose/compose_box.hbs index 42efb30b..300f8049 100644 --- a/web-ui/app/templates/compose/compose_box.hbs +++ b/web-ui/app/templates/compose/compose_box.hbs @@ -16,7 +16,7 @@
- +
diff --git a/web-ui/app/templates/compose/inline_box.hbs b/web-ui/app/templates/compose/inline_box.hbs index eb339c21..f2e35d47 100644 --- a/web-ui/app/templates/compose/inline_box.hbs +++ b/web-ui/app/templates/compose/inline_box.hbs @@ -11,7 +11,7 @@ {{> recipients }}
- +
diff --git a/web-ui/test/spec/mail_view/ui/send_button.spec.js b/web-ui/test/spec/mail_view/ui/send_button.spec.js index 81e47803..4109e923 100644 --- a/web-ui/test/spec/mail_view/ui/send_button.spec.js +++ b/web-ui/test/spec/mail_view/ui/send_button.spec.js @@ -6,7 +6,7 @@ describeComponent('mail_view/ui/send_button', function () { describe('send button', function () { beforeEach(function () { - this.setupComponent(''); + this.setupComponent(''); }); describe('when it is disabled', function () { -- cgit v1.2.3