Skip to content

Commit af9fcbc

Browse files
Init
1 parent 3a8b71e commit af9fcbc

File tree

3 files changed

+198
-63
lines changed

3 files changed

+198
-63
lines changed

contrib/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ major section at the top of each column.]*
7575
* :ref:`documenting`
7676
* :ref:`style-guide`
7777
* :ref:`rst-primer`
78-
* :doc:`documentation/translations`
78+
* :ref:`translating`
7979
* :ref:`devguide`
8080
-
8181
* :ref:`setup`

documentation/translations/coordinating.rst

Lines changed: 190 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -3,79 +3,189 @@ Coordinating
33
============
44

55
Information about the Python documentation translation processes is
6-
found in this devguide and :PEP:`545`.
7-
Translations are built by `docsbuild-scripts
8-
<https://github.com/python/docsbuild-scripts/>`__ and hosted on
9-
docs.python.org. Translations
10-
are overseen by the `Editorial Board <EB_>`_
6+
found on this page and in :PEP:`545`. Translations are overseen by the
7+
`Editorial Board <EB_>`_.
8+
9+
.. _translation-help:
10+
11+
Communication/Help channels
12+
===========================
13+
14+
Discussions about translations occur on the Python Docs Discord
15+
`#translations channel <https://discord.gg/h3qDwgyzga>`_, `translation
16+
mailing list <translation_ml_>`_, and the
17+
`translations category <trans_disc_>`_ of the Python Discourse.
18+
19+
For administrative issues, ping ``@python/editorial-board``.
20+
21+
.. XXX May change to @python/translations
22+
1123
1224
Starting a new translation
1325
==========================
1426

15-
First subscribe to the `translation mailing list <translation_ml_>`_,
16-
and introduce yourself and the translation you're starting.
27+
Coordination is not a once-off task, it is a long term commitment. Before
28+
you start your translation, ask carefully consider if you will be able to commit
29+
to this.
30+
Every coordinator should be familiar with translating, for this you should see
31+
:ref:`translating`.
32+
33+
The following sections will guide you through setting up your translation.
34+
If you have any questions or need help, ask in one of the
35+
:ref:`help channels <translation-help>`.
36+
37+
38+
Announcement
39+
------------
40+
41+
You should post an announcement introducing yourself and the translation you're
42+
starting on `Discourse <trans_disc>`_. You should also join the other communication
43+
channels if possible.
44+
45+
.. XXX Discourse is more read and public nowadays, it is probably a better place
46+
47+
Coordination team
48+
-----------------
49+
50+
Each translation team will decide on the number of coordinators.
51+
While initially one person is fine, we recommend expanding to having two or
52+
three coordinators. You can find more on choosing coordinators in the FAQ below.
53+
54+
.. XXX move stuff from the FAQ?
55+
56+
57+
Translation team
58+
----------------
59+
60+
.. figure:: translator-workload.svg
61+
:class: invert-in-dark-mode
62+
:align: center
63+
:alt: Translator workload chart
64+
65+
.. XXX chart for emphasis?
66+
67+
Gather people to help you translate. You can't do it alone.
68+
You should update :ref:`this table <translation-coordinators>` via a PR to make
69+
your translation easier to find. In the entry you can also include links to
70+
guides or other resources for translators.
71+
72+
73+
Repository
74+
----------
75+
76+
To start your translation you should create a GitHub repository, under any
77+
account, with the correct git hierarchy and folder structure. This can be done
78+
in several ways, and will dictate the translation process you use.
79+
80+
The branch name should be the version, for example, ``3.14``, and the files
81+
should be structured like the source files in `CPython/Doc <https://github.com/python/cpython/tree/main/Doc>`_.
82+
A correctly set up repository should look like this: `python-docs-pl <https://github.com/python/python-docs-pl/>`_
83+
84+
85+
Cookiecutter/Bootstrapper
86+
~~~~~~~~~~~~~~~~~~~~~~~~~
1787

