From 5254761e401cf4f55a1cd3e460186427950342b7 Mon Sep 17 00:00:00 2001 From: Rafael Fontenelle Date: Mon, 13 May 2024 14:15:23 -0300 Subject: [PATCH 1/3] docs: Add gettext target --- Doc/Makefile | 4 ++++ Doc/conf.py | 2 ++ 2 files changed, 6 insertions(+) diff --git a/Doc/Makefile b/Doc/Makefile index dd068c520ad60c..dce7f7ab8ac363 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -140,6 +140,10 @@ 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: 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 0e86de837d35d2..47fb96fe1de482 100644 --- a/Doc/conf.py +++ b/Doc/conf.py @@ -374,6 +374,8 @@ # Split the index html_split_index = True +# Split pot files one per reST file +gettext_compact = False # Options for LaTeX output # ------------------------ From db0ec4703d5b10efc0b852005875bafe7cb80be5 Mon Sep 17 00:00:00 2001 From: Rafael Fontenelle Date: Tue, 14 May 2024 11:50:53 -0300 Subject: [PATCH 2/3] docs: Add gettext target to make help --- Doc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/Makefile b/Doc/Makefile index dce7f7ab8ac363..56fbe994e4fe8d 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" From ecdbbf72cf8d8c826e76694c59e33803847b58dc Mon Sep 17 00:00:00 2001 From: Rafael Fontenelle Date: Tue, 14 May 2024 11:56:51 -0300 Subject: [PATCH 3/3] docs: Use specific doctrees directory for gettext --- Doc/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Doc/Makefile b/Doc/Makefile index 56fbe994e4fe8d..eca574ec290af7 100644 --- a/Doc/Makefile +++ b/Doc/Makefile @@ -143,6 +143,7 @@ pydoc-topics: build .PHONY: gettext gettext: BUILDER = gettext +gettext: SPHINXOPTS += '-d build/doctrees-gettext' gettext: build .PHONY: htmlview