fix(tools): update translation parser
Since we're adding more validation we can simplify the parser and make sure it does catch all the comments. Rather than worry about a load of edge cases that do not appear in our challenges.
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
793fa8fb52
commit
92a60f8bce
@ -201,12 +201,12 @@ async function parseTranslation(engPath, transPath, dict, lang) {
|
||||
const engChal = await parseMarkdown(engPath);
|
||||
const translatedChal = await parseMarkdown(transPath);
|
||||
|
||||
const engWithTranslatedComments = translateCommentsInChallenge(
|
||||
engChal,
|
||||
lang,
|
||||
dict
|
||||
);
|
||||
|
||||
// challengeType 11 is for video challenges, which have no seeds, so we skip
|
||||
// them.
|
||||
const engWithTranslatedComments =
|
||||
engChal.challengeType !== 11
|
||||
? translateCommentsInChallenge(engChal, lang, dict)
|
||||
: engChal;
|
||||
return mergeChallenges(engWithTranslatedComments, translatedChal);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user