1888
Then you can bootstrap your new translation by using the `cookiecutter
1989
<https://github.com/python-docs-translations/python-docs-cookiecutter>`__ or
2090
`bootstrapper <https://github.com/python-docs-translations/python-docs-bootstrapper>`__.
21-
You can also start your translation using `Transifex <https://explore.transifex.com/python-doc/python-newest/>`_
22-
following this `guide <https://python-docs-transifex-automation.readthedocs.io/commands.html>`_.
91+
The repository can then be used with a pull-request based translation process.
2392

24-
The important steps look like this:
2593

26-
- Create the GitHub repo (any account) with the correct hierarchy by using one
27-
of the bootstrappers or Transifex.
28-
- Gather people to help you translate. You can't do it alone.
29-
- You can use any tool to translate, as long as you can synchronize with Git.
30-
Some use Transifex, and some use only GitHub. You can choose another
31-
way if you like; it's up to you.
32-
- Update :doc:`this page <translating>` to reflect your work and progress, either via a
33-
PR or by asking on the `translation mailing list <translation_ml_>`_.
34-
- When ``bugs``, ``tutorial``, and ``library/functions`` are 100%
35-
completed, ask on the `translation mailing list <translation_ml_>`_ for
36-
your language to be added in the language switcher on docs.python.org.
94+
Transifex
95+
~~~~~~~~~
3796

97+
You can also start your translation using `Transifex <https://explore.transifex.com/python-doc/python-newest/>`_.
98+
This will automate updating translations, and will allow you to translate via
99+
the web interface.
38100

39-
How to get help
40-
===============
101+
This is best done with a workflow that periodically checks for translations,
102+
a sample one with instructions can be found `here <https://python-docs-transifex-automation.readthedocs.io/workflows.html>`__.
103+
An in depth guide for manually doing this can also be found `here <https://python-docs-transifex-automation.readthedocs.io/commands.html>`__.
41104

42-
Discussions about translations occur on the Python Docs Discord
43-
`#translations channel <https://discord.gg/h3qDwgyzga>`_, `translation
44-
mailing list <translation_ml_>`_, and the
45-
`translations category <https://discuss.python.org/c/documentation/translations/>`_
46-
of the Python Discourse.
105+
To be added as the coordinator(s) on Transifex for your language, open an issue
106+
in the `tracker <https://github.com/python-docs-translations/transifex-automations/issues>`__.
107+
108+
109+
Others
110+
~~~~~~
111+
112+
You can choose another way if you like; it’s up to you. Getting it right from
113+
the start will prevent complications in the future when your translation
114+
is built. If complications do occur more information about them can be found
115+
in the FAQ section on this page.
116+
117+
118+
Glossary
119+
--------
120+
121+
Each translation team should have a way to store translations of terms to ensure
122+
consistency. This is often done with a glossary. More information about the use
123+
of glossaries can be found in the :ref:`translation-style-guide`.
124+
125+
126+
Moving the repo to the python org
127+
---------------------------------
128+
129+
This will allow you to plug your translation into docsbuild-scripts_, and it
130+
will be found at ``docs.python.org/LANG/``, but not in the switcher.
131+
132+
This will be done XXX
133+
134+
.. XXX When ...? Discussion needed...
135+
.. My idea: Time based, e.g. 2 months of activity, showing that they aren't going anywhere
136+
137+
Adding to the language switcher
138+
-------------------------------
139+
140+
.. XXX https://github.com/python/devguide/issues/1586
141+
142+
Once the following resources have been fully translated on the XXX branch:
143+
- ``bugs.po``, with proper links to the language repository issue tracker
144+
- all files in the ``tutorial/`` folder
145+
- ``library/functions.po``, the page documenting builtins
146+
The translation can be added to the language switcher. This can be done with a
147+
pull request to docsbuild-scripts_, like `this commit <https://github.com/python/docsbuild-scripts/commit/e4a8aff9772738a63d0945042777d18c3d926930>`_
148+
if your translation was previously built but not in the switcher, or like
149+
`this commit <https://github.com/python/docsbuild-scripts/commit/a601ce67c6c2f3be7fde3376d3e5d3851f19950b>`_
150+
if this is it's initial addition.
47151

