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

Availability extension's text translation breaks directive rendering #126609

Closed
rffontenelle opened this issue Nov 9, 2024 · 6 comments
Closed
Labels
docs Documentation in the Doc dir

Comments

@rffontenelle
Copy link
Contributor

rffontenelle commented Nov 9, 2024

Documentation

The availability extension shows "Availability" text in the built docs. In the translation context, "Availability" is available for translation, but translating that text causes hundreds of warnings like this:

Warning: /path/to/cpython/Doc/library/os.rst:181: WARNING: inconsistent term references in translated message. original: ['Availability'], translated: [] [i18n.inconsistent_references]

The translated page will show the translation text ("Disponibilidade", in Portuguese) without the important text: the platforms where it is available. (That's unwanted!)

Some checking around:

Linked PRs

@rffontenelle rffontenelle added the docs Documentation in the Doc dir label Nov 9, 2024
@AA-Turner
Copy link
Member

There's been a few other issues about this extension -- is this related to those at all?

A

@rffontenelle
Copy link
Contributor Author

rffontenelle commented Nov 9, 2024

After reviewing issues and PRs open and closed, it doesn't look like they are related.

For the record, this issues started after extracting availability into a new extension. I git-checkout'ed it and built the docs to test it.

@m-aciek
Copy link
Contributor

m-aciek commented Jan 30, 2025

PL translation got impacted yesterday by this issue. Confirming that translating "Availability" (exposed to translation by the directive) to "Dostępność" (Polish translation) breaks rendering of the directive (as shown on screenshots).

@rffontenelle I suggest renaming the ticket to „Availability extension's text translation breaks directive rendering” or similar.

Broken rendering:
Image

Non-intl rendering:
Image

@rffontenelle rffontenelle changed the title Availability extension's text translation causes warning Availability extension's text translation breaks directive rendering Jan 30, 2025
@StanFromIreland
Copy link
Contributor

I have opened a PR that reverts the move.

@m-aciek
Copy link
Contributor

m-aciek commented Feb 1, 2025

For what it's worth translation Dostępność <availability> doesn't generate a correct reference.

Image

@AA-Turner
Copy link
Member

It seems that I missed the sphinx_gettext call here to allow translation. I've attempted to test #129549 locally and it seems to work, but please could someone here test it with an actual translation?

A

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 2, 2025
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Feb 2, 2025
AA-Turner added a commit that referenced this issue Feb 2, 2025
…H-129549) (#129585)

gh-126609: Allow translating the ``availability`` directive (GH-129549)
(cherry picked from commit 0612a89)

Co-authored-by: Adam Turner <[email protected]>
AA-Turner added a commit that referenced this issue Feb 3, 2025
…H-129549) (#129584)

gh-126609: Allow translating the ``availability`` directive (GH-129549)
(cherry picked from commit 0612a89)

Co-authored-by: Adam Turner <[email protected]>
srinivasreddy pushed a commit to srinivasreddy/cpython that referenced this issue Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir
Projects
Status: Todo
Development

No branches or pull requests

4 participants