Skip to content

Khan/translation-assistant

Repository files navigation

Translation Assistant

CI codecov

Provides functions that analyze and suggest translations for similar strings based on an existing translation. Powers the Smart Translations feature in Khan Translation Editor.

Auto-Translation of Math Notation

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.

The math auto-translation code is also utilized in the Khan Academy Dots browser plugin.

For Devs

Deploying to webapp

This repository is deployed to webapp by referencing a specific Git commit in webapp/package.json.

To test the webapp build, use:

yarn run build:webpack-prod-local

To test the integration with the Translation Editor, use:

yarn test javascript/manticore-package/

Deploying to Khan Academy Dots plugin

If you update the math auto-translation functionality in src/math-translator.js, you should also publish a new version of the Khan Academy Dots plugin, which uses this repository as a Git submodule. Please follow the guidelines in the repo README.

Tests and test coverage

To run the tests:

npm run build && npm run test

To run the tests with test coverage, and report the results as text:

npm run build:coverage && npm run test:coverage

Git blame

To ignore eslint style-guide commits in blame history, use:

git blame --ignore-revs-file .git-blame-ignore-revs

or to do it automatically:

git config blame.ignoreRevsFile .git-blame-ignore-revs

About

Intelligent translation memory for perseus exercises

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published