mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-20 22:42:53 -05:00
replaced i18n with tpl (#13484)
refs: #13380 - The i18n package is deprecated. It is being replaced with the tpl package.
This commit is contained in:
parent
84118068c8
commit
41d03bd08b
1 changed files with 7 additions and 2 deletions
|
@ -2,13 +2,18 @@ const Promise = require('bluebird');
|
||||||
const _ = require('lodash');
|
const _ = require('lodash');
|
||||||
const models = require('../../models');
|
const models = require('../../models');
|
||||||
const routeSettings = require('../../services/route-settings');
|
const routeSettings = require('../../services/route-settings');
|
||||||
const i18n = require('../../../shared/i18n');
|
const tpl = require('@tryghost/tpl');
|
||||||
const {BadRequestError} = require('@tryghost/errors');
|
const {BadRequestError} = require('@tryghost/errors');
|
||||||
const settingsService = require('../../services/settings');
|
const settingsService = require('../../services/settings');
|
||||||
const membersService = require('../../services/members');
|
const membersService = require('../../services/members');
|
||||||
|
|
||||||
const settingsBREADService = settingsService.getSettingsBREADServiceInstance();
|
const settingsBREADService = settingsService.getSettingsBREADServiceInstance();
|
||||||
|
|
||||||
|
const messages = {
|
||||||
|
failedSendingEmail: 'Failed Sending Email'
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
docName: 'settings',
|
docName: 'settings',
|
||||||
|
|
||||||
|
@ -109,7 +114,7 @@ module.exports = {
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
throw new BadRequestError({
|
throw new BadRequestError({
|
||||||
err,
|
err,
|
||||||
message: i18n.t('errors.mail.failedSendingEmail.error')
|
message: tpl(messages.failedSendingEmail)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue