mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-06 22:40:14 -05:00
Replaced i18n.t w/ tpl in v2/preview.js (#13503)
refs: TryGhost#13380 - The i18n package is deprecated. It is being replaced with the tpl package.
This commit is contained in:
parent
649461ba2f
commit
5ec272a377
1 changed files with 6 additions and 2 deletions
|
@ -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 = ['authors', 'tags'];
|
||||
|
||||
const messages = {
|
||||
postNotFound: 'Post not found.'
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
docName: 'preview',
|
||||
|
||||
|
@ -31,7 +35,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 a new issue