sphinx-doc / sphinx-doc-translations

Translations for Sphinx's documentation
Other
22 stars 16 forks source link

Sphinx official documentation translations

|main| |test|

.. |main| image:: https://github.com/sphinx-doc/sphinx-doc-translations/actions/workflows/main.yml/badge.svg :target: https://github.com/sphinx-doc/sphinx-doc-translations/actions/workflows/main.yml :alt: Badge for the update status

.. |test| image:: https://github.com/sphinx-doc/sphinx-doc-translations/actions/workflows/test-translations.yml/badge.svg :target: https://github.com/sphinx-doc/sphinx-doc-translations/actions/workflows/test-translations.yml :alt: Badge for the translation tests

This is a project to provide Sphinx official documentation, hosted on the Read The Docs platform, in multiple languages.

How the translated documentation projects are setup on RTD

Instructions: https://docs.readthedocs.org/en/latest/localization.html#project-with-multiple-translations

Key points:

.. list-table:: :header-rows: 1

How to add a new language translation

  1. Add new language to locale/update.sh:

    .. code-block:: diff

    • LANGS='es ja'
    • LANGS='es ja pt_BR'
  2. Update po files:

    .. code-block::

    sh ./locale/update.sh

  3. Commit them

  4. Add new project on Read The Docs. For example, for pt_BR:

    https://readthedocs.org/projects/sphinx-pt-br/

    .. note:: If a RTD project name for a translation is already taken, create a unique project name instead. For example, when sphinx-ru was taken, sphinx-doc-ru was used instead.

  5. Add new translation project to parent project:

    https://readthedocs.org/dashboard/sphinx/translations/