diff options
Diffstat (limited to 'web-ui')
-rw-r--r-- | web-ui/app/js/helpers/view_helper.js | 2 | ||||
-rw-r--r-- | web-ui/app/js/mixins/with_mail_edit_base.js | 4 | ||||
-rw-r--r-- | web-ui/app/js/views/i18n.js | 8 |
3 files changed, 5 insertions, 9 deletions
diff --git a/web-ui/app/js/helpers/view_helper.js b/web-ui/app/js/helpers/view_helper.js index 6755b891..cf4406bb 100644 --- a/web-ui/app/js/helpers/view_helper.js +++ b/web-ui/app/js/helpers/view_helper.js @@ -22,7 +22,7 @@ define( 'quoted-printable/quoted-printable', 'utf8/utf8' ], - function(contentType, htmlWhitelister, i18n_lib, quotedPrintable, utf8) { + function(contentType, htmlWhitelister, i18n, quotedPrintable, utf8) { 'use strict'; function formatStatusClasses(ss) { 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 9942e747..5efb8967 100644 --- a/web-ui/app/js/mixins/with_mail_edit_base.js +++ b/web-ui/app/js/mixins/with_mail_edit_base.js @@ -134,7 +134,7 @@ define( } else { this.trigger( events.ui.userAlerts.displayMessage, - {message: i18n.get('One or more of the recipients are not valid emails')} + {message: i18n('One or more of the recipients are not valid emails')} ); this.trigger(events.mail.send_failed); } @@ -176,7 +176,7 @@ define( this.draftSaved = function(event, data) { this.attr.ident = data.ident; if(!this.attr.silent) { - this.trigger(document, events.ui.userAlerts.displayMessage, { message: i18n.get('Saved as draft.') }); + this.trigger(document, events.ui.userAlerts.displayMessage, { message: i18n('Saved as draft.') }); } delete this.attr.silent; }; diff --git a/web-ui/app/js/views/i18n.js b/web-ui/app/js/views/i18n.js index b09490f5..568e7635 100644 --- a/web-ui/app/js/views/i18n.js +++ b/web-ui/app/js/views/i18n.js @@ -17,15 +17,11 @@ define(['i18next'], function(i18n) { 'use strict'; - var self = function(str) { - return i18n.t(str); - }; - - self.get = self; + var self = i18n.t; self.init = function(path) { i18n.init({detectLngQS: 'lang', fallbackLng: 'en', lowerCaseLng: true, getAsync: false, resGetPath: path + 'locales/__lng__/__ns__.json'}); - Handlebars.registerHelper('t', self.get.bind(self)); + Handlebars.registerHelper('t', self.bind(self)); }; return self; |