More work in email translations
This commit is contained in:
parent
af042b8722
commit
c67609b417
9 changed files with 37 additions and 20 deletions
|
|
@ -2,13 +2,13 @@ import i18n from 'i18next';
|
|||
import sendEmail from '../../../modules/server/send-email';
|
||||
import getOAuthProfile from '../../../modules/get-oauth-profile';
|
||||
|
||||
export default (options, user) => {
|
||||
export default (options, user, lang) => {
|
||||
const OAuthProfile = getOAuthProfile(options, user);
|
||||
|
||||
i18n.changeLanguage(lang);
|
||||
const applicationName = i18n.t('AppName');
|
||||
const firstName = OAuthProfile ? OAuthProfile.name.first : options.profile.name.first;
|
||||
const emailAddress = OAuthProfile ? OAuthProfile.email : options.email;
|
||||
const { lang } = user.lang;
|
||||
|
||||
return sendEmail({
|
||||
to: emailAddress,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue