@@ -209,7 +209,7 @@ Some general guidelines for deciding on a translation:
209209Dialects
210210--------
211211
212- Some translation receive contributions from people of several different dialects,
212+ Some translations receive contributions from people of several different dialects,
213213understandably the language will differ. It is recommended however that
214214translators try to keep files and sections consistent.
215215
@@ -234,14 +234,16 @@ is provided below:
234234 print (kw, " :" , keywords[kw])
235235
236236
237+ .. _transifex-use :
238+
237239Transifex
238240=========
239241
240242.. important ::
241243
242244 There are many translations in the `python-doc organization on Transifex <tx _>`_,
243245 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.
246+ Confirm that a coordination team exists before you begin translating.
245247
246248Several language projects use Transifex as their translation interface.
247249Translations on Transifex are carried out via a web interface, similar to Weblate.
@@ -258,6 +260,9 @@ through the following resources from the Transifex documentation:
258260- `Starting with the basics <https://help.transifex.com/en/collections/3441044-starting-with-the-basics >`__:
259261 A group of documents with basic information.
260262
263+ Within the organization, a project for translating the
264+ :github: `Python Docs Sphinx Theme <python/python-docs-theme> ` can also be
265+ found.
261266For further information about Transifex see our `documentation <https://python-docs-transifex-automation.readthedocs.io/ >`_.
262267
263268
@@ -287,6 +292,45 @@ be the latest non-alpha branch), the translations should then be propagated by
287292your languages coordination team.
288293
289294
295+ .. _python-docs-theme-i18n :
296+
297+ How do I translate the Python Docs Sphinx Theme?
298+ ------------------------------------------------
299+
300+ The Sphinx theme for the Python documentation supports localization.
301+
302+ You can translate either on
303+ `Transifex <https://explore.transifex.com/python-doc/python-docs-theme/ >`_
304+ (see :ref: `translating on Transifex <transifex-use >` for more information)
305+ or locally by following the steps outlined below.
306+
307+ To translate locally, clone the :github: `Python Docs Sphinx Theme repository <python/python-docs-theme> ` and run the following
308+ commands to generate the PO files. Replace ``LANG `` with the same language code
309+ that is used for the docs translation:
310+
311+ .. code-block :: bash
312+
313+ python babel_runner.py extract
314+ python babel_runner.py init -l LANG
315+
316+ The file can then be found at:
317+
318+ .. code-block :: text
319+
320+ python-docs-theme/locale/LANG/LC_MESSAGES/python-docs-theme.po
321+
322+ After translating, submit your PO file via a pull request to the
323+ :github: `repository <python/python-docs-theme> `.
324+ See our :ref: `git-boot-camp ` for more information about using Git.
325+
326+ To update an existing translation after source changes, run:
327+
328+ .. code-block :: bash
329+
330+ python babel_runner.py update # To update source for all languages
331+ python babel_runner.py update -l LANG # To update source just for LANG
332+
333+
290334 The coordination team for my language is inactive, what do I do?
291335----------------------------------------------------------------
292336
0 commit comments