mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
refactor: CURRICULUM_LOCALE fallback to English (#56522)
This commit is contained in:
committed by
GitHub
parent
8d56e38f43
commit
45fb3774bd
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user