summaryrefslogtreecommitdiffstats
path: root/config/accounts.js
diff options
context:
space:
mode:
authorfloatinghotpot <rjfun.mobile@gmail.com>2015-12-04 10:39:51 +0800
committerfloatinghotpot <rjfun.mobile@gmail.com>2015-12-04 10:39:51 +0800
commit892d1a2d45f3a29ef32e755161ac5064ea6a0aeb (patch)
tree5822b62bc359489bd6169773e5e7ff3d92c3f49f /config/accounts.js
parent8d5d7ee678d9a396a0427329200e5bf0573eb730 (diff)
downloadwekan-892d1a2d45f3a29ef32e755161ac5064ea6a0aeb.tar.gz
wekan-892d1a2d45f3a29ef32e755161ac5064ea6a0aeb.tar.bz2
wekan-892d1a2d45f3a29ef32e755161ac5064ea6a0aeb.zip
i18n-ize meteor email templates
Diffstat (limited to 'config/accounts.js')
-rw-r--r--config/accounts.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/config/accounts.js b/config/accounts.js
index b1a4a177..3a6a116e 100644
--- a/config/accounts.js
+++ b/config/accounts.js
@@ -51,4 +51,11 @@ if (Meteor.isServer) {
if (process.env.MAIL_FROM) {
Accounts.emailTemplates.from = process.env.MAIL_FROM;
}
+
+ ['resetPassword-subject', 'resetPassword-text', 'verifyEmail-subject', 'verifyEmail-text', 'enrollAccount-subject', 'enrollAccount-text'].forEach((str) => {
+ const words = str.split('-');
+ Accounts.emailTemplates[words[0]][words[1]] = (user, url) => {
+ return TAPi18n.__(`email-${str}`, { user: user.getName(), url }, user.getLanguage());
+ };
+ });
}