mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-24 23:48:13 -05:00
Replaced i18n.t w/ tpl helper (#13403)
refs: #13380 * Replaced i18n.t w/ tpl helper in authentication.js * Replaced i18n.t w/ tpl helper in authors-public
This commit is contained in:
parent
506f26b5ce
commit
4e4d092988
1 changed files with 6 additions and 2 deletions
|
@ -1,9 +1,13 @@
|
||||||
const Promise = require('bluebird');
|
const Promise = require('bluebird');
|
||||||
const i18n = require('../../../shared/i18n');
|
const tpl = require('@tryghost/tpl');
|
||||||
const errors = require('@tryghost/errors');
|
const errors = require('@tryghost/errors');
|
||||||
const models = require('../../models');
|
const models = require('../../models');
|
||||||
const ALLOWED_INCLUDES = ['count.posts'];
|
const ALLOWED_INCLUDES = ['count.posts'];
|
||||||
|
|
||||||
|
const messages = {
|
||||||
|
notFound: 'Author not found.'
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
docName: 'authors',
|
docName: 'authors',
|
||||||
|
|
||||||
|
@ -54,7 +58,7 @@ module.exports = {
|
||||||
.then((model) => {
|
.then((model) => {
|
||||||
if (!model) {
|
if (!model) {
|
||||||
return Promise.reject(new errors.NotFoundError({
|
return Promise.reject(new errors.NotFoundError({
|
||||||
message: i18n.t('errors.api.authors.notFound')
|
message: tpl(messages.notFound)
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue