Skip to content

Remove unnecessary trailing backslashes #135781

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rffontenelle
Copy link
Contributor

@rffontenelle rffontenelle commented Jun 21, 2025

The trailing backlash doesn't seem to be needed. Besides, they are extracted by Sphinx gettext builder as part of the translation string, which can lead to wrong translation.


📚 Documentation preview 📚: https://cpython-previews--135781.org.readthedocs.build/

Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any noticeable change in the rendered documentation, but if this affects translations then it's worthwhile. @StanFromIreland, can you confirm?

Copy link
Member

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When gettext extracts it, it escapes the \. The result looks like this:

#: ../../c-api/extension-modules.rst:245
msgid ""
"``_testsinglephase`` is an internal module used \\ in CPython's self-test "
"suite; your installation may or may not \\ include it."
msgstr ""

This will confuse translators, and they may leave it in, which will result in them appearing in the build. A prior similar pr: #135013 We should probably note this in the devguide, I will add it to my list.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review docs Documentation in the Doc dir needs backport to 3.14 bugs and security fixes skip issue skip news
Projects
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants