add content-langauge header to sent emails
This commit is contained in:
Родитель
213157df9e
Коммит
696ab882e6
|
@ -237,7 +237,7 @@ module.exports = function (fs, path, url, convict) {
|
||||||
supportedLanguages: {
|
supportedLanguages: {
|
||||||
doc: "List of languages this deployment should detect and display localized strings.",
|
doc: "List of languages this deployment should detect and display localized strings.",
|
||||||
format: Array,
|
format: Array,
|
||||||
default: ['en', 'en-AU'],
|
default: ['en', 'en-AU', 'it-CH'],
|
||||||
env: 'I18N_SUPPORTED_LANGUAGES'
|
env: 'I18N_SUPPORTED_LANGUAGES'
|
||||||
},
|
},
|
||||||
translationDirectory: {
|
translationDirectory: {
|
||||||
|
|
2
i18n.js
2
i18n.js
|
@ -72,5 +72,7 @@ module.exports = function (config) {
|
||||||
return l10n
|
return l10n
|
||||||
}
|
}
|
||||||
|
|
||||||
|
abideObj.defaultLang = config.defaultLang
|
||||||
|
|
||||||
return abideObj
|
return abideObj
|
||||||
}
|
}
|
||||||
|
|
|
@ -121,7 +121,8 @@ module.exports = function (config, i18n, log) {
|
||||||
'X-Uid': account.uid.toString('hex'),
|
'X-Uid': account.uid.toString('hex'),
|
||||||
'X-Verify-Code': code,
|
'X-Verify-Code': code,
|
||||||
'X-Service-ID': opts.service,
|
'X-Service-ID': opts.service,
|
||||||
'X-Link': link
|
'X-Link': link,
|
||||||
|
'Content-Language': opts.preferredLang || i18n.defaultLang
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.send(message)
|
return this.send(message)
|
||||||
|
@ -162,7 +163,8 @@ module.exports = function (config, i18n, log) {
|
||||||
html: template.html(values),
|
html: template.html(values),
|
||||||
headers: {
|
headers: {
|
||||||
'X-Recovery-Code': code,
|
'X-Recovery-Code': code,
|
||||||
'X-Link': link
|
'X-Link': link,
|
||||||
|
'Content-Language': opts.preferredLang || i18n.defaultLang
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.send(message)
|
return this.send(message)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче