Skip to content

Commit 8650c4c

Browse files
Commit
1 parent 1f2026b commit 8650c4c

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

Doc/bugs.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ If you find a bug in this documentation or would like to propose an improvement,
1919
please submit a bug report on the :ref:`issue tracker <using-the-tracker>`. If you
2020
have a suggestion on how to fix it, include that as well.
2121

22+
.. only:: translation
23+
24+
If the bug or suggested improvement concerns the translation of this
25+
documentation, submit the report to the
26+
`translation’s repository <TRANSLATION_REPO_>`_ instead.
27+
2228
You can also open a discussion item on our
2329
`Documentation Discourse forum <https://discuss.python.org/c/documentation/26>`_.
2430

Doc/conf.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,25 @@
454454
# https://github.com/sphinx-doc/sphinx/issues/12359
455455
epub_use_index = False
456456

457+
# translation tag
458+
# ---------------
459+
460+
language_code = None
461+
for arg in sys.argv:
462+
if arg.startswith('language='):
463+
language_code = arg.split('=', 1)[1]
464+
465+
if language_code:
466+
tags.add('translation') # noqa: F821
467+
468+
rst_epilog += f"""\
469+
.. _TRANSLATION_REPO: https://github.com/python/python-docs-{language_code}
470+
""" # noqa: F821
471+
else:
472+
rst_epilog += """\
473+
.. _TRANSLATION_REPO: https://github.com/python
474+
"""
475+
457476
# Options for the coverage checker
458477
# --------------------------------
459478

0 commit comments

Comments
 (0)