Provides functions that analyze and suggest translations for similar strings based on an existing translation. Powers the Smart Translations feature in Khan Translation Editor.
The Translation Assistant also auto-translates certain math notations, per specifications in this Google Sheet this document.
A backup of that document is kept in this repo in MathNotationByLanguage.tsv.
When a new team starts translations, they need to update the document
with their math notations, and the rules must be added
to MATH_RULES_LOCALES in src/math_translator.js.
To ignore eslint style-guide commits in blame history, use:
git blame --ignore-revs-file .git-blame-ignore-revsor to do it automatically:
git config blame.ignoreRevsFile .git-blame-ignore-revsTo run the tests:
npm run build && npm run testTo run the tests with test coverage, and report the results as text:
npm run build:coverage && npm run test:coverageThis repository is deployed to webapp as a git submodule
in webapp/third_party/javascript-khansrc/.
To test the webapp build, use:
yarn run build:webpack-prod-localTo test the integration with the Translation Editor, use:
yarn test javascript/manticore-package/