0
Fork 0
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:
Ayoub BERDEDDOUCH 2021-10-07 17:51:28 +02:00 committed by GitHub
parent 84118068c8
commit 41d03bd08b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,13 +2,18 @@ const Promise = require('bluebird');
const _ = require('lodash');
const models = require('../../models');
const routeSettings = require('../../services/route-settings');
const i18n = require('../../../shared/i18n');
const tpl = require('@tryghost/tpl');
const {BadRequestError} = require('@tryghost/errors');
const settingsService = require('../../services/settings');
const membersService = require('../../services/members');
const settingsBREADService = settingsService.getSettingsBREADServiceInstance();
const messages = {
failedSendingEmail: 'Failed Sending Email'
};
module.exports = {
docName: 'settings',
@ -109,7 +114,7 @@ module.exports = {
} catch (err) {
throw new BadRequestError({
err,
message: i18n.t('errors.mail.failedSendingEmail.error')
message: tpl(messages.failedSendingEmail)
});
}
}