@@ -125,9 +125,8 @@ If there is already a repository for your language team (there may be links to
125125Telegrams/Discords in the ``README ``), join and introduce
126126yourself. Your fellow translators will be more than happy to help!
127127General discussions about translations occur on the Python Docs Discord
128- `#translations channel <https://discord.gg/h3qDwgyzga >`_, `translation
129- mailing list <translation_ml_> `_, and the `translations category <discourse _>`_
130- of the Python Discourse.
128+ `#translations channel <https://discord.gg/h3qDwgyzga >`_ and the
129+ `translations category <discourse _>`_ of the Python Discourse.
131130
132131.. _translation-style-guide :
133132
@@ -209,7 +208,7 @@ Some general guidelines for deciding on a translation:
209208Dialects
210209--------
211210
212- Some translation receive contributions from people of several different dialects,
211+ Some translations receive contributions from people of several different dialects,
213212understandably the language will differ. It is recommended however that
214213translators try to keep files and sections consistent.
215214
@@ -234,14 +233,16 @@ is provided below:
234233 print (kw, " :" , keywords[kw])
235234
236235
236+ .. _transifex-use :
237+
237238Transifex
238239=========
239240
240241.. important ::
241242
242243 There are many translations in the `python-doc organization on Transifex <tx _>`_,
243244 some of which, however, are not used or do not have a coordination team.
244- Confirm this is not the case before you begin translating.
245+ Confirm that a coordination team exists before you begin translating.
245246
246247Several language projects use Transifex as their translation interface.
247248Translations on Transifex are carried out via a web interface, similar to Weblate.
@@ -258,6 +259,9 @@ through the following resources from the Transifex documentation:
258259- `Starting with the basics <https://help.transifex.com/en/collections/3441044-starting-with-the-basics >`__:
259260 A group of documents with basic information.
260261
262+ Within the organization, a project for translating the
263+ :github: `Python Docs Sphinx Theme <python/python-docs-theme> ` can also be
264+ found.
261265For further information about Transifex see our `documentation <https://python-docs-transifex-automation.readthedocs.io/ >`_.
262266
263267
@@ -287,6 +291,45 @@ be the latest non-alpha branch), the translations should then be propagated by
287291your languages coordination team.
288292
289293
294+ .. _python-docs-theme-i18n :
295+
296+ How do I translate the Python Docs Sphinx Theme?
297+ ------------------------------------------------
298+
299+ The Sphinx theme for the Python documentation supports localization.
300+
301+ You can translate either on
302+ `Transifex <https://explore.transifex.com/python-doc/python-docs-theme/ >`_
303+ (see :ref: `translating on Transifex <transifex-use >` for more information)
304+ or locally by following the steps outlined below.
305+
306+ To translate locally, clone the :github: `Python Docs Sphinx Theme repository <python/python-docs-theme> ` and run the following
307+ commands to generate the PO files. Replace ``LANG `` with the same language code
308+ that is used for the docs translation:
309+
310+ .. code-block :: bash
311+
312+ python babel_runner.py extract
313+ python babel_runner.py init -l LANG
314+
315+ The file can then be found at:
316+
317+ .. code-block :: text
318+
319+ python-docs-theme/locale/LANG/LC_MESSAGES/python-docs-theme.po
320+
321+ After translating, submit your PO file via a pull request to the
322+ :github: `repository <python/python-docs-theme> `.
323+ See our :ref: `git-boot-camp ` for more information about using Git.
324+
325+ To update an existing translation after source changes, run:
326+
327+ .. code-block :: bash
328+
329+ python babel_runner.py update # To update source for all languages
330+ python babel_runner.py update -l LANG # To update source just for LANG
331+
332+
290333 The coordination team for my language is inactive, what do I do?
291334----------------------------------------------------------------
292335
@@ -295,6 +338,5 @@ If you would like to coordinate, open a pull request in the
295338at the top of this page, and ping ``@python/editorial-board ``.
296339
297340
298- .. _translation_ml : https://mail.python.org/mailman3/lists/translation.python.org/
299341.. _discourse : https://discuss.python.org/c/documentation/translations/
300342.. _tx : https://explore.transifex.com/python-doc/python-newest/
0 commit comments