mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Replace i18n with tpl in output/authentication.js (#13581)
refs: #13380 - The i18n package is deprecated. It is being replaced with the tpl package.
This commit is contained in:
parent
2c659ea447
commit
57ce743d98
1 changed files with 9 additions and 4 deletions
|
@ -1,6 +1,11 @@
|
|||
const i18n = require('../../../../../../shared/i18n');
|
||||
const tpl = require('@tryghost/tpl');
|
||||
const mapper = require('./utils/mapper');
|
||||
const debug = require('@tryghost/debug')('api:v2:utils:serializers:output:authentication');
|
||||
const messages = {
|
||||
checkEmailForInstructions: 'Check your email for further instructions.',
|
||||
passwordChanged: 'Password changed successfully.',
|
||||
invitationAccepted: 'Invitation accepted.'
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
setup(user, apiConfig, frame) {
|
||||
|
@ -28,7 +33,7 @@ module.exports = {
|
|||
generateResetToken(data, apiConfig, frame) {
|
||||
frame.response = {
|
||||
passwordreset: [{
|
||||
message: i18n.t('common.api.authentication.mail.checkEmailForInstructions')
|
||||
message: tpl(messages.checkEmailForInstructions)
|
||||
}]
|
||||
};
|
||||
},
|
||||
|
@ -36,7 +41,7 @@ module.exports = {
|
|||
resetPassword(data, apiConfig, frame) {
|
||||
frame.response = {
|
||||
passwordreset: [{
|
||||
message: i18n.t('common.api.authentication.mail.passwordChanged')
|
||||
message: tpl(messages.passwordChanged)
|
||||
}]
|
||||
};
|
||||
},
|
||||
|
@ -46,7 +51,7 @@ module.exports = {
|
|||
|
||||
frame.response = {
|
||||
invitation: [
|
||||
{message: i18n.t('common.api.authentication.mail.invitationAccepted')}
|
||||
{message: tpl(messages.invitationAccepted)}
|
||||
]
|
||||
};
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue