edX i18n Tools

Installing
EdX i18n tools are a set of commands useful for developers and translators to extract, compile and validate translations. The edX i18n tools can be installed running the following command inside the extracted directory.
pip install edx-i18n-tools
Running
For Django projects, commands should be run from the root directory, and the default configuration will be found at ./conf/locale/config.yaml. For Django apps, commands should be run from the app’s directory, and the default configuration will be found at ./locale/config.yaml.
You can specify a different configuration file with the --config argument.
General Commands
To extract source strings and populate .po translation files with them
i18n_tool extract
To generate test language(eo) translation files from source .po files
i18n_tool dummy
To compile .po translation files into .mo message files
i18n_tool generate
To find translation errors in .po files
i18n_tool validate
To determine if the source translation files(.po) are up-to-date
i18n_tool changed
To segment a .po file into smaller files based on the locations of the messages
i18n_tool segment
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 a ~/.transifexrc file. Once the Transifex account has been set up, create a ~/.transifexrc file having these contents:
[https://www.transifex.com] hostname = https://www.transifex.com password = YOURPASSWORD token = username = YOURUSERNAME(EMAIL)
Also make sure you have a Transifex configuration file .tx/config present under the project directory.
To upload translations to Transifex
i18n_tool transifex push
To download translations from Transifex
i18n_tool transifex pull
Configuration
Details of the config.yaml file are in edx-platform/conf/locale/config.yaml
Changes
v0.5.0
Added Django22 support.
v0.4.9
Updated validate to log problems found in translations.
v0.4.8
Updated transifex to pull files from Transifex that are atleast 3% done previous value was 10%.
v0.4.7
Test that tag validation catches HTML added to translations.
When tag validation finds differences, output should be deterministic.
v0.4.6
Ensure that we only pull files from Transifex that are 10% done. Avoids a problem with our validation code choking on empty po files and avoids translations that are just getting started.
Don’t complain about obviously missing files when cleaning the headers of just-pulled files, and make sure that we do notice the files we did actually pull.
Ensure that Plural-Forms has a valid value when extracting. python-gettext will choke otherwise.
When creating a dummy po file, don’t garble source strings in a way that relies on the Python dictionary order. This way the result will always be the same no matter the machine.
v0.4.5
Extract from .jsx files too.
v0.4.4
Added check-all (check all po files) argument to validate command.
v0.4.3
Specify Language header for generated dummy po files.
v0.4.2
Specified utf-8 encoding for .yaml file.
v0.4.1
Fixes bug preventing the use of –empty with The validate command.
v0.4.0
The validate command returns a non-zero exit code when problems are detected with the translation files.
v0.3.10
Add support for edx_lang_map in config.yaml to share translations across language codes.
v0.3.9
Fix Python 3 issues in validate.
v0.3.8
Added support for Django 1.11 and Python 3.6
v0.3.7
A few small fixes for Django projects.
v0.3.6
Major refactoring to enable use on Django apps as well as Django projects.
v0.3.5
Pinned a requirement to prevent failures when used with other applications.
v0.3.4
i18n_tool changed command added. This command determines if the source translation files are up-to-date. If they are not it returns a non-zero exit code.
v0.3.2
i18n_tool validate no longer complains about problems in both the component .po files and the combined .po files.
v0.3.1
i18n_tool extract will preserve existing django.po and djangojs.po files in the source directory.
v0.3
i18n_tool transifex push and i18n_tool transifex pull now can take optional resource names on the command line. If not provided, all resources are pushed/pulled.
v0.2.1
i18n_tool validate no longer leaves an unneeded messages.mo file behind.
Development
To work on this code:
Install Tox:
$ pip install tox
Run tests:
$ tox
If you have failures because msgcat failed, you may need to install it, and adjust your PATH to include it. On a Mac, for example:
$ brew install gettext $ PATH=/usr/local/Cellar/gettext/0.19.3/bin/:$PATH tox
Metadata
Release files for edx-i18n-tools 2.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| edx_i18n_tools-2.1.0.tar.gz | 81.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| edx_i18n_tools-2.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 114.8 kB
Release files / edx_i18n_tools-2.1.0.tar.gz
| Download URL | edx_i18n_tools-2.1.0.tar.gz |
|---|---|
| Size | 81.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d6613f21d4ac5644a4c6fa6526ef7335cf25c0b0cbb7d0ad72c53aa4d6dacca
|
|
BLAKE2b-256 checksum How to use checksums |
d44d7ab2bfbf4c9a641a912c701d25400d6181aa211cfda056be2605b51baf2a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency logRelease files / edx_i18n_tools-2.1.0-py3-none-any.whl
| Download URL | edx_i18n_tools-2.1.0-py3-none-any.whl |
|---|---|
| Size | 32.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
910949ae9e20230f59a50fac2edaf1c2493b8445921d971bb5c2405fd4cff800
|
|
BLAKE2b-256 checksum How to use checksums |
b8b7c97f43c0baaa178f1a8305f4ec6638bc8d672b60f974756737acc1965a76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 1, 2026.
Transparency log