From 4f0999b6db812a76f425a02008946e1adaba2e3f Mon Sep 17 00:00:00 2001 From: Indrakant Dana <60315832+Indrakant-Dana@users.noreply.github.com> Date: Tue, 12 Oct 2021 01:58:01 +0530 Subject: [PATCH] Replaced i18n.t w/ tpl in core/server/api/v3/utils/validators/input/setup.js (#13534) refs: TryGhost#13380 - The i18n package is deprecated. It is being replaced with the tpl package. --- core/server/api/v3/utils/validators/input/setup.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/server/api/v3/utils/validators/input/setup.js b/core/server/api/v3/utils/validators/input/setup.js index b16561ab6f..16d951c04c 100644 --- a/core/server/api/v3/utils/validators/input/setup.js +++ b/core/server/api/v3/utils/validators/input/setup.js @@ -1,13 +1,17 @@ const debug = require('@tryghost/debug')('api:v3:utils:validators:input:updateSetup'); -const i18n = require('../../../../../../shared/i18n'); +const tpl = require('@tryghost/tpl'); const errors = require('@tryghost/errors'); +const messages = { + notTheBlogOwner: 'You are not the site owner.' +}; + module.exports = { updateSetup(apiConfig, frame) { debug('resetPassword'); if (!frame.options.context || !frame.options.context.user) { - throw new errors.NoPermissionError({message: i18n.t('errors.api.authentication.notTheBlogOwner')}); + throw new errors.NoPermissionError({message: tpl(messages.notTheBlogOwner)}); } } };