Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Split out translating
  • Loading branch information
AA-Turner committed Jul 11, 2022
commit aa1194f2aab3a9440d8328d29370a9618c7cdf02
1 change: 1 addition & 0 deletions documentation/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Documentation
help-documenting
style-guide
markup
translating
256 changes: 6 additions & 250 deletions documentation/start-documenting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -134,265 +134,21 @@ Sphinx_, blurb_ and python-docs-theme_ packages from PyPI)::
where ``<builder>`` is one of html, text, latex, or htmlhelp (for explanations
see the make targets above).

.. _translating:

Translating
===========

Python documentation translations are governed by :PEP:`545`.
They are built by `docsbuild-scripts
<https://github.com/python/docsbuild-scripts/>`__ and hosted on
docs.python.org. There are several documentation translations already
in production; others are works in progress.

+-----------------+-------------------------------+----------------------------+
| Language | Contact | Links |
+=================+===============================+============================+
| Arabic (ar) | `Abdur-Rahmaan Janhangeer | `GitHub <github_ar_>`_ |
| | <gh_osdotsystem_>`_ | |
+-----------------+-------------------------------+----------------------------+
| Bengali as | `Kushal Das <gh_kushal_>`_ | `GitHub <github_bn_in_>`_ |
| spoken in | | |
| India (bn_IN) | | |
+-----------------+-------------------------------+----------------------------+
| French (fr) | `Julien Palard (@JulienPalard)| `GitHub <github_fr_>`_ |
| | <gh_mdk_>`_ | |
+-----------------+-------------------------------+----------------------------+
| Hindi as spoken | | `GitHub <github_hi_in_>`_ |
| in India (hi_IN)| | |
+-----------------+-------------------------------+----------------------------+
| Hungarian (hu) | `Tamás Bajusz (@gbtami) | `GitHub <github_hu_>`_ |
| | <gh_gbtami_>`_ | `Mailing List <list_hu_>`_ |
+-----------------+-------------------------------+----------------------------+
| Indonesian (id) | `Oon Arfiandwi <gh_oonid_>`_ | `GitHub <github_id_>`_ |
+-----------------+-------------------------------+----------------------------+
| Italian (it) | | `mail <mail_it_>`_ |
+-----------------+-------------------------------+----------------------------+
| Japanese (ja) | `Kinebuchi Tomohiko | `GitHub <github_ja_>`_ |
| | (@cocoatomo) <gh_cocoatomo_>`_| `Doc <doc_ja_>`_ |
+-----------------+-------------------------------+----------------------------+
| Korean (ko) | | `GitHub <github_ko_>`_ |
| | | `Doc <doc_ko_>`_ |
+-----------------+-------------------------------+----------------------------+
| Marathi (mr) | `Sanket Garade | `GitHub <github_mr_>`_ |
| | <email_garade_>`_ | |
+-----------------+-------------------------------+----------------------------+
| Lithuanian (lt) | | `mail <mail_lt_>`_ |
+-----------------+-------------------------------+----------------------------+
| Persian (fa) | `Komeil Parseh (@mmdbalkhi) | `GitHub <github_fa_>`_ |
| | <gh_mmdbalkhi_>`_ | |
+-----------------+-------------------------------+----------------------------+
| Polish (pl) | | `GitHub <github_pl_>`_ |
| | | `Translations <tx_pl_>`_ |
| | | `Doc <doc_pl_>`_ |
| | | `mail <mail_pl_>`_ |
+-----------------+-------------------------------+----------------------------+
| Portuguese (pt) | Gustavo Toffo | |
+-----------------+-------------------------------+----------------------------+
| Portuguese | Marco Rougeth | `GitHub <github_pt_br_>`_ |
| as spoken | | `Wiki <wiki_pt_br_>`_ |
| in Brasil | | `Telegram <chat_pt_br_>`_ |
| (pt-br) | | `article <article_pt_br_>`_|
+-----------------+-------------------------------+----------------------------+
| Russian (ru) | | `mail <mail_ru_>`_ |
+-----------------+-------------------------------+----------------------------+
| Simplified | `Shengjing Zhu <gh_zhsj_>`_ | `Transifex <tx_zh_cn_>`_ |
| Chinese | | `GitHub <github_zh_cn_>`_ |
| (zh-cn) | | `Doc <doc_zh_cn_>`_ |
+-----------------+-------------------------------+----------------------------+
| Spanish (es) | Raúl Cumplido | `GitHub <github_es_>`_ |
+-----------------+-------------------------------+----------------------------+
| Traditional | `王威翔 Matt Wang | `GitHub <github_zh_tw_>`_ |
| Chinese | <gh_mattwang44_>`_, | `Doc <doc_zh_tw_>`_ |
| (zh-tw) | Josix Wang | |
+-----------------+-------------------------------+----------------------------+
| Turkish (tr) | `Ege Akman (@egeakman) | `GitHub <github_tr_>`_ |
| | <email_egeakman_>`_ | |
+-----------------+-------------------------------+----------------------------+

