| 1 | = Summary = |
| 2 | This page is a proposal for a workflow to be able to translate Django documentation through po files (and [[http://www.transifex.com|Transifex]] platform). |
| 3 | |
| 4 | = Translation storage = |
| 5 | Proposal is to store pot files and po translation files in a separate repository (e.g. django-docs-translations). Pot files only take up 4Mb, so considering that for each language, you add ~7Mb, this is too much for the Django main repository. |
| 6 | |
| 7 | = Workflow = |
| 8 | 1. A modification is done in the /docs dir of Django's repo. |
| 9 | |
| 10 | 2. A `make gettext` in the 'docs' directory generates pot files in `_build/locale` (works already). Those pot files are copied to `django-docs-translations/pots` and modifications pushed. |
| 11 | |
| 12 | 3. Transifex downloads new pot files once or twice a day. |
| 13 | |
| 14 | 4. Translators translate strings on Transifex. |
| 15 | |
| 16 | 5. At defined times, translations are fetched from Transifex and pushed to `django-docs-translations/translations/<locale>/*.po`. |
| 17 | |
| 18 | 6. Translated docs build: |
| 19 | * `make translations` in `django-docs-translations` generates .mo files. |
| 20 | * `make html LANGUAGE=<locale> TRANSDIR=<path>/django-docs-translations/translations/<locale>/` in `django/docs` |
| 21 | * Built HTML files are pushed online |
| 22 | |
| 23 | = Issues = |
| 24 | |
| 25 | * Some strings are not translatable through po files currently. See https://github.com/django/django/blob/master/docs/_ext/djangodocs.py#L128 |