From 8650c4c03e74144641487bd6f51220b04ce03e67 Mon Sep 17 00:00:00 2001 From: Stan Ulbrych Date: Wed, 6 Aug 2025 11:32:31 +0200 Subject: [PATCH] Commit --- Doc/bugs.rst | 6 ++++++ Doc/conf.py | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/Doc/bugs.rst b/Doc/bugs.rst index 5d0f68ca69675e..1d27579e53f4ef 100644 --- a/Doc/bugs.rst +++ b/Doc/bugs.rst @@ -19,6 +19,12 @@ If you find a bug in this documentation or would like to propose an improvement, please submit a bug report on the :ref:`issue tracker `. If you have a suggestion on how to fix it, include that as well. +.. only:: translation + + If the bug or suggested improvement concerns the translation of this + documentation, submit the report to the + `translation’s repository `_ instead. + You can also open a discussion item on our `Documentation Discourse forum `_. diff --git a/Doc/conf.py b/Doc/conf.py index 1c1f36e5bc0737..a1d11fc13204be 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -454,6 +454,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} +""" # noqa: F821 +else: + rst_epilog += """\ +.. _TRANSLATION_REPO: https://github.com/python +""" + # Options for the coverage checker # --------------------------------