gh-119009: Add gettext target (#119006)

This commit is contained in:
Rafael Fontenelle 2024-05-15 15:13:52 -03:00 committed by GitHub
parent 5b88d95cc5
commit fb0cf7d140
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View 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'))"

View File

@ -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
# ------------------------