0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-06 22:40:14 -05:00

Replace i18n with tpl in api/v3/pages-public.js (#13586)

refs: #13380

- The i18n package is deprecated. It is being replaced with the tpl package.
This commit is contained in:
PJ 2021-10-13 19:07:42 +11:00 committed by GitHub
parent f8033596c0
commit 09a9a9844f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,10 @@
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 +66,7 @@ module.exports = {
.then((model) => {
if (!model) {
throw new errors.NotFoundError({
message: i18n.t('errors.api.pages.pageNotFound')
message: tpl(messages.pageNotFound)
});
}