.. _article_pt_br: https://rgth.co/blog/python-ptbr-cenario-atual/
.. _gh_cocoatomo: https://github.com/cocoatomo
.. _gh_gbtami: https://github.com/gbtami
.. _gh_kushal: https://github.com/Kushal997-das
.. _gh_mdk: https://github.com/JulienPalard
.. _gh_mmdbalkhi: https://github.com/mmdbalkhi
.. _gh_oonid: https://github.com/oonid
.. _gh_osdotsystem: https://github.com/Abdur-rahmaanJ
.. _gh_zhsj: https://github.com/zhsj
.. _gh_mattwang44: https://github.com/mattwang44
.. _email_egeakman: mailto:egeakmanegeakman@hotmail.com
.. _email_garade: mailto:garade@pm.me
.. _chat_pt_br: https://t.me/pybr_i18n
.. _doc_ja: https://docs.python.org/ja/
.. _doc_ko: https://docs.python.org/ko/
.. _doc_pl: https://docs.python.org/pl/
.. _doc_zh_cn: https://docs.python.org/zh-cn/
.. _doc_zh_tw: https://docs.python.org/zh-tw/
.. _github_ar: https://github.com/Abdur-rahmaanJ/python-docs-ar
.. _github_bn_in: https://github.com/python/python-docs-bn-in
.. _github_es: https://github.com/python/python-docs-es
.. _github_fa: https://github.com/mmdbalkhi/python-docs-fa
.. _github_fr: https://github.com/python/python-docs-fr
.. _github_hi_in: https://github.com/CuriousLearner/python-docs-hi-in
.. _github_hu: https://github.com/python/python-docs-hu
.. _github_id: https://github.com/python/python-docs-id
.. _github_ja: https://github.com/python/python-docs-ja
.. _github_ko: https://github.com/python/python-docs-ko
.. _github_mr: https://github.com/sanketgarade/python-doc-mr
.. _github_pl: https://github.com/python/python-docs-pl
.. _github_pt_br: https://github.com/python/python-docs-pt-br
.. _github_tr: https://github.com/python-docs-tr/python-docs-tr
.. _github_zh_cn: https://github.com/python/python-docs-zh-cn
.. _github_zh_tw: https://github.com/python/python-docs-zh-tw
.. _list_hu: https://mail.python.org/pipermail/python-hu
.. _mail_it: https://mail.python.org/pipermail/doc-sig/2019-April/004114.html
.. _mail_lt: https://mail.python.org/pipermail/doc-sig/2019-July/004138.html
.. _mail_pl: https://mail.python.org/pipermail/doc-sig/2019-April/004106.html
.. _mail_ru: https://mail.python.org/pipermail/doc-sig/2019-May/004131.html
.. _tx_pl: https://www.transifex.com/python-doc/python-newest/
.. _tx_zh_cn: https://www.transifex.com/python-doc/python-newest/
.. _wiki_pt_br: https://python.org.br/traducao/

Starting a new translation
--------------------------

First subscribe to the `translation mailing list <translation_ml_>`_,
and introduce yourself and the translation you're starting. Translations
fall under the aegis of the `PSF Translation Workgroup <translation_wg_>`_

Then you can bootstrap your new translation by using our `cookiecutter
<https://github.com/JulienPalard/python-docs-cookiecutter>`__.

The important steps look like this:

