Clone wiki

satchmo / HowToTranslate

How to translate Satchmo

Using Transifex

Satchmo is available on transifex which describes itself as “... an open service allowing people to collaboratively translate software, documentation and other types of projects.”

This application provides an easy to use web interface for translating Satchmo and submitting the translations back to Satchmo so they may be incorporated into the application.

The specific Satchmo transifex site is here.

If you prefer to use your own tools for translation, the sections below describe the steps to generate and maintain your translations.

Translating Satchmo

  • Download the latest development version from hg, see GetCode.
  • Change to the directory where your Satchmo source is stored (somewhere on your PYTHONPATH). You can run the following find command to compile all of the langauge files for the satchmo apps:
find . -name locale -exec sh -c 'cd $0 && cd ../ &&
        /path/to/django-trunk/django/bin/ makemessages -l de -e html,txt,rml' {} \;

In the example above, replace “de” with the language code for the message file you want to create. The language code, in this case, is in locale format. For example, it’s pt_BR for Brazilian Portuguese and de_AT for Austrian German. The first two letters of the locale is a language code defined in ISO 639-1 . The second and optional part consists of an underscore followed by a two letter country code as defined in ISO 3166-1 . For the command above to work you need to have python and xgettext installed.

This will extract strings that need to be translated from the Satchmo code and templates. Upon completion of this command these strings and references to where they are used are stored in the file `satchmo/locale/de/LC_MESSAGES/django.po` (again, replace "de" with your own locale).

If the `django.po` file already exists the above command will update it and add new strings if any are discovered.

  • Submit a ticket with your translation

Translating dependancies

Unless a translation to your language is already available you may also need to translate packages on which Satchmo depends:

Such translations are to be submitted to the corresponding project and not to the Satchmo project.