]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-119009: Add gettext target (GH-119006) (#119075)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 15 May 2024 18:20:41 +0000 (20:20 +0200)
committerGitHub <noreply@github.com>
Wed, 15 May 2024 18:20:41 +0000 (18:20 +0000)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Doc/Makefile
Doc/conf.py

index dd068c520ad60cf6204f827e592f01e2f902818e..eca574ec290af7687e878c47120966299290c274 100644 (file)
@@ -32,6 +32,7 @@ help:
        @echo "  clean      to remove build files"
        @echo "  venv       to create a venv with necessary tools"
        @echo "  html       to make standalone HTML files"
+       @echo "  gettext    to generate POT files"
        @echo "  htmlview   to open the index page built by the html target in your browser"
        @echo "  htmllive   to rebuild and reload HTML files in your browser"
        @echo "  htmlhelp   to make HTML files and a HTML help project"
@@ -140,6 +141,11 @@ pydoc-topics: build
        @echo "Building finished; now run this:" \
              "cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py"
 
+.PHONY: gettext
+gettext: BUILDER = gettext
+gettext: SPHINXOPTS += '-d build/doctrees-gettext'
+gettext: build
+
 .PHONY: htmlview
 htmlview: html
        $(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"
index 74b6c9d4115643086114a0f69beadf96eb5a4931..e292bdd5003b9732e4e2456146c197ef139d42de 100644 (file)
@@ -358,6 +358,8 @@ htmlhelp_basename = 'python' + release.replace('.', '')
 # Split the index
 html_split_index = True
 
+# Split pot files one per reST file
+gettext_compact = False
 
 # Options for LaTeX output
 # ------------------------