Skip to content

Gettext builder not extracting content of doctest blocks #12871

@m-aciek

Description

@m-aciek

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

  1. Add doctest-block to gettext_additional_targets in conf.py
    (gh-123407: Allow translation of doctest blocks content python/cpython#123852).

  2. Run % make gettext.

  3. -> 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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions