2013-10-12 22:33:05 +00:00
|
|
|
Translating Documentation
|
|
|
|
=========================
|
|
|
|
|
|
|
|
If you wish to help translate the Salt documentation to your language, please
|
2013-10-14 19:35:23 +00:00
|
|
|
head over to the `Transifex`_ website and `signup`__ for an account.
|
2013-10-12 22:33:05 +00:00
|
|
|
|
2013-10-14 19:35:23 +00:00
|
|
|
Once registered, head over to the `Salt Translation Project`__, and either
|
|
|
|
click on **Request Language** if you can't find yours, or, select the language
|
|
|
|
for which you wish to contribute and click **Join Team**.
|
2013-10-12 22:33:05 +00:00
|
|
|
|
2013-10-14 19:35:23 +00:00
|
|
|
`Transifex`_ provides some useful reading resources on their `support
|
|
|
|
domain`__, namely, some useful articles `directed to translators`__.
|
2013-10-12 22:33:05 +00:00
|
|
|
|
|
|
|
|
2013-10-14 19:35:23 +00:00
|
|
|
.. __: https://www.transifex.com/signup/
|
|
|
|
.. __: https://www.transifex.com/projects/p/salt/
|
|
|
|
.. __: http://support.transifex.com/
|
|
|
|
.. __: http://support.transifex.com/customer/portal/topics/414107-translators/articles
|
2013-10-14 20:14:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
Building A Localized Version of the Documentation
|
2013-10-14 21:20:00 +00:00
|
|
|
-------------------------------------------------
|
2013-10-14 20:14:33 +00:00
|
|
|
|
|
|
|
While you're working on your translation on `Transifex`_, you might want to
|
|
|
|
have a look at how it's rendering.
|
|
|
|
|
2013-10-15 00:28:08 +00:00
|
|
|
|
|
|
|
Install The Transifex Client
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
To interact with the `Transifex`_ web service you will need to install the
|
|
|
|
`transifex-client`__:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
pip install transifex-client
|
|
|
|
|
|
|
|
|
|
|
|
.. __: https://github.com/transifex/transifex-client
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Configure The Transifex Client
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
Once installed, you will need to set it up on your computer. We created a
|
|
|
|
script to help you with that:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
.scripts/setup-transifex-config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Download Remote Translations
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2013-10-14 20:14:33 +00:00
|
|
|
There's a little script which simplifies the download process of the
|
|
|
|
translations(which isn't that complicated in the first place).
|
|
|
|
So, let's assume you're translating ``pt_PT``, Portuguese(Portugal). To
|
|
|
|
download the translations, execute from the ``doc/`` directory of your Salt
|
|
|
|
checkout:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
|
2013-10-14 21:20:00 +00:00
|
|
|
make download-translations SPHINXLANG=pt_PT
|
2013-10-14 20:14:33 +00:00
|
|
|
|
2013-10-14 21:20:00 +00:00
|
|
|
|
|
|
|
To download ``pt_PT``, Portuguese(Portugal) and ``nl``, Dutch, you can use the
|
|
|
|
helper script directly:
|
2013-10-14 20:14:33 +00:00
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
.scripts/download-translation-catalog pt_PT nl
|
|
|
|
|
|
|
|
|
2013-10-15 00:28:08 +00:00
|
|
|
Build Localized Documentation
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2013-10-14 20:14:33 +00:00
|
|
|
After the download process finishes, which might take a while, the next step is
|
|
|
|
to build a localized version of the documentation.
|
|
|
|
Following the ``pt_PT`` example above:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
make html SPHINXLANG=pt_PT
|
|
|
|
|
|
|
|
|
2013-10-15 00:28:08 +00:00
|
|
|
View Localized Documentation
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2013-10-14 21:20:00 +00:00
|
|
|
Open your browser, point it to the local documentation path and check the
|
|
|
|
localized output you've just build.
|
2013-10-14 20:14:33 +00:00
|
|
|
|
|
|
|
|
2013-10-13 18:46:52 +00:00
|
|
|
.. _`Transifex`: https://www.transifex.com
|