mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(client): apply i18n prefix to test-runner (#62523)
This commit is contained in:
committed by
GitHub
parent
f6db89fdbc
commit
f5361f4341
@@ -5,11 +5,11 @@ const {
|
|||||||
replaceChallengeNodes,
|
replaceChallengeNodes,
|
||||||
localeChallengesRootDir
|
localeChallengesRootDir
|
||||||
} = require('./utils/build-challenges');
|
} = require('./utils/build-challenges');
|
||||||
|
const { pathPrefix } = require('./utils/gatsby/path-prefix');
|
||||||
|
|
||||||
const { clientLocale, curriculumLocale, homeLocation } = envData;
|
const { curriculumLocale, homeLocation } = envData;
|
||||||
|
|
||||||
const curriculumIntroRoot = path.resolve(__dirname, './src/pages');
|
const curriculumIntroRoot = path.resolve(__dirname, './src/pages');
|
||||||
const pathPrefix = clientLocale === 'english' ? '' : '/' + clientLocale;
|
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
flags: {
|
flags: {
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import type {
|
|||||||
PythonDocument
|
PythonDocument
|
||||||
} from '../../../../../tools/client-plugins/browser-scripts';
|
} from '../../../../../tools/client-plugins/browser-scripts';
|
||||||
import { Hooks } from '../../../redux/prop-types';
|
import { Hooks } from '../../../redux/prop-types';
|
||||||
|
import { pathPrefix } from '../../../../utils/gatsby/path-prefix';
|
||||||
|
|
||||||
export const helperVersion = _helperVersion;
|
export const helperVersion = _helperVersion;
|
||||||
|
|
||||||
@@ -85,7 +86,7 @@ export const scrollManager = new ScrollManager();
|
|||||||
export const mainPreviewId = 'fcc-main-frame';
|
export const mainPreviewId = 'fcc-main-frame';
|
||||||
// the project preview frame demos the finished project
|
// the project preview frame demos the finished project
|
||||||
export const projectPreviewId = 'fcc-project-preview-frame';
|
export const projectPreviewId = 'fcc-project-preview-frame';
|
||||||
const ASSET_PATH = `/js/test-runner/${helperVersion}/`;
|
const ASSET_PATH = `${pathPrefix}/js/test-runner/${helperVersion}/`;
|
||||||
|
|
||||||
const DOCUMENT_NOT_FOUND_ERROR = 'misc.document-notfound';
|
const DOCUMENT_NOT_FOUND_ERROR = 'misc.document-notfound';
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
const envData = require('../../config/env.json');
|
||||||
|
|
||||||
|
const { clientLocale } = envData;
|
||||||
|
|
||||||
|
exports.pathPrefix = clientLocale === 'english' ? '' : '/' + clientLocale;
|
||||||
Reference in New Issue
Block a user