openedx / i18n-tools

Tools to help with internationalization and localization of Open edX projects
Apache License 2.0
26 stars 31 forks source link

edX i18n Tools |build-status| |coverage-status| ###############################################

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.

python setup.py install

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

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 <https://www.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.

Configuration

Details of the config.yaml file are in edx-platform/conf/locale/config.yaml <https://github.com/openedx/edx-platform/blob/master/conf/locale/config.yaml>_

Changes

v0.5.0

v0.4.9

v0.4.8

v0.4.7

v0.4.6

v0.4.5

v0.4.4

v0.4.3

v0.4.2

v0.4.1

v0.4.0

v0.3.10

v0.3.9

v0.3.8

v0.3.7

v0.3.6

v0.3.5

v0.3.4

v0.3.2

v0.3.1

v0.3

v0.2.1

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

.. |build-status| image:: https://travis-ci.com/edx/i18n-tools.svg?branch=master :target: https://travis-ci.com/edx/i18n-tools .. |coverage-status| image:: https://coveralls.io/repos/edx/i18n-tools/badge.png :target: https://coveralls.io/r/edx/i18n-tools