Skip to content

Translated parsed-literals are incorrectly rendered #12287

@n-peugnet

Description

@n-peugnet

Describe the bug

When adding 'literal-block' to gettext_additional_targets option, parsed-literals are allowed to be translated.

However, when they are translated, they are incorrectly rendered.

I noticed this while working on #12277, and I intend to fix it as part of #12238.

How to Reproduce

Here is a failing test for this bug (it is based on #12277): n-peugnet/sphinx@add-intl-tests...n-peugnet:sphinx:parsed-literal-i18n

Environment Information

Platform:              linux; (Linux-6.6.15-amd64-x86_64-with-glibc2.37)
Python version:        3.11.8 (main, Feb  7 2024, 21:52:08) [GCC 13.2.0])
Python implementation: CPython
Sphinx version:        7.3.0+/e352a675d
Docutils version:      0.19
Jinja2 version:        3.1.2
Pygments version:      2.17.2

Sphinx extensions

No response

Additional context

Current result:
2024-04-15-231801_680x141_scrot

Expected result:
2024-04-15-231825_677x131_scrot

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions