From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Wed, 15 May 2024 18:31:55 +0000 (+0200) Subject: [3.13] gh-119009: Add gettext target (GH-119006) (#119074) X-Git-Tag: v3.13.0b2~209 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7c224dd4cca2c646c3d0883873be2d06ab0177f3;p=thirdparty%2FPython%2Fcpython.git [3.13] gh-119009: Add gettext target (GH-119006) (#119074) Co-authored-by: Rafael Fontenelle --- diff --git a/Doc/Makefile b/Doc/Makefile index dd068c520ad6..eca574ec290a 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -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'))" diff --git a/Doc/conf.py b/Doc/conf.py index 0e86de837d35..47fb96fe1de4 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -374,6 +374,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 # ------------------------