Skip to content

bpo-43570: Doc: Fix i18n issue with audit hooks. #24945

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

Closed
wants to merge 1 commit into from

Conversation

JulienPalard
Copy link
Member

@JulienPalard JulienPalard commented Mar 20, 2021

@humitos
Copy link
Contributor

humitos commented Mar 20, 2021

I wanted to confirm here that this patch makes the Spanish translation to work as well. I didn't dig too much on the HTML generated yet, but at least Sphinx finishes with no warning at all with this patch.

We found the same problem in our translation and we are tracking it at python/python-docs-es#1221

@JulienPalard JulienPalard requested a review from zooba March 21, 2021 09:30
@JulienPalard
Copy link
Member Author

I tried running sphinx -b gettext with this patch and it correctly removes unused strings:

-#: library/sys.rst:1246
-msgid ""
-"Raises an :ref:`auditing event <auditing>` ``sys.setprofile`` with no "
-"arguments."
-msgstr ""
-"Lève un :ref:`évènement d'audit <auditing>` ``sys.setprofile`` sans "
-"arguments."
-
 #: library/sys.rst:1329
 msgid "The events have the following meaning:"
 msgstr "Les événements ont la signification suivante :"
@@ -2659,13 +2657,6 @@ msgstr ""
 "Pour plus d'informations sur les objets code et objets représentant une "
 "*frame* de la pile, consultez :ref:`types`."

-#: library/sys.rst:1380
-msgid ""
-"Raises an :ref:`auditing event <auditing>` ``sys.settrace`` with no "
-"arguments."
-msgstr ""
-"Lève un :ref:`évènement d'audit <auditing>` ``sys.settrace`` sans arguments."
-

Copy link
Member

@zooba zooba left a comment

Choose a reason for hiding this comment

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

I'm not sure exactly what's wrong, but the non-customised text paragraphs are empty.

image

I'm looking at the HTML files attached to the docs check on this PR.

@bedevere-bot
Copy link

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@JulienPalard
Copy link
Member Author

I have made the requested changes; please review again.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@zooba: please review the changes made to this pull request.

@bedevere-bot bedevere-bot requested a review from zooba April 13, 2021 15:50
@JulienPalard
Copy link
Member Author

@humitos would you please check if this new patch works for the spanish translation?

@JulienPalard
Copy link
Member Author

I diff -red before and after this patch and the HTML does not change.

And wow, I feel good, I understand my own patch (it was NOT the case for the previous one):

As we translate restructuredtext, the rawsource (1rst parameter of paragraph) is important for translators. Before the patch, it was always set to the pyspecific text, even if overloaded a few line later with the rst content, so we translators were only seeing the pyspecific text.

@JulienPalard
Copy link
Member Author

Gentle ping @zooba.

@github-actions
Copy link

github-actions bot commented Jun 3, 2021

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jun 3, 2021
@JulienPalard
Copy link
Member Author

I'm closing this as I want to see how #19470 will change all of this, before. I'll reopen if needed.

@JulienPalard JulienPalard deleted the mdk/audithooks branch October 9, 2021 07:32
@JulienPalard JulienPalard restored the mdk/audithooks branch October 9, 2021 07:32
@JulienPalard JulienPalard deleted the mdk/audithooks branch October 9, 2021 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting change review skip issue skip news stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants