8000 [3.13] gh-119009: Add gettext target (GH-119006) (#119074) · python/cpython@7c224dd · GitHub
[go: up one dir, main page]

Skip to content

Commit 7c224dd

Browse files
[3.13] gh-119009: Add gettext target (GH-119006) (#119074)
Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
1 parent 4f81915 commit 7c224dd

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
@@ -374,6 +374,8 @@
374374
# Split the index
375375
html_split_index = True
376376

377+
# Split pot files one per reST file
378+
gettext_compact = False
377379

378380
# Options for LaTeX output
379381
# ------------------------

0 commit comments

Comments
 (0)
0