From fff0f31a664acfdbff0ddd1a18e441dce0ee3514 Mon Sep 17 00:00:00 2001 From: Tulio Casagrande Date: Tue, 28 Jun 2016 19:11:17 -0300 Subject: Normalize i18n keys --- .../app/js/mail_view/ui/no_mails_available_pane.js | 4 +-- web-ui/app/js/mail_view/ui/send_button.js | 2 +- web-ui/app/js/mixins/with_mail_edit_base.js | 2 +- web-ui/app/js/services/mail_service.js | 12 +++---- web-ui/app/locales/de_DE/translation.json | 31 ++++++++---------- web-ui/app/locales/en_US/translation.json | 37 ++++++++++------------ web-ui/app/locales/es_ES/translation.json | 31 ++++++++---------- web-ui/app/locales/pt_BR/translation.json | 33 +++++++++---------- web-ui/app/locales/sv_SE/translation.json | 31 ++++++++---------- web-ui/app/templates/compose/compose_box.hbs | 4 +-- .../app/templates/compose/no_mails_available.hbs | 4 +-- .../app/templates/compose/no_message_selected.hbs | 2 +- web-ui/app/templates/compose/recipients.hbs | 4 +-- web-ui/app/templates/compose/reply_section.hbs | 4 +-- web-ui/app/templates/mails/full_view.hbs | 3 +- .../mail_view/ui/no_mails_available_pane.spec.js | 6 ++-- web-ui/test/spec/mail_view/ui/send_button.spec.js | 8 ++--- web-ui/test/spec/services/mail_service.spec.js | 2 +- 18 files changed, 99 insertions(+), 121 deletions(-) (limited to 'web-ui') diff --git a/web-ui/app/js/mail_view/ui/no_mails_available_pane.js b/web-ui/app/js/mail_view/ui/no_mails_available_pane.js index 5f083685..c62c6b30 100644 --- a/web-ui/app/js/mail_view/ui/no_mails_available_pane.js +++ b/web-ui/app/js/mail_view/ui/no_mails_available_pane.js @@ -37,8 +37,8 @@ define( var mailsQueryMatch = /-?in:"?[\w]+"?|tag:"[\w]+"/g; this.render = function() { - this.attr.tag = this.attr.tag.toUpperCase(); - this.attr.forSearch = this.attr.forSearch.replace(mailsQueryMatch, '').trim().toUpperCase(); + this.attr.tag = 'tags.' + this.attr.tag; + this.attr.forSearch = this.attr.forSearch.replace(mailsQueryMatch, '').trim(); this.$node.html(templates.noMailsAvailable(this.attr)); }; 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 581a244a..66fe1233 100644 --- a/web-ui/app/js/mail_view/ui/send_button.js +++ b/web-ui/app/js/mail_view/ui/send_button.js @@ -99,7 +99,7 @@ define([ this.resetButton = function () { this.attr.sendingInProgress = false; this.attr.uploading = false; - this.$node.html(viewHelper.i18n.t('send-button')); + this.$node.html(viewHelper.i18n.t('send')); this.enableButton(); }; diff --git a/web-ui/app/js/mixins/with_mail_edit_base.js b/web-ui/app/js/mixins/with_mail_edit_base.js index a60cce03..a088080e 100644 --- a/web-ui/app/js/mixins/with_mail_edit_base.js +++ b/web-ui/app/js/mixins/with_mail_edit_base.js @@ -147,7 +147,7 @@ define( } else { this.trigger( events.ui.userAlerts.displayMessage, - {message: i18n.t('One or more of the recipients are not valid emails')} + {message: i18n.t('recipients-not-valid')} ); this.trigger(events.mail.send_failed); } diff --git a/web-ui/app/js/services/mail_service.js b/web-ui/app/js/services/mail_service.js index bc56daf8..5e4bd4f3 100644 --- a/web-ui/app/js/services/mail_service.js +++ b/web-ui/app/js/services/mail_service.js @@ -60,9 +60,9 @@ define( }; var failure = function (resp) { - var msg = i18n.t('Could not update mail tags'); + var msg = i18n.t('failed-change-tags'); if (resp.status === 403) { - msg = i18n.t('Invalid tag name'); + msg = i18n.t('invalid-tag-name'); } this.trigger(document, events.ui.userAlerts.displayMessage, { message: msg }); }; @@ -151,14 +151,14 @@ define( contentType: 'application/json; charset=utf-8', data: JSON.stringify({idents: mailIdents}) }).done(this.triggerArchived(dataToArchive)) - .fail(this.errorMessage(i18n.t('could-not-archive'))); + .fail(this.errorMessage(i18n.t('failed-archive'))); }; this.deleteMail = function (ev, data) { monitoredAjax(this, '/mail/' + data.mail.ident, {type: 'DELETE'}) .done(this.triggerDeleted(data)) - .fail(this.errorMessage(i18n.t('Could not delete email'))); + .fail(this.errorMessage(i18n.t('failed-delete-single'))); }; this.deleteManyMails = function (ev, data) { @@ -173,7 +173,7 @@ define( contentType: 'application/json; charset=utf-8', data: JSON.stringify({idents: mailIdents}) }).done(this.triggerDeleted(dataToDelete)) - .fail(this.errorMessage(i18n.t('Could not delete emails'))); + .fail(this.errorMessage(i18n.t('failed-delete-bulk'))); }; this.recoverManyMails = function (ev, data) { @@ -246,7 +246,7 @@ define( this.trigger(document, events.mails.available, _.merge({tag: this.attr.currentTag, forSearch: this.attr.lastQuery }, this.parseMails(data))); }.bind(this)) .fail(function () { - this.trigger(document, events.ui.userAlerts.displayMessage, { message: i18n.t('Could not fetch messages'), class: 'error' }); + this.trigger(document, events.ui.userAlerts.displayMessage, { message: i18n.t('failed-fetch-messages'), class: 'error' }); }.bind(this)); }; diff --git a/web-ui/app/locales/de_DE/translation.json b/web-ui/app/locales/de_DE/translation.json index bd49e2e4..3ef3d363 100644 --- a/web-ui/app/locales/de_DE/translation.json +++ b/web-ui/app/locales/de_DE/translation.json @@ -4,33 +4,29 @@ "fwd": "Fwd", "trash-single": "Your message was moved to trash!", "trash-bulk": "Your messages were moved to trash!", - "Your message was archived": "Your message was archived", + "your-message-was-archived": "Your message was archived", "delete-single": "Your message was permanently deleted!", "delete-bulk": "Your messages were permanently deleted!", - "One or more of the recipients are not valid emails": "One or more of the recipients are not valid emails", - "Could not update mail tags": "Could not update mail tags", - "Invalid tag name": "Invalid tag name", - "Could not delete email": "Could not delete email", - "Could not fetch messages": "Could not fetch messages", + "recipients-not-valid": "One or more of the recipients are not valid emails", + "failed-change-tags": "Could not update mail tags", + "invalid-tag-name": "Invalid tag name", + "failed-delete-single": "Could not delete email", + "failed-fetch-messages": "Could not fetch messages", "to": "to", - "CC": "CC", - "BCC": "BCC", + "cc": "CC", + "bcc": "BCC", "body": "Body", "subject": "Subject", - "Don't worry about recipients right now, you'll be able to add them just before sending.": "Don't worry about recipients right now, you'll be able to add them just before sending.", - "Send": "Send", - "Cancel": "Cancel", - "Reply": "Reply", + "send": "Send", + "reply": "Reply", "reply-to-all": "Reply to all", "delete-this-message": "Delete this message", "mark-as-read": "Mark as read", "mark-as-unread": "Mark as unread", "delete": "Delete", "archive": "Archive", - "Close": "Close", - "Trash this message": "Trash this message", - "NOTHING SELECTED": "NOTHING SELECTED", - "Press Enter to add tag": "Press Enter to add tag", + "nothing-selected": "Nothing selected", + "add-tag-placeholder": "Press Enter to add tag", "You are trying to delete the last tag on this message.": "You are trying to delete the last tag on this message.", "What would you like to do?": "What would you like to do?", "Trash message": "Trash message", @@ -52,13 +48,12 @@ "signed signature-not-trusted": "Unreliable signature", "signed signature-unknown": "Unreliable signature", "not-signed": "Not signed", - "send-button": "Send", "sending-mail": "Sending...", "trash-button": "Delete it", "search-placeholder" : "Search...", "search-results-for": "Search results for", "Tags": "Tags", - "Forward": "Forward", + "forward": "Forward", "feedback-placeholder": "Tell us what you liked, didn't like, what is missing and generally what you think about Pixelated.", "user-settings": "User Settings", "email-address": "Email address", diff --git a/web-ui/app/locales/en_US/translation.json b/web-ui/app/locales/en_US/translation.json index f5465ea6..595d7954 100644 --- a/web-ui/app/locales/en_US/translation.json +++ b/web-ui/app/locales/en_US/translation.json @@ -4,36 +4,33 @@ "fwd": "Fwd", "trash-single": "Your message was moved to trash!", "trash-bulk": "Your messages were moved to trash!", - "Your message was archived": "Your message was archived", + "your-message-was-archived": "Your message was archived", "delete-single": "Your message was permanently deleted!", "delete-bulk": "Your messages were permanently deleted!", "draft-saving": "Saving to Drafts...", "draft-saved": "Draft saved", - "One or more of the recipients are not valid emails": "One or more of the recipients are not valid emails", - "Could not update mail tags": "Could not update mail tags", - "Invalid tag name": "Invalid tag name", - "Could not delete email": "Could not delete email", - "Could not fetch messages": "Could not fetch messages", - "could-not-archive": "Could not archive emails", + "recipients-not-valid": "One or more of the recipients are not valid emails", + "failed-change-tags": "Could not change mail tags", + "invalid-tag-name": "Invalid tag name", + "failed-delete-single": "Could not delete email", + "failed-delete-bulk": "Could not delete emails", + "failed-fetch-messages": "Could not fetch messages", + "failed-archive": "Could not archive emails", "to": "to", - "CC": "CC", - "BCC": "BCC", + "cc": "CC", + "bcc": "BCC", "body": "Body", "subject": "Subject", - "Don't worry about recipients right now, you'll be able to add them just before sending.": "Don't worry about recipients right now, you'll be able to add them just before sending.", - "Send": "Send", - "Cancel": "Cancel", - "Reply": "Reply", + "send": "Send", + "reply": "Reply", "reply-to-all": "Reply to all", "delete-this-message": "Delete this message", "mark-as-read": "Mark as read", "mark-as-unread": "Mark as unread", "delete": "Delete", "archive": "Archive", - "Close": "Close", - "Trash this message": "Trash this message", - "NOTHING SELECTED": "NOTHING SELECTED", - "Press Enter to add tag": "Press Enter to add tag", + "nothing-selected": "Nothing selected", + "add-tag-placeholder": "Press Enter to add tag", "You are trying to delete the last tag on this message.": "You are trying to delete the last tag on this message.", "What would you like to do?": "What would you like to do?", "Trash message": "Trash message", @@ -55,13 +52,12 @@ "signed signature-not-trusted": "Unreliable signature", "signed signature-unknown": "Unreliable signature", "not-signed": "Not signed", - "send-button": "Send", "sending-mail": "Sending...", "trash-button": "Delete it", "search-placeholder" : "Search...", "search-results-for": "Search results for", "Tags": "Tags", - "Forward": "Forward", + "forward": "Forward", "feedback-placeholder": "Tell us what you liked, didn't like, what is missing and generally what you think about Pixelated.", "user-settings": "User Settings", "email-address": "Email address", @@ -73,7 +69,8 @@ "reply-author-line": "On {{date}}, <{{from}}> wrote:\n", "refresh": "refresh", "click-to-remove": "Click to remove", - + "no-results-for": "No results for", + "no-emails-in": "No emails in", "error": { "timeout": "A timeout occurred", "general": "Problems talking to server", diff --git a/web-ui/app/locales/es_ES/translation.json b/web-ui/app/locales/es_ES/translation.json index bd49e2e4..3ef3d363 100644 --- a/web-ui/app/locales/es_ES/translation.json +++ b/web-ui/app/locales/es_ES/translation.json @@ -4,33 +4,29 @@ "fwd": "Fwd", "trash-single": "Your message was moved to trash!", "trash-bulk": "Your messages were moved to trash!", - "Your message was archived": "Your message was archived", + "your-message-was-archived": "Your message was archived", "delete-single": "Your message was permanently deleted!", "delete-bulk": "Your messages were permanently deleted!", - "One or more of the recipients are not valid emails": "One or more of the recipients are not valid emails", - "Could not update mail tags": "Could not update mail tags", - "Invalid tag name": "Invalid tag name", - "Could not delete email": "Could not delete email", - "Could not fetch messages": "Could not fetch messages", + "recipients-not-valid": "One or more of the recipients are not valid emails", + "failed-change-tags": "Could not update mail tags", + "invalid-tag-name": "Invalid tag name", + "failed-delete-single": "Could not delete email", + "failed-fetch-messages": "Could not fetch messages", "to": "to", - "CC": "CC", - "BCC": "BCC", + "cc": "CC", + "bcc": "BCC", "body": "Body", "subject": "Subject", - "Don't worry about recipients right now, you'll be able to add them just before sending.": "Don't worry about recipients right now, you'll be able to add them just before sending.", - "Send": "Send", - "Cancel": "Cancel", - "Reply": "Reply", + "send": "Send", + "reply": "Reply", "reply-to-all": "Reply to all", "delete-this-message": "Delete this message", "mark-as-read": "Mark as read", "mark-as-unread": "Mark as unread", "delete": "Delete", "archive": "Archive", - "Close": "Close", - "Trash this message": "Trash this message", - "NOTHING SELECTED": "NOTHING SELECTED", - "Press Enter to add tag": "Press Enter to add tag", + "nothing-selected": "Nothing selected", + "add-tag-placeholder": "Press Enter to add tag", "You are trying to delete the last tag on this message.": "You are trying to delete the last tag on this message.", "What would you like to do?": "What would you like to do?", "Trash message": "Trash message", @@ -52,13 +48,12 @@ "signed signature-not-trusted": "Unreliable signature", "signed signature-unknown": "Unreliable signature", "not-signed": "Not signed", - "send-button": "Send", "sending-mail": "Sending...", "trash-button": "Delete it", "search-placeholder" : "Search...", "search-results-for": "Search results for", "Tags": "Tags", - "Forward": "Forward", + "forward": "Forward", "feedback-placeholder": "Tell us what you liked, didn't like, what is missing and generally what you think about Pixelated.", "user-settings": "User Settings", "email-address": "Email address", diff --git a/web-ui/app/locales/pt_BR/translation.json b/web-ui/app/locales/pt_BR/translation.json index 59e5103c..6a06cf32 100644 --- a/web-ui/app/locales/pt_BR/translation.json +++ b/web-ui/app/locales/pt_BR/translation.json @@ -4,33 +4,31 @@ "fwd": "Enc", "trash-single": "Sua mensagem foi movida para a lixeira!", "trash-bulk": "Suas mensagens foram movidas para a lixeira!", - "Your message was archived": "Sua mensagem foi arquivada", + "your-message-was-archived": "Sua mensagem foi arquivada", "delete-single": "Sua mensagem foi permanentemente deletada!", "delete-bulk": "Suas mensagens foram permanentemente deletadas!", - "One or more of the recipients are not valid emails": "Um ou mais destinatários não são emails válidos", - "Could not update mail tags": "Não pode atualizar as tags do email", - "Invalid tag name": "Nome inválido para tag", - "Could not delete email": "Não pode deletar o email", - "Could not fetch messages": "Não pode receber as mensagens", + "draft-saving": "Salvando rascunho...", + "draft-saved": "Rascunho salvo", + "recipients-not-valid": "Um ou mais destinatários não são emails válidos", + "failed-change-tags": "Não pode atualizar as tags do email", + "invalid-tag-name": "Nome inválido para tag", + "failed-delete-single": "Não pode deletar o email", + "failed-fetch-messages": "Não pode receber as mensagens", "to": "para", - "CC": "CC", - "BCC": "CCO", + "cc": "CC", + "bcc": "CCO", "body": "Mensagem", "subject": "Assunto", - "Don't worry about recipients right now, you'll be able to add them just before sending.": "Não se preocupme com destinatários agora, você poderá adicioná-los antes de enviar.", - "Send": "Enviar", - "Cancel": "Cancelar", - "Reply": "Responder", + "send": "Enviar", + "reply": "Responder", "reply-to-all": "Responder para todos", "delete-this-message": "Deletar essa mensagem", "mark-as-read": "Marcar como lida", "mark-as-unread": "Marcar como não lida", "delete": "Deletar", "archive": "Arquivar", - "Close": "Fechar", - "Trash this message": "Enviar essa mensagem para lixeira", - "NOTHING SELECTED": "NADA SELECIONADO", - "Press Enter to add tag": "Aperte enter para adicionar a tag", + "nothing-selected": "Nada selecionado", + "add-tag-placeholder": "Aperte enter para adicionar a tag", "You are trying to delete the last tag on this message.": "Você está tentando deletar a última tag nessa mensagem.", "What would you like to do?": "O que você gostaria de fazer?", "Trash message": "Enviar mensagem para lixeira", @@ -53,13 +51,12 @@ "signed signature-not-trusted": "Assinatura não confiável", "signed signature-unknown": "Assinatura não confiável", "not-signed": "Não assinado", - "send-button": "Enviar", "sending-mail": "Enviando...", "trash-button": "Deletar", "search-placeholder" : "Pesquisar...", "search-results-for": "Resultado da pesquisa por", "Tags": "Tags", - "Forward": "Encaminhar", + "forward": "Encaminhar", "feedback-placeholder": "Nos diga o que gosta, não gosta, o que está faltando e o que pensa sobre o Pixelated.", "user-settings": "Opções de usuário", "email-address": "Endereço de email", diff --git a/web-ui/app/locales/sv_SE/translation.json b/web-ui/app/locales/sv_SE/translation.json index bd49e2e4..3ef3d363 100644 --- a/web-ui/app/locales/sv_SE/translation.json +++ b/web-ui/app/locales/sv_SE/translation.json @@ -4,33 +4,29 @@ "fwd": "Fwd", "trash-single": "Your message was moved to trash!", "trash-bulk": "Your messages were moved to trash!", - "Your message was archived": "Your message was archived", + "your-message-was-archived": "Your message was archived", "delete-single": "Your message was permanently deleted!", "delete-bulk": "Your messages were permanently deleted!", - "One or more of the recipients are not valid emails": "One or more of the recipients are not valid emails", - "Could not update mail tags": "Could not update mail tags", - "Invalid tag name": "Invalid tag name", - "Could not delete email": "Could not delete email", - "Could not fetch messages": "Could not fetch messages", + "recipients-not-valid": "One or more of the recipients are not valid emails", + "failed-change-tags": "Could not update mail tags", + "invalid-tag-name": "Invalid tag name", + "failed-delete-single": "Could not delete email", + "failed-fetch-messages": "Could not fetch messages", "to": "to", - "CC": "CC", - "BCC": "BCC", + "cc": "CC", + "bcc": "BCC", "body": "Body", "subject": "Subject", - "Don't worry about recipients right now, you'll be able to add them just before sending.": "Don't worry about recipients right now, you'll be able to add them just before sending.", - "Send": "Send", - "Cancel": "Cancel", - "Reply": "Reply", + "send": "Send", + "reply": "Reply", "reply-to-all": "Reply to all", "delete-this-message": "Delete this message", "mark-as-read": "Mark as read", "mark-as-unread": "Mark as unread", "delete": "Delete", "archive": "Archive", - "Close": "Close", - "Trash this message": "Trash this message", - "NOTHING SELECTED": "NOTHING SELECTED", - "Press Enter to add tag": "Press Enter to add tag", + "nothing-selected": "Nothing selected", + "add-tag-placeholder": "Press Enter to add tag", "You are trying to delete the last tag on this message.": "You are trying to delete the last tag on this message.", "What would you like to do?": "What would you like to do?", "Trash message": "Trash message", @@ -52,13 +48,12 @@ "signed signature-not-trusted": "Unreliable signature", "signed signature-unknown": "Unreliable signature", "not-signed": "Not signed", - "send-button": "Send", "sending-mail": "Sending...", "trash-button": "Delete it", "search-placeholder" : "Search...", "search-results-for": "Search results for", "Tags": "Tags", - "Forward": "Forward", + "forward": "Forward", "feedback-placeholder": "Tell us what you liked, didn't like, what is missing and generally what you think about Pixelated.", "user-settings": "User Settings", "email-address": "Email address", diff --git a/web-ui/app/templates/compose/compose_box.hbs b/web-ui/app/templates/compose/compose_box.hbs index a724f27b..83d5ca27 100644 --- a/web-ui/app/templates/compose/compose_box.hbs +++ b/web-ui/app/templates/compose/compose_box.hbs @@ -7,8 +7,8 @@ {{> recipients }}
{{t 'to'}} - {{t 'CC'}} - {{t 'BCC'}} + {{t 'cc'}} + {{t 'bcc'}}
diff --git a/web-ui/app/templates/compose/no_mails_available.hbs b/web-ui/app/templates/compose/no_mails_available.hbs index 147f3533..c61152a4 100644 --- a/web-ui/app/templates/compose/no_mails_available.hbs +++ b/web-ui/app/templates/compose/no_mails_available.hbs @@ -1,7 +1,7 @@
{{#if forSearch }} - {{t 'NO RESULTS FOR'}}: '{{ forSearch }}'. + {{t 'no-results-for'}}: '{{ forSearch }}'. {{else}} - {{t 'NO EMAILS IN'}} '{{ tag }}'. + {{t 'no-emails-in'}} '{{t tag}}'. {{/if}}
diff --git a/web-ui/app/templates/compose/no_message_selected.hbs b/web-ui/app/templates/compose/no_message_selected.hbs index 71aa6267..0b9beaf8 100644 --- a/web-ui/app/templates/compose/no_message_selected.hbs +++ b/web-ui/app/templates/compose/no_message_selected.hbs @@ -1,3 +1,3 @@
-
{{t 'NOTHING SELECTED'}}.
+
{{t 'nothing-selected'}}.
diff --git a/web-ui/app/templates/compose/recipients.hbs b/web-ui/app/templates/compose/recipients.hbs index 056cdab9..43aced1c 100644 --- a/web-ui/app/templates/compose/recipients.hbs +++ b/web-ui/app/templates/compose/recipients.hbs @@ -13,7 +13,7 @@
- +
@@ -23,7 +23,7 @@
- +
diff --git a/web-ui/app/templates/compose/reply_section.hbs b/web-ui/app/templates/compose/reply_section.hbs index 85ab49c4..45203d87 100644 --- a/web-ui/app/templates/compose/reply_section.hbs +++ b/web-ui/app/templates/compose/reply_section.hbs @@ -1,6 +1,6 @@
- + - +
diff --git a/web-ui/app/templates/mails/full_view.hbs b/web-ui/app/templates/mails/full_view.hbs index 8c486275..40bfd4a2 100644 --- a/web-ui/app/templates/mails/full_view.hbs +++ b/web-ui/app/templates/mails/full_view.hbs @@ -53,7 +53,7 @@ {{/each }}
  • -
  • @@ -81,4 +81,3 @@
    {{/if}}
    - diff --git a/web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js b/web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js index 1bf79b96..87e0656e 100644 --- a/web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js +++ b/web-ui/test/spec/mail_view/ui/no_mails_available_pane.spec.js @@ -4,17 +4,17 @@ describeComponent('mail_view/ui/no_mails_available_pane', function () { describe('after initialization', function () { it('renders template', function () { this.setupComponent({tag: 'inbox'}); - expect(this.$node.html()).toMatch('
    \n NO EMAILS IN \'INBOX\'.\n
    '); + expect(this.$node.html()).toMatch('
    \n No emails in \'Inbox\'.\n
    '); }); it('show different message for search with no results', function () { this.setupComponent({tag: 'all', forSearch: 'search'}); - expect(this.$node.html()).toMatch('
    \n NO RESULTS FOR: \'SEARCH\'.\n
    '); + expect(this.$node.html()).toMatch('
    \n No results for: \'search\'.\n
    '); }); it('show only tag information when listing all mails', function () { this.setupComponent({tag: 'all', forSearch: 'in:all'}); - expect(this.$node.html()).toMatch('
    \n NO EMAILS IN \'ALL\'.\n
    '); + expect(this.$node.html()).toMatch('
    \n No emails in \'All\'.\n
    '); }); }); }); 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 05fce52c..f869362e 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 @@ -34,7 +34,7 @@ describeComponent('mail_view/ui/send_button', function () { $(document).trigger(Pixelated.events.ui.recipients.updated, { newRecipients: ['InvalidEmail']}); expect(this.$node).not.toBeDisabled(); - expect(this.$node.text()).toBe(i18n.t('send-button')); + expect(this.$node.text()).toBe(i18n.t('send')); }); }); @@ -87,7 +87,7 @@ describeComponent('mail_view/ui/send_button', function () { }); it('disables the button after clicking', function () { - expect(this.$node.text()).toBe(i18n.t('send-button')); + expect(this.$node.text()).toBe(i18n.t('send')); this.$node.click(); @@ -96,13 +96,13 @@ describeComponent('mail_view/ui/send_button', function () { }); it('enables again if sending errors out', function() { - expect(this.$node.text()).toBe(i18n.t('send-button')); + expect(this.$node.text()).toBe(i18n.t('send')); this.$node.click(); $(document).trigger(Pixelated.events.mail.send_failed); - expect(this.$node.text()).toBe(i18n.t('send-button')); + expect(this.$node.text()).toBe(i18n.t('send')); expect(this.$node.prop('disabled')).not.toBeTruthy(); }); diff --git a/web-ui/test/spec/services/mail_service.spec.js b/web-ui/test/spec/services/mail_service.spec.js index e8c27d05..bb710b6e 100644 --- a/web-ui/test/spec/services/mail_service.spec.js +++ b/web-ui/test/spec/services/mail_service.spec.js @@ -204,7 +204,7 @@ describeComponent('services/mail_service', function () { this.component.trigger(Pixelated.events.mail.archiveMany, mails); deferred.reject({}); - expect(this.component.errorMessage).toHaveBeenCalledWith(i18n.t('could-not-archive')); + expect(this.component.errorMessage).toHaveBeenCalledWith(i18n.t('failed-archive')); }); it('make an ajax request to /mails/archive', function() { -- cgit v1.2.3