summaryrefslogtreecommitdiff
path: root/web-ui/app/js
diff options
context:
space:
mode:
authorTulio Casagrande <tcasagra@thoughtworks.com>2017-03-24 15:52:08 -0300
committerTulio Casagrande <tcasagra@thoughtworks.com>2017-03-24 15:52:08 -0300
commit001efcb7434328d339e50fcfc5193ddb5eb31bd6 (patch)
treef4663aefa9f71e5b9168780cc978a289953975ef /web-ui/app/js
parentc9525311cddd1221e87e99ad04ac660338d54ba5 (diff)
[#830] Translate email handling tags
with @anikarni
Diffstat (limited to 'web-ui/app/js')
-rw-r--r--web-ui/app/js/mail_list_actions/ui/compose_trigger.js9
-rw-r--r--web-ui/app/js/mixins/with_mail_edit_base.js2
2 files changed, 6 insertions, 5 deletions
diff --git a/web-ui/app/js/mail_list_actions/ui/compose_trigger.js b/web-ui/app/js/mail_list_actions/ui/compose_trigger.js
index ec79cb26..f0a96e79 100644
--- a/web-ui/app/js/mail_list_actions/ui/compose_trigger.js
+++ b/web-ui/app/js/mail_list_actions/ui/compose_trigger.js
@@ -18,10 +18,11 @@ define(
[
'flight/lib/component',
'views/templates',
- 'page/events'
+ 'page/events',
+ 'views/i18n'
],
- function(defineComponent, templates, events) {
+ function(defineComponent, templates, events, i18n) {
'use strict';
return defineComponent(composeTrigger);
@@ -39,11 +40,11 @@ define(
};
this.showEmailSuccess = function () {
- this.trigger(document, events.ui.userAlerts.displayMessage, {message: 'Your message was sent!', class: 'success'});
+ this.trigger(document, events.ui.userAlerts.displayMessage, {message: i18n.t('mail-sent'), class: 'success'});
};
this.showEmailError = function (ev, data) {
- this.trigger(document, events.ui.userAlerts.displayMessage, {message: 'Error, message not sent: ' + data.responseJSON.message, class: 'error'});
+ this.trigger(document, events.ui.userAlerts.displayMessage, {message: i18n.t('mail-not-sent') + ' ' + data.responseJSON.message, class: 'error'});
};
this.after('initialize', function () {
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 a088080e..c7f5447f 100644
--- a/web-ui/app/js/mixins/with_mail_edit_base.js
+++ b/web-ui/app/js/mixins/with_mail_edit_base.js
@@ -209,7 +209,7 @@ define(
};
this.mailSent = function () {
- this.trigger(document, events.ui.userAlerts.displayMessage, {message: 'Your message was sent!'});
+ this.trigger(document, events.ui.userAlerts.displayMessage, {message: i18n.t('mail-sent')});
};
this.enableFloatlabel = function (element) {