Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translated parsed-literals are incorrectly rendered #12287

Open
n-peugnet opened this issue Apr 15, 2024 · 5 comments · May be fixed by #12238
Open

Translated parsed-literals are incorrectly rendered #12287

n-peugnet opened this issue Apr 15, 2024 · 5 comments · May be fixed by #12238

Comments

@n-peugnet
Copy link
Contributor

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

n-peugnet added a commit to n-peugnet/sphinx that referenced this issue Apr 15, 2024
@n-peugnet
Copy link
Contributor Author

Ah, I only notice #12278 now, as I was already working on this while it was posted.

@hwhsu1231
Copy link

Hello, @n-peugnet

I think this issue and my issue #12278 are duplicates.

So it is indeed a bug from Sphinx itself, right?

@picnixz
Copy link
Member

picnixz commented Apr 19, 2024

Yes. Which one should I close then?

@n-peugnet
Copy link
Contributor Author

@picnixz I have linked some issues and PR to this one so I would like to keep it open if possible.

@hwhsu1231
Copy link

Yes. Which one should I close then?

I closed mine.

n-peugnet added a commit to n-peugnet/sphinx that referenced this issue Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants