See https://docs.google.com/a/khanacademy.org/spreadsheets/d/1wCONrsK1ujRCLal7bcxS0cVkfpfKiPzapt3SsMJ_zqI/edit#gid=0 Color: Cyan Test Plan: Take all hints and succesfully answer a question within each problem type for all modified exercises. Auditors: eater
Summary: Also did some misc cleanup in khan-exercise.js, mostly related to module-y things ("151 ++----"). I combined local jquery-ui into one file to make it easier to load. Test Plan: Opened addition_1, deriviative_intuition, graphing_points_2 locally, and all looked fine. In webapp/khan-exercises/, ran: ``` npm install -g requirejs r.js -o requirejs.config.js ``` then saw that /exercises/addition_1 looked right. Reviewers: eater, jack Reviewed By: jack CC: alex Differential Revision: http://phabricator.khanacademy.org/D7095
Auditors: emily CC: ben
…g entities with characters in data-if attributes.
… the data-if attributes.
…tly-expanding whitespace problem in the cleaner.
… Right now it just fixes pronoun usage. Summary: There are some methods that are used in exercises that need to be banned in order to make our translation efforts sane. Some of these methods can be fixed programmatically - which is what I'm attempting to do here. To start I'm targeting these four methods: `he(NUM)/He(NUM)/his(NUM)/His(NUM)` I go through all the extracted strings in an exercise and look for `var` elements that contain one of those four methods. If it exists then I make sure that every usage of one of those methods has the same `NUM` specified. If different `NUM`s are used then the file will have to be fixed manually (at the moment only 3 strings in 3 files suffer from this problem). Assuming the `NUM`s are all the same we then then convert the existing string like so: <p><var>He(1)</var> threw a ball!</p> Becomes: <p data-if="isMale(1)">He threw a ball!</p><p data-else>She threw a ball!</p> (This is using the built-in data-if/data-else scheme used in exercises and makes use of a new method I've introduced: `isMale`.) This makes it so that each sentence only has a single gender being used and it's being displayed inline (making translation super-simple). Test Plan: Run `python build/extract_strings.py --fix exercises/*.html`. At the moment it should say that there are four errors (this is correct). If you were to reset all of the exercises back to their original state you woulud see that the script also modifies the files. Reviewers: csilvers, eater CC: alpert Differential Revision: http://phabricator.khanacademy.org/D2124