edX i18n Python Tools

edX i18n tools are set of commands useful for developers and translators to extract, compile and validate translations. edX i18n tools can be downloaded here and installed running following command inside the extracted directory

python setup.py install

OR if you have edX platform installed then i18n tools should be already installed in edxapp virtual environment. 

Running commands from the edx-platform directory will default to loading the configuration at ./conf/locale/config.yaml. You can specify a different configuration file with the --config argument.

General Commands

  1. To extract source strings and populate .po translation files with them

    i18n_tool extract
  2. To generate test language(eo) translation files from source .po files

    i18n_tool dummy
  3. To compile .po translation files into .mo message files

  4. To find translation errors in .po files

  5. To determine if the source translation files(.po) are up-to-date

Transifex Commands

Developers or Translators can use commands provided by edX  i18n tools to upload translations to transifex or download them. Before using these commands one should have an account on transifex.com to create ~/.transifexrc file. Once transifex account has been setup create a ~/.transifexrc file having these contents.

Also make sure you have transifex configuration file .tx/config present under project directory.

  1. To upload translations to transifex

  2. To download translations from transifex

Coverage Testing

https://edx.readthedocs.io/projects/edx-developer-guide/en/latest/internationalization/i18n.html#coverage-testing