- Create the GitHub repo (anywhere) with the right hierarchy (using the
cookiecutter).
- Gather people to help you translate. You can't do it alone.
- You can use any tool to translate, as long as you can synchronize with git.
Some use Transifex, and some use only GitHub. You can choose another
way if you like; it's up to you.
- Ensure we update this page to reflect your work and progress, either via a
PR or by asking on the `translation mailing list <translation_ml_>`_.
- When ``bugs.html``, ``tutorial``, and ``library/functions`` are 100%
completed, ask on the `translation mailing list <translation_ml_>`_ for
your language to be added in the language picker on docs.python.org.


PEP 545 summary:
----------------

Here are the essential points of :PEP:`545`:

- Each translation is assigned an appropriate lowercased language tag,
with an optional region subtag, and joined with a dash, like
``pt-br`` or ``fr``.

- Each translation is under CC0 and marked as such in the README (as in
the cookiecutter).

- Translation files are hosted on
``https://github.com/python/python-docs-{LANGUAGE_TAG}`` (not
mandatory to start a translation, but mandatory to land on
``docs.python.org``).

- Translations having completed ``tutorial/``, ``library/stdtypes``
and ``library/functions`` are hosted on
``https://docs.python.org/{LANGUAGE_TAG}/{VERSION_TAG}/``.


How to get help
---------------

Discussions about translations occur on the `translation mailing list <translation_ml_>`_,
and there's a `Libera.Chat IRC <https://libera.chat/>`_ channel,
``#python-doc``.


Translation FAQ
---------------

Which version of the Python documentation should be translated?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Consensus is to work on current stable. You can then propagate your
translation from one branch to another using `pomerge
<https://pypi.org/project/pomerge/>`__.


Are there some tools to help in managing the repo?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Here's what we're using:

- `pomerge <https://pypi.org/project/pomerge/>`__ to propagate translations
from one file to others.
- `pospell <https://pypi.org/project/pospell/>`__ to check for typos in ``.po`` files.
- `powrap <https://pypi.org/project/powrap/>`__ to rewrap the ``.po`` files
before committing. This helps keep git diffs short.
- `potodo <https://pypi.org/project/potodo/>`__ to list what needs to be translated.


How is a coordinator elected?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

There is no election; each translation has to sort this out. Here are some suggestions.

- Coordinator requests are to be public on the `translation mailing list <translation_ml_>`_.
- If the given language has a native core dev, the core dev has their
say on the choice.
- Anyone who wants to become coordinator for their native language and shows
motivation by translating and building a community will be named
coordinator.
- In case of concurrency between two persons, no one will sort this out
for you. It is up to you two to organize a local election or whatever is
needed to sort this out.
- If a coordinator becomes inactive or unreachable for a long
period of time, someone else can ask for a takeover on the `translation mailing list <translation_ml_>`_.


The entry for my translation is missing/not up to date on this page
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Ask on the `translation mailing list <translation_ml_>`_, or better, make a PR on the `devguide
<https://github.com/python/devguide/>`__.


I have a translation, but it's not in git. What should I do?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You can ask for help on the `translation mailing list <translation_ml_>`_, and
the team will help you create an appropriate repository. You can still use tools like transifex,
if you like.


My git hierarchy does not match yours. Can I keep it?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

No, inside the ``github.com/python`` organization we’ll all have the
exact same hierarchy so bots will be able to build all of our
translations. So you may have to convert from one hierarchy to another.
Ask for help on the `translation mailing list <translation_ml_>`_ if you’re
not sure on how to do it.


What hierarchy should I use in my GitHub repository?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

As for every project, we have a *branch* per version. We store ``.po``
files in the root of the repository using the ``gettext_compact=0``
style.


.. _docutils: https://docutils.sourceforge.io/
.. _python-docs-theme: https://pypi.org/project/python-docs-theme/
.. _Sphinx: https://www.sphinx-doc.org/
.. _virtualenv: https://virtualenv.pypa.io/
.. _blurb: https://pypi.org/project/blurb/
.. _translation_wg: https://wiki.python.org/psf/TranslationWG/Charter
.. _translation_ml: https://mail.python.org/mailman3/lists/translation.python.org/


Style Guide
===========

Moved to :doc:`style-guide`


Translating
===========

Moved to :doc:`translating`
Loading