sphinx-doc / sphinx-doc/sphinx
Gettext builder not extracting content of doctest blocks
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8k
- Forks
- 2.6k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
Hi, running a gettext builder on a documents with doctest-block in gettext_additional_targets doesn't add the content of doctest blocks in generated POTs.
How to Reproduce
-
Add
doctest-blocktogettext_additional_targetsinconf.py
(https://github.com/python/cpython/pull/123852). -
Run
% make gettext. -
-> lack of expected doctest blocks in POTs, example one: https://github.com/python/cpython/blob/be90648fb2de58b148dcc7553a08ca646911baf2/Doc/tutorial/introduction.rst?plain=1#L150-L155
Environment Information
Sphinx version: v7.3.7
Additional context
From a quick look I'm not able to figure out the cause in the Sphinx codebase.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by adding doctest-block to gettext_additional_targets in conf.py and running make gettext. Trace the gettext builder's handling of that target and compare the generated POT with the doctest content in Doc/tutorial/introduction.rst; done means doctest blocks are included and a regression test covers the behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100