phetsims / expression-exchange

"Expression Exchange" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
2 stars 2 forks source link

Current release branch missing dependency, causing translation issues #144

Closed jbphet closed 4 years ago

jbphet commented 4 years ago

I recently received a message from the build server that indicated a failure when someone tried to translate Expression Exchange sim into Farsi (locale=fa). Here is an excerpt:

Build failure: Build aborted,Error: grunt build-for-server --brand=phet --locales=fa --allHTML in ../expression-exchange failed with exit code 3 and stdout:
Running "lint-all" task

Running "clean" task

Running "requirejs-build" task
requirejs failed
Error: Error: Parse error using esprima for file: /data/share/phet/phet-repos/twixt/js/Easing.js
Error: Line 16: Unexpected token
In module tree:
    expression-exchange-main
      EXPRESSION_EXCHANGE/basics/EEBasicsScreen
        EXPRESSION_EXCHANGE/common/model/ExpressionManipulationModel
          EXPRESSION_EXCHANGE/common/model/CoinTermFactory
            EXPRESSION_EXCHANGE/common/model/CoinTerm

The currently published version is 1.1.13, so I checked out the 1.1 branch and its dependencies and looked at line 16 of Easing.js. I was shocked to see an import statement there. I quickly figured out that the reason was that this was the master version of this file, and the reason for that is because there is no entry for twixt in dependencies.json on this branch. Oops. I suspect that once I fix this and redeploy, things should work fine.

jbphet commented 4 years ago

By the way, this was apparently working fine until the recent cutover to ES6 modules, which makes sense I suppose, since there probably isn't much activity in this file.

Going through the commit history on the branch, it looks like the branch was created on June 26, 2017, so I'm going to add the dependency for the SHA of the twixt repo as of that date. That appears to be https://github.com/phetsims/twixt/commit/3ca102d05924c24e6dd1450d3acdf44845fd5187.

jbphet commented 4 years ago

Okay, I think this should be fixed. @arouinfar - can you try submitting the translation that you tried recently and see if it works?

arouinfar commented 4 years ago

@jbphet it worked! https://phet.colorado.edu/sims/html/expression-exchange/latest/expression-exchange_fa.html