48152

49153
PEP 545 summary
50154
===============
51155

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

54-
- Each translation is assigned an appropriate lowercased language tag,
55-
with an optional region subtag, and joined with a dash, like
56-
``pt-br`` or ``fr``.
158+
- Each translation is assigned an appropriate lowercase
159+
`IETF language tag <https://datatracker.ietf.org/doc/html/rfc5646.html>`_.
160+
The tag may have an optional region subtag, joined with a dash.
161+
For example, ``pt`` (Portuguese) or ``pt-br`` (Brazilian Portuguese).
57162

58-
- Each translation is under CC0 and marked as such in the README (as in
59-
the cookiecutter).
163+
- Each translation is under CC0 and is marked as such in the README.
60164

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

66-
- Translations having completed ``tutorial/``, ``library/stdtypes``
67-
and ``library/functions`` are hosted on
68-
``https://docs.python.org/{LANGUAGE_TAG}/{VERSION_TAG}/``.
168+
.. XXX this is the same as the "Moving the repo to the python org" question
169+
170+
- Translations having completed ``bugs``, ``tutorial/``
171+
and ``library/functions`` are added to the language switcher.
69172

70173

71174
Transifex
72175
=========
73176

74-
If you need help from a Transifex administrator, open an issue on the
177+
`Transifex <https://explore.transifex.com/python-doc/python-newest/>`_ is an
178+
online translations platform, similar to Weblate. It is currently used by
179+
several translations.
180+
181+
If you need assistance from a Transifex administrator, open an issue on the
75182
`tracker <https://github.com/python-docs-translations/transifex-automations/issues>`_.
76183

184+
.. seealso::
77185

78-
Coordinating FAQ
186+
`python-docs-transifex-automations: documentation <https://python-docs-transifex-automation.readthedocs.io/index.html>`_
187+
188+
Coordination FAQ
79189
================
80190

81191
Are there tools to help in managing the repo?
@@ -96,12 +206,26 @@ More related tools and projects can be found in the
96206

97207
__ https://github.com/python-docs-translations
98208

99-
How is a coordinator elected?
100-
-----------------------------
209+
210+
How should I test my translation?
211+
---------------------------------
212+
213+
The `dashboard <https://python-docs-translations.github.io/dashboard/metadata.html>`_
214+
tests translations and uploads error logs.
215+
216+
Testing should ideally be set up in your repository, and will help catch errors
217+
early and ensure translation quality. Testing generally consists of building, and
218+
linting with :pypi:`sphinx-lint`.
219+
220+
See `this documentation <https://python-docs-transifex-automation.readthedocs.io/workflows.html#test-build-workflow>`_
221+
for sample workflows with usage guides.
222+
223+
224+
How is a coordination team chosen?
225+
----------------------------------
101226

102227
Each translation team will decide on the number of coordinators.
103228
We recommend two or three coordinators, though you may begin with one.
104-
Here are some general suggestions.
105229

106230
- Coordinator requests are to be public on the `translation mailing list <translation_ml_>`_.
107231
- If the given language has a native core dev, the core dev has input
@@ -112,25 +236,28 @@ Here are some general suggestions.
112236
- We expect the local community to self-organize coordinators and contributors.
113237
If you have questions, please ask on the mailing list or Discourse.
114238
- If a coordinator becomes inactive or unreachable for a long
115-
period of time, someone else can ask to be added as a primary coordinator on the `translation mailing list <translation_ml_>`_.
116-
As a community resource, we aim to keep translations up to date with active contributors, including coordinators.
239+
period of time, someone else can ask to be added as a primary coordinator on
240+
the `translation mailing list <translation_ml_>`_.
241+
As a community resource, we aim to keep translations up to date with active
242+
contributors, including coordinators.
243+
117244

118245
I have a translation, but it's not in Git. What should I do?
119246
------------------------------------------------------------
120247

