feat(curriculum): add i18n-curriculum submodule (#55341)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
This commit is contained in:
Tom
2024-07-09 09:21:38 -05:00
committed by GitHub
parent 35faca5df6
commit 4a506f6e06
6 changed files with 60 additions and 19 deletions
+7 -2
View File
@@ -6,8 +6,9 @@ const envData = require('../config/env.json');
const {
getChallengesForLang,
generateChallengeCreator,
CHALLENGES_DIR,
ENGLISH_CHALLENGES_DIR,
META_DIR,
CHALLENGES_DIR,
getChallengesDirForLang
} = require('../../curriculum/get-challenges');
@@ -24,7 +25,11 @@ exports.replaceChallengeNode = () => {
const metaPath = path.resolve(META_DIR, `${blockName}/meta.json`);
delete require.cache[require.resolve(metaPath)];
const meta = require(metaPath);
const englishPath = path.resolve(CHALLENGES_DIR, 'english', filePath);
const englishPath = path.resolve(
ENGLISH_CHALLENGES_DIR,
'english',
filePath
);
const i18nPath = path.resolve(CHALLENGES_DIR, curriculumLocale, filePath);
// TODO: reimplement hot-reloading of certifications
const createChallenge = generateChallengeCreator(