2013-10-12 22:33:05 +00:00
|
|
|
Translating Documentation
|
|
|
|
=========================
|
|
|
|
|
2014-12-11 15:51:43 +00:00
|
|
|
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
|
|
|
|
2014-12-11 15:51:43 +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
|
2013-10-14 19:35:23 +00:00
|
|
|
for which you wish to contribute and click **Join Team**.
|
2013-10-12 22:33:05 +00:00
|
|
|
|
2014-12-11 15:51:43 +00:00
|
|
|
`Transifex`_ provides some useful reading resources on their `support
|
2013-10-14 19:35:23 +00:00
|
|
|
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
|
|
|
|
2014-12-11 15:51:43 +00:00
|
|
|
While you're working on your translation on `Transifex`_, you might want to
|
2013-10-14 20:14:33 +00:00
|
|
|
have a look at how it's rendering.
|
|
|
|
|
2013-10-15 00:28:08 +00:00
|
|
|
|
|
|
|
Install The Transifex Client
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2014-12-11 15:51:43 +00:00
|
|
|
To interact with the `Transifex`_ web service you will need to install the
|
2013-10-15 00:28:08 +00:00
|
|
|
`transifex-client`__:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
pip install transifex-client
|
|
|
|
|
|
|
|
|
|
|
|
.. __: https://github.com/transifex/transifex-client
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Configure The Transifex Client
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2014-12-11 15:51:43 +00:00
|
|
|
Once installed, you will need to set it up on your computer. We created a
|
2013-10-15 00:28:08 +00:00
|
|
|
script to help you with that:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
.scripts/setup-transifex-config
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Download Remote Translations
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2014-12-11 15:51:43 +00:00
|
|
|
There's a little script which simplifies the download process of the
|
2013-10-14 20:14:33 +00:00
|
|
|
translations(which isn't that complicated in the first place).
|
2014-12-11 15:51:43 +00:00
|
|
|
So, let's assume you're translating ``pt_PT``, Portuguese(Portugal). To
|
|
|
|
download the translations, execute from the ``doc/`` directory of your Salt
|
2013-10-14 20:14:33 +00:00
|
|
|
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
|
|
|
|
2014-12-11 15:51:43 +00:00
|
|
|
To download ``pt_PT``, Portuguese(Portugal), and ``nl``, Dutch, you can use the
|
2013-10-14 21:20:00 +00:00
|
|
|
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
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2014-12-11 15:51:43 +00:00
|
|
|
After the download process finishes, which might take a while, the next step is
|
2013-10-14 20:14:33 +00:00
|
|
|
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
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
2014-12-11 15:51:43 +00:00
|
|
|
Open your browser, point it to the local documentation path and check the
|
2013-10-14 21:20:00 +00:00
|
|
|
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
|