121-
You can ask for help on the `translation mailing list <translation_ml_>`_, and
122-
the team will help you create an appropriate repository. You can still use tools like transifex,
123-
if you like.
248+
You can ask for help in one of the :ref:`translation-help`, and
249+
the team will help you create an appropriate repository. You can still use tools
250+
like transifex, if you like.
124251

125252

126253
My Git hierarchy does not match yours. Can I keep it?
127254
-----------------------------------------------------
128255

129-
No, inside the ``github.com/python`` organization we’ll all have the
256+
No, inside the ``github.com/python`` organization all repositories must have the
130257
exact same hierarchy so bots will be able to build all of our
131-
translations. So you may have to convert from one hierarchy to another.
132-
Ask for help on the `translation mailing list <translation_ml_>`_ if you’re
133-
not sure on how to do it.
258+
translations. So, you may have to convert from one hierarchy to another.
259+
Ask for help in one of the :ref:`translation-help` if you’re not sure on how to
260+
do it.
134261

135262

136263
What hierarchy should I use in my GitHub repository?
@@ -141,9 +268,6 @@ files in the root of the repository using the ``gettext_compact=0``
141268
style.
142269

143270

144-
.. XXX Explain necessary folder structure
145-
146-
147271
Which version of the Python documentation should be translated?
148272
---------------------------------------------------------------
149273

@@ -154,8 +278,14 @@ propagate your translation from one branch to another using :pypi:`pomerge`.
154278
The entry for my translation is missing or not up to date
155279
---------------------------------------------------------
156280

157-
Ask on the `translation mailing list <translation_ml_>`_, or better, make a PR
158-
on the `devguide <https://github.com/python/devguide/>`__.
281+
Make a PR on the `devguide <https://github.com/python/devguide/>`__ to update it.
282+
283+
284+
How are translations built?
285+
---------------------------
286+
287+
Translations are built by `docsbuild-scripts <https://github.com/python/docsbuild-scripts/>`__
288+
and hosted on docs.python.org.
159289

160290

161291
Is there a Weblate instance we can translate on?
@@ -168,3 +298,5 @@ for updates.
168298

169299
.. _EB: https://python.github.io/editorial-board/
170300
.. _translation_ml: https://mail.python.org/mailman3/lists/translation.python.org/
301+
.. _trans_disc: https://discuss.python.org/c/documentation/translations/
302+
.. _docsbuild-scripts: https://github.com/python/docsbuild-scripts

documentation/translations/translating.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _translating:
2+
13
===========
24
Translating
35
===========
@@ -9,7 +11,7 @@ in production and can be found in the language switcher; others are works in
911
progress. To get started read your repository's contributing guide, which is
1012
generally the ``README`` file, and this page.
1113
If your language isn’t listed below, feel free to start the translation!
12-
See :doc:`coordinating` guide to get started.
14+
See :doc:`coordination <coordinating>` to get started.
1315

1416
For more details about translations and their progress, see `the dashboard
1517
<https://python-docs-translations.github.io/dashboard/>`__.
@@ -124,12 +126,13 @@ General discussions about translations occur on the Python Docs Discord
124126
mailing list <translation_ml_>`_, and the `translations category <_discourse>`_
125127
of the Python Discourse.
126128

129+
.. _translation-style-guide:
127130

128131
Style guide
129132
===========
130133

131134
Before translating, you should familiarize yourself with the general
132-
documentation :doc:`style guide<../style-guide>`. Some translation-specific
135+
documentation :doc:`style guide <../style-guide>`. Some translation-specific
133136
guidelines are explained below.
134137

135138

@@ -277,8 +280,8 @@ The coordination team for my language is inactive, what do I do?
277280
----------------------------------------------------------------
278281

279282
If you would like to coordinate, open a pull request in the
280-
`devguide <https://github.com/python/devguide>`_ adding yourself, and ping
281-
``@python/editorial-board``.
283+
`devguide <https://github.com/python/devguide>`_ adding yourself to the table
284+
at the top of this page, and ping ``@python/editorial-board``.
282285

283286

284287
.. _translation_ml: https://mail.python.org/mailman3/lists/translation.python.org/

0 commit comments

Comments
 (0)