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

Sphinx breaks things by trying to translate them automatically #128

Closed
JulianGro opened this issue Mar 29, 2021 · 1 comment · Fixed by #136
Closed

Sphinx breaks things by trying to translate them automatically #128

JulianGro opened this issue Mar 29, 2021 · 1 comment · Fixed by #136
Assignees
Labels
bug Something isn't working

Comments

@JulianGro
Copy link
Contributor

JulianGro commented Mar 29, 2021

Sphinx will try to translate strings on its own if it thinks it has sufficient information to do so.
Currently this can break some things in translated docs.
As an example, Sphinx knows how to translate Interact with Your Environment to German. Now it sees

:doc:`Interact with Your Environment <../../explore/interact>`

and thinks "That is close enough to Interact with Your Environment. I will just put the translation in automatically since we have no better translation." and replaces the whole string instead of strictly just the Interact with Your Environment with a translation, essentially removing the link and just putting plain text there.
Here is how the result of that looks:
1Auswahl_861

EDIT: Originally I thought Weblate did this, but after a little more investigation, it turns out that Sphinx or a component of it does this. The issue happens on the newest stable version of Sphinx (3.5.3) as well.

@JulianGro JulianGro added the bug Something isn't working label Mar 29, 2021
@JulianGro JulianGro changed the title Weblate breaks things by trying to translate them automatically Sphinx breaks things by trying to translate them automatically Mar 29, 2021
@JulianGro
Copy link
Contributor Author

Apparently this is a bug in recommonmark: readthedocs/recommonmark#163
There is a PR with a fix open, but apparently recommonmark is badly supported and is likely going to be deprecated in favor of MyST-Parser.
MyST-Parser is might work as a drop-in replacement which I will have to test at some point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant