Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Commits on Apr 24, 2013
  1. @jeresig
Commits on Apr 23, 2013
  1. @jeresig

    Run the exercise cleaner.

    jeresig authored
  2. @jeresig
  3. @jeresig

    Merging in from stable.

    jeresig authored
Commits on Apr 22, 2013
  1. @jeresig

    Clean up the newly-changed HTML exercises and also fix up the constan…

    jeresig authored
    …tly-expanding whitespace problem in the cleaner.
Commits on Apr 17, 2013
  1. @jeresig
Commits on Apr 16, 2013
  1. @jeresig
  2. @jeresig
Commits on Apr 6, 2013
  1. @jeresig

    Add in a tool for automatically fixing some i18n issues in exercises.…

    jeresig authored
    … 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
Commits on Jul 28, 2011
  1. @jeresig
Something went wrong with that request. Please try again.