0
Fork 0
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:
Ania Kowalska 2021-10-04 10:55:30 +02:00 committed by GitHub
parent 506f26b5ce
commit 4e4d092988
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)
})); }));
} }