From 5fb93535f090fd30b6359021276b521552a6b80d Mon Sep 17 00:00:00 2001 From: Kenneth Fitzgerald <68879394+fitzgeraldkd@users.noreply.github.com> Date: Fri, 1 Oct 2021 05:38:13 -0400 Subject: [PATCH] Replaced i18n.t w/ tpl helper in scheduler-intergation (#13399) refs: #13380 The i18n package is deprecated. It is being replaced with the tpl package. Co-authored-by: Kenneth Fitzgerald --- .../post-scheduling/scheduler-intergation.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/core/server/adapters/scheduling/post-scheduling/scheduler-intergation.js b/core/server/adapters/scheduling/post-scheduling/scheduler-intergation.js index 11190f8387..ce2c784a02 100644 --- a/core/server/adapters/scheduling/post-scheduling/scheduler-intergation.js +++ b/core/server/adapters/scheduling/post-scheduling/scheduler-intergation.js @@ -1,7 +1,11 @@ const models = require('../../../models'); -const i18n = require('../../../../shared/i18n'); +const tpl = require('@tryghost/tpl'); const errors = require('@tryghost/errors'); +const messages = { + resourceNotFound: '{resource} not found.' +}; + /** * @description Load the internal scheduler integration * @@ -12,9 +16,7 @@ const getSchedulerIntegration = function () { .then((integration) => { if (!integration) { throw new errors.NotFoundError({ - message: i18n.t('errors.api.resource.resourceNotFound', { - resource: 'Integration' - }) + message: tpl(messages.resourceNotFound, {resource: 'Integration'}) }); } return integration.toJSON();