mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-01 23:37:43 +03:00
Replaced i18n.t w/ tpl in v2/oembed.js (#13499)
refs: TryGhost#13380 - The i18n package is deprecated. It is being replaced with the tpl package.
This commit is contained in:
parent
e1bcd422f5
commit
3303ce127c
@ -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
|
||||
}));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user