Commit Graph

8 Commits (7818ba55b52b2db1b7a93375c210bc2dd8b0e23e)

Author SHA1 Message Date
Oliver Eyton-Williams 4cc20172c5
fix: fallback to english challenges (#45635)
* fix: fallback to english challenges

All challenges will use the english version if a translated file is not
available.  SHOW_NEW_CURRICULUM still gates what's shown in the client.

* refactor: use closures to simplify createChallenge

* refactor: remove messy destructure

* refactor: add meta via helper

* fix: fallback to [] for meta.required

* fix: repair challenge.block

* refactor: use CONST_CASE for meta + challenge dirs

* fix: catch empty superblocks immediately

* fix: clean up path.resolves

* fix: invalid syntax in JS project steps

* fix: default to english comments and relax tests

Instead of always throwing errors when a comment is not translated, the
tests now warn while SHOW_UPCOMING_CHANGES is true, so that tests will
pass while we're developing and allow translators time to work.

They still throw when SHOW_UPCOMING_CHANGES is false to catch issues
in production

* test: update createCommentMap test

* refactor: delete stale comment

* refactor: clarify validate with explanatory consts

* feat: throw if audited cert falls back to english

* fix: stop testing upcoming localized curriculum
2022-04-15 09:17:49 -05:00
Huyen Nguyen 2c16234853
chore: add jest global variables (#42573) 2021-06-20 09:14:42 +02:00
Oliver Eyton-Williams 7640147a07
feat: curriculum dictionaries to objects (#40878)
* test: update to catch missing comments

* feat: convert dictionaries to JSON objects

* chore: update dictionaries

* fix: update tests for new dictionary objects

* fix: convert fixture to json

* fix: updated the incomplete dicts to new format
2021-02-02 12:14:29 -07:00
Oliver Eyton-Williams 24d9c94fe5 refactor: remove confusing abstraction 2021-01-31 12:15:34 +05:30
Oliver Eyton-Williams d2ecd03013 fix: recreate comment map 2020-10-22 02:51:46 +05:30
Oliver Eyton-Williams df532099bc
test: stop relying on curriculum dir structure
Also refactors path resolution a little
2020-09-29 22:09:02 +02:00
Oliver Eyton-Williams 9089ddca5c
fix: use location for language, not extension
Rather than relying on .lang.md this expects to find the English source
challenge in /curriculum/challenges/english/<translationPath>
2020-09-29 22:09:01 +02:00
Oliver Eyton-Williams fa931134a4 test: add tests for translated challenge parser 2020-08-16 04:45:17 +05:30