refactor: CURRICULUM_LOCALE fallback to English (#56522)

This commit is contained in:
Oliver Eyton-Williams
2024-10-04 18:37:05 +02:00
committed by GitHub
parent 8d56e38f43
commit 45fb3774bd
+2 -3
View File
@@ -27,11 +27,10 @@ const META_DIR = path.resolve(ENGLISH_CHALLENGES_DIR, '_meta');
// This is to allow English to build without having to download the i18n files.
// It fails when trying to resolve the i18n-curriculum path if they don't exist.
const curriculumLocale = process.env.CURRICULUM_LOCALE ?? 'english';
const I18N_CURRICULUM_DIR = path.resolve(
__dirname,
process.env.CURRICULUM_LOCALE === 'english'
? '.'
: 'i18n-curriculum/curriculum'
curriculumLocale === 'english' ? '.' : 'i18n-curriculum/curriculum'
);
const I18N_CHALLENGES_DIR = path.resolve(I18N_CURRICULUM_DIR, 'challenges');