0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Switch i18n.t to tpl in users.js (#13574)

refs: #13380

- i18n is deprecated and is being replaced with tpl
This commit is contained in:
Levi Richardson 2021-10-13 00:44:04 -07:00 committed by GitHub
parent b1914758b8
commit 6421f60852
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,9 @@
const debug = require('@tryghost/debug')('api:v2:utils:serializers:output:users');
const i18n = require('../../../../../../shared/i18n');
const tpl = require('@tryghost/tpl');
const mapper = require('./utils/mapper');
const messages = {
pwdChangedSuccessfully: 'Password changed successfully.'
};
module.exports = {
browse(models, apiConfig, frame) {
debug('browse');
@ -29,7 +31,7 @@ module.exports = {
debug('changePassword');
frame.response = {
password: [{message: i18n.t('notices.api.users.pwdChangedSuccessfully')}]
password: [{message: tpl(messages.pwdChangedSuccessfully)}]
};
},