diff options
author | Caio Carrara <ccarrara@thoughtworks.com> | 2016-06-24 17:15:54 -0300 |
---|---|---|
committer | Caio Carrara <ccarrara@thoughtworks.com> | 2016-06-27 16:39:55 -0300 |
commit | 361796f0ff1eb0f450f768749d5c69f5c4f6b1e4 (patch) | |
tree | 01e1729ce21feccba9c08fd6e7d8452397d5521a /web-ui/app/js/services | |
parent | 6042a2b1b93d2f2a89c418971d7e12b5a79b3314 (diff) |
Updates the i18next to latest version
See: #727
Diffstat (limited to 'web-ui/app/js/services')
-rw-r--r-- | web-ui/app/js/services/delete_service.js | 8 | ||||
-rw-r--r-- | web-ui/app/js/services/mail_service.js | 18 | ||||
-rw-r--r-- | web-ui/app/js/services/recover_service.js | 2 |
3 files changed, 14 insertions, 14 deletions
diff --git a/web-ui/app/js/services/delete_service.js b/web-ui/app/js/services/delete_service.js index 4097ea7e..0dfc1bdb 100644 --- a/web-ui/app/js/services/delete_service.js +++ b/web-ui/app/js/services/delete_service.js @@ -22,14 +22,14 @@ define(['flight/lib/component', 'page/events', 'views/i18n'], function (defineCo this.successDeleteMessageFor = function(mail) { return mail.isInTrash() ? - i18n('delete-single') : - i18n('trash-single'); + i18n.t('delete-single') : + i18n.t('trash-single'); }; this.successDeleteManyMessageFor = function(mail) { return mail.isInTrash() ? - i18n('delete-bulk') : - i18n('trash-bulk'); + i18n.t('delete-bulk') : + i18n.t('trash-bulk'); }; this.deleteEmail = function (event, data) { diff --git a/web-ui/app/js/services/mail_service.js b/web-ui/app/js/services/mail_service.js index 412451cb..529a43b8 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('Could not update mail tags'); + var msg = i18n.t('Could not update mail tags'); if (resp.status === 403) { - msg = i18n('Invalid tag name'); + msg = i18n.t('Invalid tag name'); } this.trigger(document, events.ui.userAlerts.displayMessage, { message: msg }); }; @@ -128,7 +128,7 @@ define( var mails = dataToRecover.mails || [dataToRecover.mail]; this.refreshMails(); - this.trigger(document, events.ui.userAlerts.displayMessage, { message: i18n(dataToRecover.successMessage)}); + this.trigger(document, events.ui.userAlerts.displayMessage, { message: i18n.t(dataToRecover.successMessage)}); this.trigger(document, events.ui.mails.uncheckAll); }, this); }; @@ -136,7 +136,7 @@ define( this.triggerArchived = function (dataToArchive) { return _.bind(function (response) { this.refreshMails(); - this.trigger(document, events.ui.userAlerts.displayMessage, { message: i18n(response.successMessage)}); + this.trigger(document, events.ui.userAlerts.displayMessage, { message: i18n.t(response.successMessage)}); this.trigger(document, events.ui.mails.uncheckAll); }, this); }; @@ -151,14 +151,14 @@ define( contentType: 'application/json; charset=utf-8', data: JSON.stringify({idents: mailIdents}) }).done(this.triggerArchived(dataToArchive)) - .fail(this.errorMessage(i18n('Could not archive emails'))); + .fail(this.errorMessage(i18n.t('Could not archive emails'))); }; this.deleteMail = function (ev, data) { monitoredAjax(this, '/mail/' + data.mail.ident, {type: 'DELETE'}) .done(this.triggerDeleted(data)) - .fail(this.errorMessage(i18n('Could not delete email'))); + .fail(this.errorMessage(i18n.t('Could not delete email'))); }; 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('Could not delete emails'))); + .fail(this.errorMessage(i18n.t('Could not delete emails'))); }; this.recoverManyMails = function (ev, data) { @@ -188,7 +188,7 @@ define( contentType: 'application/json; charset=utf-8', data: JSON.stringify({idents: mailIdents}) }).done(this.triggerRecovered(dataToRecover)) - .fail(this.errorMessage(i18n('Could not move emails to inbox'))); + .fail(this.errorMessage(i18n.t('Could not move emails to inbox'))); }; function compileQuery(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('Could not fetch messages'), class: 'error' }); + this.trigger(document, events.ui.userAlerts.displayMessage, { message: i18n.t('Could not fetch messages'), class: 'error' }); }.bind(this)); }; diff --git a/web-ui/app/js/services/recover_service.js b/web-ui/app/js/services/recover_service.js index 62fcf1f9..d7d9cdc9 100644 --- a/web-ui/app/js/services/recover_service.js +++ b/web-ui/app/js/services/recover_service.js @@ -25,7 +25,7 @@ define(['flight/lib/component', 'page/events', 'views/i18n'], function (defineCo this.trigger(document, events.mail.recoverMany, { mails: emails, - successMessage: i18n('Your messages were moved to inbox!') + successMessage: i18n.t('Your messages were moved to inbox!') }); }; |