[3.14] Standardize translation of Doc/bugs.rst (GH-137449) (#140275)

Standardize translation of `Doc/bugs.rst` (GH-137449)
(cherry picked from commit 869bb6948e)

Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-10-19 23:13:48 +02:00 committed by GitHub
parent 6cee144d3a
commit 13e1642845
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 25 additions and 0 deletions

View file

@ -444,6 +444,25 @@
# https://github.com/sphinx-doc/sphinx/issues/12359
epub_use_index = False
# translation tag
# ---------------
language_code = None
for arg in sys.argv:
if arg.startswith('language='):
language_code = arg.split('=', 1)[1]
if language_code:
tags.add('translation') # noqa: F821
rst_epilog += f"""\
.. _TRANSLATION_REPO: https://github.com/python/python-docs-{language_code.replace("_", "-").lower()}
""" # noqa: F821
else:
rst_epilog += """\
.. _TRANSLATION_REPO: https://github.com/python
"""
# Options for the coverage checker
# --------------------------------