fix(client): apply i18n prefix to test-runner (#62523)

This commit is contained in:
Oliver Eyton-Williams
2025-10-10 07:48:27 +02:00
committed by GitHub
parent f6db89fdbc
commit f5361f4341
3 changed files with 9 additions and 3 deletions
+2 -2
View File
@@ -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';
+5
View File
@@ -0,0 +1,5 @@
const envData = require('../../config/env.json');
const { clientLocale } = envData;
exports.pathPrefix = clientLocale === 'english' ? '' : '/' + clientLocale;