fix: handle video challenges
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
a66455b983
commit
1ec6cf1efd
@ -93,14 +93,17 @@ async function buildCurriculum(file, curriculum) {
|
||||
async function parseTranslation(engPath, transPath, dict) {
|
||||
const engChal = await parseMarkdown(engPath);
|
||||
const translatedChal = await parseMarkdown(transPath);
|
||||
const codeLang = engChal.files[0] ? engChal.files[0].ext : null;
|
||||
const codeLang =
|
||||
engChal.files && engChal.files[0] ? engChal.files[0].ext : null;
|
||||
|
||||
const engWithTranslatedComments = translateCommentsInChallenge(
|
||||
engChal,
|
||||
getChallengeLang(transPath),
|
||||
dict,
|
||||
codeLang
|
||||
);
|
||||
const engWithTranslatedComments = codeLang
|
||||
? translateCommentsInChallenge(
|
||||
engChal,
|
||||
getChallengeLang(transPath),
|
||||
dict,
|
||||
codeLang
|
||||
)
|
||||
: engChal;
|
||||
return mergeChallenges(engWithTranslatedComments, translatedChal);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user