From c38b4ef1f749b76f0b1fdd2c78e46cfacac3fe23 Mon Sep 17 00:00:00 2001 From: Ania Kowalska Date: Wed, 6 Oct 2021 12:47:38 +0200 Subject: [PATCH] Replaced i18n.t w/ tpl helper in pages-public.js refs: #13380 --- core/server/api/canary/pages-public.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/server/api/canary/pages-public.js b/core/server/api/canary/pages-public.js index dcb46dacc9..b0b7002fd1 100644 --- a/core/server/api/canary/pages-public.js +++ b/core/server/api/canary/pages-public.js @@ -1,8 +1,12 @@ -const i18n = require('../../../shared/i18n'); +const tpl = require('@tryghost/tpl'); const errors = require('@tryghost/errors'); const models = require('../../models'); const ALLOWED_INCLUDES = ['tags', 'authors']; +const messages = { + pageNotFound: 'Page not found.' +}; + module.exports = { docName: 'pages', @@ -63,7 +67,7 @@ module.exports = { .then((model) => { if (!model) { throw new errors.NotFoundError({ - message: i18n.t('errors.api.pages.pageNotFound') + message: tpl(messages.pageNotFound) }); }