feat: parse translated challenges
Using the English challenge as a source for the seed, solution and tests this takes the parts that can be translated from the translated version of the challenge. It also translates known comments in the seed.
This commit is contained in:
committed by
Mrugesh Mohapatra
parent
d41e44ebf9
commit
0952ca6bfd
@ -154,6 +154,19 @@ describe('translation parser', () => {
|
||||
);
|
||||
});
|
||||
|
||||
it('does not translate urls', () => {
|
||||
const seed = `http:// Add your code below this line
|
||||
Add your code above this line `;
|
||||
expect(translateComments(seed, 'chinese', SIMPLE_TRANSLATION, 'js')).toBe(
|
||||
seed
|
||||
);
|
||||
const seedS = `https:// Add your code below this line
|
||||
Add your code above this line `;
|
||||
expect(
|
||||
translateComments(seedS, 'chinese', SIMPLE_TRANSLATION, 'js')
|
||||
).toBe(seedS);
|
||||
});
|
||||
|
||||
it('replaces inline English comments with their translations', () => {
|
||||
const seed = `inline comment // Add your code below this line
|
||||
Add your code above this line `;
|
||||
|
Reference in New Issue
Block a user