This repository has been archived by the owner on May 11, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix $_ in local i18n.js so that Perseus can use it when running locally
Summary: /local-only/i18n.js defined window.$_ using an unspecified reference to createFragment, which didn't cause an error when testing locally because khan-exercises doesn't include any React code. However, the same local javscript file is used when running Perseus locally - and Perseus uses $_ all over the place. Test Plan: I ran ./local-only/update-local.sh as part of this commit. Since the newest i18n.js no longer exports $._ I grepped to make sure it was no longer used in any exercise/util: grep -E '(jQuery|\$)\._\(|(jQuery|\$)\.ngettext|(jQuery|\$)\.i18nDoNotTranslate' -r . make lint python build/lint_i18n_strings_test.py make pack Checked that both [unpacked](http://localhost:8000/exercises/decimals_on_the_number_line_1.html) and [packed](http://localhost:8000/exercises-packed/decimals_on_the_number_line_1.html?lang=es) exercises work Updated the khan-exercises submodule in the Perseus repo and verified that [widgets using $_](http://localhost:9000/test.html#content=%7B%22question%22%3A%7B%22content%22%3A%22%5B%5B%E2%98%83%20radio%201%5D%5D%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%22radio%201%22%3A%7B%22type%22%3A%22radio%22%2C%22alignment%22%3A%22default%22%2C%22static%22%3Afalse%2C%22graded%22%3Atrue%2C%22options%22%3A%7B%22choices%22%3A%5B%7B%7D%2C%7B%7D%5D%2C%22randomize%22%3Afalse%2C%22multipleSelect%22%3Afalse%2C%22displayCount%22%3Anull%2C%22hasNoneOfTheAbove%22%3Afalse%2C%22onePerLine%22%3Atrue%2C%22deselectEnabled%22%3Afalse%7D%2C%22version%22%3A%7B%22major%22%3A1%2C%22minor%22%3A0%7D%7D%7D%7D%2C%22answerArea%22%3A%7B%22type%22%3A%22multiple%22%2C%22options%22%3A%7B%22content%22%3A%22%22%2C%22images%22%3A%7B%7D%2C%22widgets%22%3A%7B%7D%7D%2C%22calculator%22%3Afalse%2C%22periodicTable%22%3Afalse%7D%2C%22itemDataVersion%22%3A%7B%22major%22%3A0%2C%22minor%22%3A1%7D%2C%22hints%22%3A%5B%5D%7D) render properly. Reviewers: csilvers Reviewed By: csilvers Differential Revision: https://phabricator.khanacademy.org/D22830
- Loading branch information