-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
Remove newline in Doc/c-api/lifecycle.rst
for gettext
builder
#135013
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think 83 characters can be accepted, and it will look more concise.
Have you tried using a backslash continuation |
Doc/c-api/lifecycle.rst
for gettext
builder
Doc/c-api/lifecycle.rst
for gettext
builderDoc/c-api/lifecycle.rst
for gettext
builder
@picnixz It does not work, as shown below, it will escape the #: ../../c-api/lifecycle.rst:55
msgid "Diagram showing events in an object's life. Explained in detail \\\n"
"below."
msgstr "" |
Interesting. I may consider this to be a bug in docutils or in Sphinx. I think I actually had a local patch for sphinx when options were incorrectly processed if they were not on the same line, even with a backslash, which is why I assumed it worked. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Thanks @rffontenelle for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14. |
Thanks @rffontenelle for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13. |
…GH-135013) (cherry picked from commit c7051a3) Co-authored-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Sorry, @rffontenelle and @serhiy-storchaka, I could not cleanly backport this to
|
GH-135038 is a backport of this pull request to the 3.14 branch. |
This newline is causing Sphinx's gettext builder to extract the message including the
\n
character instead of keeping all in a single string.For instance, see how that string looks in the translation file for Brazilian Portuguese:
📚 Documentation preview 📚: https://cpython-previews--135013.org.readthedocs.build/