Skip to content

Commit ed395f5

Browse files
[3.12] gh-119009: Add gettext target (GH-119006) (#119075)
Co-authored-by: Rafael Fontenelle <[email protected]>
1 parent 6d0850c commit ed395f5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Doc/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ help:
3232
@echo " clean to remove build files"
3333
@echo " venv to create a venv with necessary tools"
3434
@echo " html to make standalone HTML files"
35+
@echo " gettext to generate POT files"
3536
@echo " htmlview to open the index page built by the html target in your browser"
3637
@echo " htmllive to rebuild and reload HTML files in your browser"
3738
@echo " htmlhelp to make HTML files and a HTML help project"
@@ -140,6 +141,11 @@ pydoc-topics: build
140141
@echo "Building finished; now run this:" \
141142
"cp build/pydoc-topics/topics.py ../Lib/pydoc_data/topics.py"
142143

144+
.PHONY: gettext
145+
gettext: BUILDER = gettext
146+
gettext: SPHINXOPTS += '-d build/doctrees-gettext'
147+
gettext: build
148+
143149
.PHONY: htmlview
144150
htmlview: html
145151
$(PYTHON) -c "import os, webbrowser; webbrowser.open('file://' + os.path.realpath('build/html/index.html'))"

Doc/conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@
358358
# Split the index
359359
html_split_index = True
360360

361+
# Split pot files one per reST file
362+
gettext_compact = False
361363

362364
# Options for LaTeX output
363365
# ------------------------

0 commit comments

Comments
 (0)