From 0e6217184eeeb69fa85fcf97d28be37e9042a71d Mon Sep 17 00:00:00 2001 From: Tulio Casagrande Date: Tue, 28 Jun 2016 17:04:45 -0300 Subject: Added remaining translations strings --- web-ui/app/js/mail_view/ui/draft_save_status.js | 9 ++++---- web-ui/app/js/mail_view/ui/forward_box.js | 2 +- web-ui/app/js/mail_view/ui/reply_box.js | 2 +- web-ui/app/js/search/search_trigger.js | 14 ++++++------ web-ui/app/js/services/mail_service.js | 2 +- web-ui/app/locales/de_DE/translation.json | 13 +++++------ web-ui/app/locales/en_US/translation.json | 25 ++++++++++++---------- web-ui/app/locales/es_ES/translation.json | 13 +++++------ web-ui/app/locales/pt_BR/translation.json | 20 ++++++++--------- web-ui/app/locales/sv_SE/translation.json | 13 +++++------ web-ui/app/scss/_mixins.scss | 3 +-- web-ui/app/scss/views/_action-bar.scss | 2 +- web-ui/app/scss/views/_compose-view.scss | 2 +- web-ui/app/templates/compose/compose_box.hbs | 10 ++++----- web-ui/app/templates/compose/fixed_recipient.hbs | 2 +- web-ui/app/templates/compose/inline_box.hbs | 4 ++-- web-ui/app/templates/compose/recipients.hbs | 2 +- .../app/templates/mail_actions/refresh_trigger.hbs | 2 +- .../test/spec/helpers/monitored_ajax_call.spec.js | 6 +++--- web-ui/test/spec/mail_view/ui/forward_box.spec.js | 2 +- web-ui/test/spec/mail_view/ui/reply_box.spec.js | 4 ++-- web-ui/test/spec/services/mail_service.spec.js | 2 +- 22 files changed, 74 insertions(+), 80 deletions(-) diff --git a/web-ui/app/js/mail_view/ui/draft_save_status.js b/web-ui/app/js/mail_view/ui/draft_save_status.js index 1849e5ba..47751d91 100644 --- a/web-ui/app/js/mail_view/ui/draft_save_status.js +++ b/web-ui/app/js/mail_view/ui/draft_save_status.js @@ -17,10 +17,11 @@ define( [ 'flight/lib/component', - 'page/events' + 'page/events', + 'views/i18n' ], - function (defineComponent, events) { + function (defineComponent, events, i18n) { 'use strict'; return defineComponent(draftSaveStatus); @@ -32,8 +33,8 @@ define( }; this.after('initialize', function () { - this.on(document, events.mail.saveDraft, this.setMessage('Saving to Drafts...')); - this.on(document, events.mail.draftSaved, this.setMessage('Draft Saved.')); + this.on(document, events.mail.saveDraft, this.setMessage(i18n.t('draft-saving'))); + this.on(document, events.mail.draftSaved, this.setMessage(i18n.t('draft-saved'))); this.on(document, events.ui.mail.changedSinceLastSave, this.setMessage('')); }); } diff --git a/web-ui/app/js/mail_view/ui/forward_box.js b/web-ui/app/js/mail_view/ui/forward_box.js index 970fad7f..a34bd55d 100644 --- a/web-ui/app/js/mail_view/ui/forward_box.js +++ b/web-ui/app/js/mail_view/ui/forward_box.js @@ -31,7 +31,7 @@ define( return defineComponent(forwardBox, withHideAndShow, withComposeInline); function forwardBox() { - var fwd = function(v) { return i18n.t('fwd') + v; }; + var fwd = function(v) { return i18n.t('fwd') + ': ' + v; }; this.fetchTargetMail = function (ev) { this.trigger(document, events.mail.want, { mail: this.attr.ident, caller: this }); diff --git a/web-ui/app/js/mail_view/ui/reply_box.js b/web-ui/app/js/mail_view/ui/reply_box.js index fdc9dd0f..a174d185 100644 --- a/web-ui/app/js/mail_view/ui/reply_box.js +++ b/web-ui/app/js/mail_view/ui/reply_box.js @@ -46,7 +46,7 @@ define( } }; - var re = function(v) { return i18n.t('re') + v; }; + var re = function(v) { return i18n.t('re') + ': ' + v; }; this.setupReplyBox = function() { var recipients, body; diff --git a/web-ui/app/js/search/search_trigger.js b/web-ui/app/js/search/search_trigger.js index 4b9cb1dc..2aff027c 100644 --- a/web-ui/app/js/search/search_trigger.js +++ b/web-ui/app/js/search/search_trigger.js @@ -19,19 +19,19 @@ define( [ 'flight/lib/component', 'views/templates', - 'page/events' - ], function (defineComponent, templates, events) { + 'page/events', + 'views/i18n' + ], function (defineComponent, templates, events, i18n) { 'use strict'; return defineComponent(searchTrigger); function searchTrigger() { - var placeHolder = 'Search results for: '; - this.defaultAttrs({ input: 'input[type=search]', - form: 'form' + form: 'form', + searchResultsPrefix: 'search-results-for' }); this.render = function() { @@ -57,14 +57,14 @@ define( this.showOnlySearchTerms = function(event){ var value = this.select('input').val(); - var searchTerms = value.slice(placeHolder.length); + var searchTerms = value.slice((i18n.t(this.attr.searchResultsPrefix) + ': ').length); this.select('input').val(searchTerms); }; this.showSearchTermsAndPlaceHolder = function(event){ var value = this.select('input').val(); if (value.length > 0){ - this.select('input').val(placeHolder + value); + this.select('input').val(i18n.t(this.attr.searchResultsPrefix) + ': ' + value); } }; diff --git a/web-ui/app/js/services/mail_service.js b/web-ui/app/js/services/mail_service.js index 529a43b8..bc56daf8 100644 --- a/web-ui/app/js/services/mail_service.js +++ b/web-ui/app/js/services/mail_service.js @@ -151,7 +151,7 @@ define( contentType: 'application/json; charset=utf-8', data: JSON.stringify({idents: mailIdents}) }).done(this.triggerArchived(dataToArchive)) - .fail(this.errorMessage(i18n.t('Could not archive emails'))); + .fail(this.errorMessage(i18n.t('could-not-archive'))); }; this.deleteMail = function (ev, data) { diff --git a/web-ui/app/locales/de_DE/translation.json b/web-ui/app/locales/de_DE/translation.json index dd9e62a5..bd49e2e4 100644 --- a/web-ui/app/locales/de_DE/translation.json +++ b/web-ui/app/locales/de_DE/translation.json @@ -1,24 +1,22 @@ { "compose": "Compose", - "re": "Re: ", + "re": "Re", "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", "delete-single": "Your message was permanently deleted!", "delete-bulk": "Your messages were permanently deleted!", - "Saved as draft.": "Saved as draft.", "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", - "TO": "TO", - "To": "To", + "to": "to", "CC": "CC", "BCC": "BCC", - "Body": "Body", - "Subject": "Subject", + "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", @@ -41,7 +39,6 @@ "Archive:": "Archive:", "we will keep this message for 30 days, then delete it forever.": "we will keep this message for 30 days, then delete it forever.", "we will remove all the tags, but keep it in your account in case you need it.": "we will remove all the tags, but keep it in your account in case you need it.", - "to": "to", "no_subject": "", "no_recipient": "", "you": "you", @@ -59,7 +56,7 @@ "sending-mail": "Sending...", "trash-button": "Delete it", "search-placeholder" : "Search...", - "Search results for:": "Search results for:", + "search-results-for": "Search results for", "Tags": "Tags", "Forward": "Forward", "feedback-placeholder": "Tell us what you liked, didn't like, what is missing and generally what you think about Pixelated.", diff --git a/web-ui/app/locales/en_US/translation.json b/web-ui/app/locales/en_US/translation.json index dd9e62a5..f5465ea6 100644 --- a/web-ui/app/locales/en_US/translation.json +++ b/web-ui/app/locales/en_US/translation.json @@ -1,24 +1,25 @@ { "compose": "Compose", - "re": "Re: ", + "re": "Re", "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", "delete-single": "Your message was permanently deleted!", "delete-bulk": "Your messages were permanently deleted!", - "Saved as draft.": "Saved as draft.", + "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", - "TO": "TO", - "To": "To", + "could-not-archive": "Could not archive emails", + "to": "to", "CC": "CC", "BCC": "BCC", - "Body": "Body", - "Subject": "Subject", + "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", @@ -41,7 +42,6 @@ "Archive:": "Archive:", "we will keep this message for 30 days, then delete it forever.": "we will keep this message for 30 days, then delete it forever.", "we will remove all the tags, but keep it in your account in case you need it.": "we will remove all the tags, but keep it in your account in case you need it.", - "to": "to", "no_subject": "", "no_recipient": "", "you": "you", @@ -59,7 +59,7 @@ "sending-mail": "Sending...", "trash-button": "Delete it", "search-placeholder" : "Search...", - "Search results for:": "Search results for:", + "search-results-for": "Search results for", "Tags": "Tags", "Forward": "Forward", "feedback-placeholder": "Tell us what you liked, didn't like, what is missing and generally what you think about Pixelated.", @@ -71,10 +71,13 @@ "delete-permanently": "Delete Permanently", "move-to-inbox": "Move to Inbox", "reply-author-line": "On {{date}}, <{{from}}> wrote:\n", + "refresh": "refresh", + "click-to-remove": "Click to remove", + "error": { - "timeout": "a timeout occurred", - "general": "problems talking to server", - "parse": "got invalid response from server" + "timeout": "A timeout occurred", + "general": "Problems talking to server", + "parse": "Got invalid response from server" }, "tags": { "inbox": "Inbox", diff --git a/web-ui/app/locales/es_ES/translation.json b/web-ui/app/locales/es_ES/translation.json index dd9e62a5..bd49e2e4 100644 --- a/web-ui/app/locales/es_ES/translation.json +++ b/web-ui/app/locales/es_ES/translation.json @@ -1,24 +1,22 @@ { "compose": "Compose", - "re": "Re: ", + "re": "Re", "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", "delete-single": "Your message was permanently deleted!", "delete-bulk": "Your messages were permanently deleted!", - "Saved as draft.": "Saved as draft.", "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", - "TO": "TO", - "To": "To", + "to": "to", "CC": "CC", "BCC": "BCC", - "Body": "Body", - "Subject": "Subject", + "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", @@ -41,7 +39,6 @@ "Archive:": "Archive:", "we will keep this message for 30 days, then delete it forever.": "we will keep this message for 30 days, then delete it forever.", "we will remove all the tags, but keep it in your account in case you need it.": "we will remove all the tags, but keep it in your account in case you need it.", - "to": "to", "no_subject": "", "no_recipient": "", "you": "you", @@ -59,7 +56,7 @@ "sending-mail": "Sending...", "trash-button": "Delete it", "search-placeholder" : "Search...", - "Search results for:": "Search results for:", + "search-results-for": "Search results for", "Tags": "Tags", "Forward": "Forward", "feedback-placeholder": "Tell us what you liked, didn't like, what is missing and generally what you think about Pixelated.", diff --git a/web-ui/app/locales/pt_BR/translation.json b/web-ui/app/locales/pt_BR/translation.json index c359e8a2..59e5103c 100644 --- a/web-ui/app/locales/pt_BR/translation.json +++ b/web-ui/app/locales/pt_BR/translation.json @@ -7,18 +7,16 @@ "Your message was archived": "Sua mensagem foi arquivada", "delete-single": "Sua mensagem foi permanentemente deletada!", "delete-bulk": "Suas mensagens foram permanentemente deletadas!", - "Saved as draft.": "Salvo como rascunho.", "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", - "TO": "TO", - "To": "To", + "to": "para", "CC": "CC", "BCC": "CCO", - "Body": "Mensagem", - "Subject": "Assunto", + "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", @@ -59,7 +57,7 @@ "sending-mail": "Enviando...", "trash-button": "Deletar", "search-placeholder" : "Pesquisar...", - "Search results for:": "Resultado da pesquisa por:", + "search-results-for": "Resultado da pesquisa por", "Tags": "Tags", "Forward": "Encaminhar", "feedback-placeholder": "Nos diga o que gosta, não gosta, o que está faltando e o que pensa sobre o Pixelated.", @@ -71,10 +69,12 @@ "delete-permanently": "Excluir permanentemente", "move-to-inbox": "Mover para Caixa de Entrada", "reply-author-line": "Em {{date}}, <{{from}}> escreveu:\n", + "refresh": "atualizar", + "click-to-remove": "Pressione para remover", "error": { - "timeout": "a operação escedeu o limite de tempo", - "general": "problemas ao se comunicar com o servidor", - "parse": "obteve uma resposta inválida do servidor" + "timeout": "A operação excedeu o limite de tempo", + "general": "Problemas ao se comunicar com o servidor", + "parse": "Obteve uma resposta inválida do servidor" }, "tags": { "inbox": "Caixa de Entrada", @@ -82,6 +82,6 @@ "drafts": "Rascunhos", "trash": "Lixeira", "all": "Todas", - "tags": "Tags" + "tags": "Etiquetas" } } diff --git a/web-ui/app/locales/sv_SE/translation.json b/web-ui/app/locales/sv_SE/translation.json index dd9e62a5..bd49e2e4 100644 --- a/web-ui/app/locales/sv_SE/translation.json +++ b/web-ui/app/locales/sv_SE/translation.json @@ -1,24 +1,22 @@ { "compose": "Compose", - "re": "Re: ", + "re": "Re", "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", "delete-single": "Your message was permanently deleted!", "delete-bulk": "Your messages were permanently deleted!", - "Saved as draft.": "Saved as draft.", "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", - "TO": "TO", - "To": "To", + "to": "to", "CC": "CC", "BCC": "BCC", - "Body": "Body", - "Subject": "Subject", + "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", @@ -41,7 +39,6 @@ "Archive:": "Archive:", "we will keep this message for 30 days, then delete it forever.": "we will keep this message for 30 days, then delete it forever.", "we will remove all the tags, but keep it in your account in case you need it.": "we will remove all the tags, but keep it in your account in case you need it.", - "to": "to", "no_subject": "", "no_recipient": "", "you": "you", @@ -59,7 +56,7 @@ "sending-mail": "Sending...", "trash-button": "Delete it", "search-placeholder" : "Search...", - "Search results for:": "Search results for:", + "search-results-for": "Search results for", "Tags": "Tags", "Forward": "Forward", "feedback-placeholder": "Tell us what you liked, didn't like, what is missing and generally what you think about Pixelated.", diff --git a/web-ui/app/scss/_mixins.scss b/web-ui/app/scss/_mixins.scss index 5dca95a0..71d178db 100644 --- a/web-ui/app/scss/_mixins.scss +++ b/web-ui/app/scss/_mixins.scss @@ -181,7 +181,7 @@ } &.deleteTooltip:hover:after { position: absolute; - content: "Click to remove"; + content: attr(data-label); font-size: 0.5rem; @include tooltip(25px, 0px); } @@ -215,4 +215,3 @@ display:block; } } - diff --git a/web-ui/app/scss/views/_action-bar.scss b/web-ui/app/scss/views/_action-bar.scss index ef4a8cc3..8de07876 100644 --- a/web-ui/app/scss/views/_action-bar.scss +++ b/web-ui/app/scss/views/_action-bar.scss @@ -149,7 +149,7 @@ } &:before { - content: "refresh"; + content: attr(data-label); font-size: 0.8em; padding-right: 5px; } diff --git a/web-ui/app/scss/views/_compose-view.scss b/web-ui/app/scss/views/_compose-view.scss index 296a491a..813a6098 100644 --- a/web-ui/app/scss/views/_compose-view.scss +++ b/web-ui/app/scss/views/_compose-view.scss @@ -339,7 +339,7 @@ &.deleteTooltip:hover:after { position: absolute; - content: "Click to remove"; + content: attr(data-label); font-size: 0.5rem; @include tooltip(25px, 0px); diff --git a/web-ui/app/templates/compose/compose_box.hbs b/web-ui/app/templates/compose/compose_box.hbs index f69cb542..a724f27b 100644 --- a/web-ui/app/templates/compose/compose_box.hbs +++ b/web-ui/app/templates/compose/compose_box.hbs @@ -6,18 +6,18 @@ {{> recipients }}
- - + +
- - + +
{{> attachments_list }} diff --git a/web-ui/app/templates/compose/fixed_recipient.hbs b/web-ui/app/templates/compose/fixed_recipient.hbs index cd6b0c26..8b01717c 100644 --- a/web-ui/app/templates/compose/fixed_recipient.hbs +++ b/web-ui/app/templates/compose/fixed_recipient.hbs @@ -1,7 +1,7 @@ - + - {{t 'To'}}: {{formatRecipients recipients}} + {{t 'to'}}: {{formatRecipients recipients}} {{> recipients }} diff --git a/web-ui/app/templates/compose/recipients.hbs b/web-ui/app/templates/compose/recipients.hbs index 31b51144..056cdab9 100644 --- a/web-ui/app/templates/compose/recipients.hbs +++ b/web-ui/app/templates/compose/recipients.hbs @@ -2,7 +2,7 @@
- +
diff --git a/web-ui/app/templates/mail_actions/refresh_trigger.hbs b/web-ui/app/templates/mail_actions/refresh_trigger.hbs index 68685442..dffc7090 100644 --- a/web-ui/app/templates/mail_actions/refresh_trigger.hbs +++ b/web-ui/app/templates/mail_actions/refresh_trigger.hbs @@ -1,3 +1,3 @@
- +
diff --git a/web-ui/test/spec/helpers/monitored_ajax_call.spec.js b/web-ui/test/spec/helpers/monitored_ajax_call.spec.js index c0d55198..4c48d320 100644 --- a/web-ui/test/spec/helpers/monitored_ajax_call.spec.js +++ b/web-ui/test/spec/helpers/monitored_ajax_call.spec.js @@ -23,9 +23,9 @@ define(['helpers/monitored_ajax'], function (monitoredAjax) { _.each( { - timeout: 'a timeout occurred', - error: 'problems talking to server', - parseerror: 'got invalid response from server' + timeout: 'A timeout occurred', + error: 'Problems talking to server', + parseerror: 'Got invalid response from server' }, function (errorMessage, errorType) { it('shows message for a server ' + errorType, function () { var component = { trigger: function () {}}; diff --git a/web-ui/test/spec/mail_view/ui/forward_box.spec.js b/web-ui/test/spec/mail_view/ui/forward_box.spec.js index 4985f23a..a30660e8 100644 --- a/web-ui/test/spec/mail_view/ui/forward_box.spec.js +++ b/web-ui/test/spec/mail_view/ui/forward_box.spec.js @@ -14,7 +14,7 @@ describeComponent('mail_view/ui/forward_box', function () { testMail.header.subject = 'Very interesting'; this.setupComponent({ mail: testMail }); - expect(this.component.select('subjectDisplay').text()).toEqual(i18n.t('fwd') + testMail.header.subject); + expect(this.component.select('subjectDisplay').text()).toEqual(i18n.t('fwd') + ': ' + testMail.header.subject); }); it('should have no recipients', function () { diff --git a/web-ui/test/spec/mail_view/ui/reply_box.spec.js b/web-ui/test/spec/mail_view/ui/reply_box.spec.js index 896fdde3..773fee74 100644 --- a/web-ui/test/spec/mail_view/ui/reply_box.spec.js +++ b/web-ui/test/spec/mail_view/ui/reply_box.spec.js @@ -13,7 +13,7 @@ describeComponent('mail_view/ui/reply_box', function () { describe('reply compose box', function() { it('should display subject of the reply', function() { - expect(this.component.select('subjectDisplay').text()).toBe(i18n.t('re') + attrs.mail.header.subject); + expect(this.component.select('subjectDisplay').text()).toBe(i18n.t('re') + ': ' + attrs.mail.header.subject); }); it('should show recipient fields when clicking on recipient display', function() { @@ -43,7 +43,7 @@ describeComponent('mail_view/ui/reply_box', function () { this.setupComponent(attrs); - expect(this.component.select('subjectDisplay').text()).toEqual(i18n.t('re')+ attrs.mail.header.subject); + expect(this.component.select('subjectDisplay').text()).toEqual(i18n.t('re') + ': ' + attrs.mail.header.subject); }); it('should use set In-Reply-To header when Message-Id header is set', function() { diff --git a/web-ui/test/spec/services/mail_service.spec.js b/web-ui/test/spec/services/mail_service.spec.js index 2d22d1cf..e8c27d05 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 emails')); + expect(this.component.errorMessage).toHaveBeenCalledWith(i18n.t('could-not-archive')); }); it('make an ajax request to /mails/archive', function() { -- cgit v1.2.3