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

Replaced i18n.t w/ tpl helper in scheduler-intergation (#13399)

refs: #13380
The i18n package is deprecated. It is being replaced with the tpl package.

Co-authored-by: Kenneth Fitzgerald <fitzgeraldkd@gmail.com>
This commit is contained in:
Kenneth Fitzgerald 2021-10-01 05:38:13 -04:00 committed by GitHub
parent dedfebfdca
commit 5fb93535f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,11 @@
const models = require('../../../models');
const i18n = require('../../../../shared/i18n');
const tpl = require('@tryghost/tpl');
const errors = require('@tryghost/errors');
const messages = {
resourceNotFound: '{resource} not found.'
};
/**
* @description Load the internal scheduler integration
*
@ -12,9 +16,7 @@ const getSchedulerIntegration = function () {
.then((integration) => {
if (!integration) {
throw new errors.NotFoundError({
message: i18n.t('errors.api.resource.resourceNotFound', {
resource: 'Integration'
})
message: tpl(messages.resourceNotFound, {resource: 'Integration'})
});
}
return integration.toJSON();