diff --git a/core/server/api/v2/oembed.js b/core/server/api/v2/oembed.js index 9a44c3a0a5..2281cf4541 100644 --- a/core/server/api/v2/oembed.js +++ b/core/server/api/v2/oembed.js @@ -4,9 +4,13 @@ const Promise = require('bluebird'); const cheerio = require('cheerio'); const _ = require('lodash'); const config = require('../../../shared/config'); -const i18n = require('../../../shared/i18n'); +const tpl = require('@tryghost/tpl'); const externalRequest = require('../../lib/request-external'); +const messages = { + unknownProvider: 'No provider found for supplied URL.' +}; + const findUrlWithProvider = (url) => { let provider; @@ -33,7 +37,7 @@ const findUrlWithProvider = (url) => { function unknownProvider(url) { return Promise.reject(new errors.ValidationError({ - message: i18n.t('errors.api.oembed.unknownProvider'), + message: tpl(messages.unknownProvider), context: url })); }