mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 15:30:13 +01:00
i18n-ize meteor email templates
This commit is contained in:
parent
8d5d7ee678
commit
892d1a2d45
3 changed files with 23 additions and 0 deletions
|
|
@ -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());
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue