mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-01 23:37:43 +03:00
Replaced i18n.t w/ tpl in v2/posts-public.js (#13501)
refs: TryGhost#13380 - The i18n package is deprecated. It is being replaced with the tpl package.
This commit is contained in:
parent
280bc6e6e1
commit
ea346d5d22
@ -1,8 +1,12 @@
|
||||
const models = require('../../models');
|
||||
const i18n = require('../../../shared/i18n');
|
||||
const tpl = require('@tryghost/tpl');
|
||||
const errors = require('@tryghost/errors');
|
||||
const allowedIncludes = ['tags', 'authors'];
|
||||
|
||||
const messages = {
|
||||
postNotFound: 'Post not found.'
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
docName: 'posts',
|
||||
|
||||
@ -63,7 +67,7 @@ module.exports = {
|
||||
.then((model) => {
|
||||
if (!model) {
|
||||
throw new errors.NotFoundError({
|
||||
message: i18n.t('errors.api.posts.postNotFound')
|
||||
message: tpl(messages.postNotFound)
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user