From ef7990979b065f79701480cef98e4698a805be7c Mon Sep 17 00:00:00 2001 From: rhiaro Date: Tue, 16 Apr 2019 08:43:48 +0200 Subject: [PATCH] Clean up translate instructions in the readme --- README.md | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index e733a8a7..cd0c5389 100644 --- a/README.md +++ b/README.md @@ -46,13 +46,23 @@ $ apt-get install python-babel And you need to get a [Transifex API key](https://www.transifex.com/user/settings/api/), make sure you have access to the [BODS project on Transifex](https://www.transifex.com/OpenDataServices/bods-v01) -**When you add or update the docs** you need to do the following so that they can be translated, in the `docs` directory: +**When you change text in the docs** you need to do the following so that they can be translated: -1. Run `make gettext` to extract translatable English strings from the docs. -2. Run `pybabel extract -F babel_bods_codelist.cfg . -o docs/locale/codelist.pot` to extract translatable English strings from the codelists. -2. Run `pybabel extract -F babel_bods_schema.cfg . -o docs/locale/schema.pot` to extract translatable English strings from the schema. -2. *If you have new pages* run `sphinx-intl update-txconfig-resources --pot-dir _build/gettext --transifex-project-name bods-v01` to register the translation files with Transifex (generates or updates contents `.tx/config` file). -3. Run `tx push -s` to push to Transifex. +1. `cd docs` +2. Run `make gettext` to extract translatable English strings from the docs. +3. *If you have new pages* run `sphinx-intl update-txconfig-resources --pot-dir _build/gettext --transifex-project-name bods-v01` to register the translation files with Transifex (generates or updates contents `.tx/config` file). + +**If you modified the codelists** also: + +1. Run `pybabel extract -F babel_bods_schema.cfg . -o docs/locale/schema.pot` to extract translatable English strings from the schema. + +**If you modified the schema** also: + +1. Run `pybabel extract -F babel_bods_codelist.cfg . -o docs/locale/codelist.pot` to extract translatable English strings from the codelists. + +And then always: + +4. Run `tx push -s` to push to Transifex. Now the files are ready to be translated in Transifex. @@ -73,18 +83,4 @@ $ cd docs $ sphinx-build -b html -D language=ru . _build/html/ru ``` - - - - - \ No newline at end of file +Note: in this version, the schema and codelists are available for translation in Transifex, but they are *not* yet translated when the docs are built. \ No newline at end of file