@@ -209,7 +209,7 @@ Some general guidelines for deciding on a translation:
209
209
Dialects
210
210
--------
211
211
212
- Some translation receive contributions from people of several different dialects,
212
+ Some translations receive contributions from people of several different dialects,
213
213
understandably the language will differ. It is recommended however that
214
214
translators try to keep files and sections consistent.
215
215
@@ -234,14 +234,16 @@ is provided below:
234
234
print (kw, " :" , keywords[kw])
235
235
236
236
237
+ .. _transifex-use :
238
+
237
239
Transifex
238
240
=========
239
241
240
242
.. important ::
241
243
242
244
There are many translations in the `python-doc organization on Transifex <tx _>`_,
243
245
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.
245
247
246
248
Several language projects use Transifex as their translation interface.
247
249
Translations on Transifex are carried out via a web interface, similar to Weblate.
@@ -258,6 +260,9 @@ through the following resources from the Transifex documentation:
258
260
- `Starting with the basics <https://help.transifex.com/en/collections/3441044-starting-with-the-basics >`__:
259
261
A group of documents with basic information.
260
262
263
+ Within the organization, a project for translating the
264
+ :github: `Python Docs Sphinx Theme <python/python-docs-theme> ` can also be
265
+ found.
261
266
For further information about Transifex see our `documentation <https://python-docs-transifex-automation.readthedocs.io/ >`_.
262
267
263
268
@@ -287,6 +292,45 @@ be the latest non-alpha branch), the translations should then be propagated by
287
292
your languages coordination team.
288
293
289
294
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
+
290
334
The coordination team for my language is inactive, what do I do?
291
335
----------------------------------------------------------------
292
336
0 commit comments