0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Removed i18t dependency from installer module

refs https://github.com/TryGhost/Team/issues/694

- The i18t pattern has been deprecated. Quick clean up to keep the number of dependencies in the new module to the minimum
This commit is contained in:
Naz 2021-09-03 20:33:17 +04:00
parent 84c88683ba
commit 00460c96f4
2 changed files with 6 additions and 4 deletions

View file

@ -5,9 +5,12 @@ const security = require('@tryghost/security');
const request = require('@tryghost/request');
const errors = require('@tryghost/errors/lib/errors');
const limitService = require('../../services/limits');
const i18n = require('../../../shared/i18n');
const {setFromZip} = require('./storage');
const messages = {
repoDoesNotExist: 'Supplied GitHub theme does not exist or is inaccessible'
};
/**
*
* @param {String} ref - theme reference in "Org/RepoName" format
@ -54,7 +57,7 @@ const installFromGithub = async (ref) => {
} catch (e) {
if (e.statusCode && e.statusCode === 404) {
return Promise.reject(new errors.BadRequestError({
message: i18n.t('errors.api.themes.repoDoesNotExist'),
message: messages.repoDoesNotExist,
context: zipUrl
}));
}

View file

@ -412,8 +412,7 @@
"invalidFile": "Please select a valid zip file.",
"overrideCasper": "Please rename your zip, it's not allowed to override the default casper theme.",
"destroyCasper": "Deleting the default casper theme is not allowed.",
"destroyActive": "Deleting the active theme is not allowed.",
"repoDoesNotExist": "Supplied GitHub theme does not exist or is inaccessible"
"destroyActive": "Deleting the active theme is not allowed."
},
"images": {
"missingFile": "Please select an image.",