From 1c2e43dd823725a5f4c60d733d8d3df3dfcbf78e Mon Sep 17 00:00:00 2001 From: Aniket Singh Yadav Date: Sun, 21 Sep 2025 10:51:03 +0530 Subject: [PATCH 1/3] Allow translation of html_short_title in docs config --- Doc/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/conf.py b/Doc/conf.py index 35e0b3eaeafe94..b9e71134201c5b 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -17,6 +17,7 @@ # Python specific content from Doc/Tools/extensions/pyspecific.py from pyspecific import SOURCE_URI +from sphinx.locale import _ # General configuration # --------------------- @@ -299,7 +300,7 @@ print("It may be removed in the future\n") # Short title used e.g. for HTML tags. -html_short_title = f'{release} Documentation' +html_short_title = _(f'{release} Documentation') # Deployment preview information # (See .readthedocs.yml and https://docs.readthedocs.io/en/stable/reference/environment-variables.html) From 2e70a19b2fc64244cd6278bd33e4e085ed308497 Mon Sep 17 00:00:00 2001 From: Aniket Singh Yadav <singhyadavaniket43@gmail.com> Date: Tue, 23 Sep 2025 00:52:58 +0530 Subject: [PATCH 2/3] Mark epub_author and epub_publisher for translation --- Doc/conf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Doc/conf.py b/Doc/conf.py index b9e71134201c5b..69e8ed4ef59f9b 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -300,7 +300,7 @@ print("It may be removed in the future\n") # Short title used e.g. for <title> HTML tags. -html_short_title = _(f'{release} Documentation') +html_short_title = _('%(release)s Documentation') % {'release': release} # Deployment preview information # (See .readthedocs.yml and https://docs.readthedocs.io/en/stable/reference/environment-variables.html) @@ -447,8 +447,8 @@ # Options for Epub output # ----------------------- -epub_author = 'Python Documentation Authors' -epub_publisher = 'Python Software Foundation' +epub_author = _('Python Documentation Authors',) +epub_publisher = _('Python Software Foundation',) epub_exclude_files = ('index.xhtml', 'download.xhtml') # index pages are not valid xhtml From 16af1486a237cd33e35f93a3c016633ae8867104 Mon Sep 17 00:00:00 2001 From: Aniket Singh Yadav <singhyadavaniket43@gmail.com> Date: Tue, 23 Sep 2025 00:55:53 +0530 Subject: [PATCH 3/3] Mark epub_author and epub_publisher for translation --- Doc/conf.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/conf.py b/Doc/conf.py index 69e8ed4ef59f9b..27020fc40e263f 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -447,8 +447,8 @@ # Options for Epub output # ----------------------- -epub_author = _('Python Documentation Authors',) -epub_publisher = _('Python Software Foundation',) +epub_author = _('Python Documentation Authors') +epub_publisher = _('Python Software Foundation') epub_exclude_files = ('index.xhtml', 'download.xhtml') # index pages are not valid xhtml