2024-11-22 15:24:12 +00:00
|
|
|
Documentation translation
|
2024-11-30 12:37:27 +00:00
|
|
|
Translations are done with `Weblate <https://hosted.weblate.org/projects/canaille/documentation>`_.
|
2024-11-22 15:24:12 +00:00
|
|
|
|
|
|
|
The following commands are there as documentation, only the message extraction and the language addition is needed for contributors.
|
|
|
|
|
|
|
|
Message extraction
|
|
|
|
~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
After you have edited translatable strings, you should extract the messages with:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2024-11-22 16:45:06 +00:00
|
|
|
sphinx-build --builder gettext doc doc/locales
|
2024-11-22 15:24:12 +00:00
|
|
|
|
|
|
|
Language addition
|
|
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
You can add a new language manually with the following command, however this should not be needed as Weblate takes car of this:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2024-11-22 16:45:06 +00:00
|
|
|
sphinx-intl update --pot-dir doc/locales --locale-dir doc/locales -l fr
|
2024-11-22 15:24:12 +00:00
|
|
|
|
|
|
|
Build the documentation in another language
|
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
2024-11-22 16:45:06 +00:00
|
|
|
sphinx-build --builder html --define language=fr doc build/sphinx/html/fr
|