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

Markdown links are wrongly automatically translated #9102

Closed
JulianGro opened this issue Apr 16, 2021 · 3 comments
Closed

Markdown links are wrongly automatically translated #9102

JulianGro opened this issue Apr 16, 2021 · 3 comments

Comments

@JulianGro
Copy link

JulianGro commented Apr 16, 2021

Describe the bug
Sphinx will automatically translate markdown links wrongly.

To Reproduce
Steps to reproduce the behavior:

$ git clone https://github.com/vircadia/vircadia-docs-sphinx.git
$ cd vircadia-docs-sphinx
$ pip install git+https://github.com/vircadia/video.git
$ pip install Sphinx
$ pip install --upgrade recommonmark
$ pip install sphinx_rtd_theme
$ cd docs
$ make html SPHINXOPTS="-D language=de"

You will get multiple warnings like:

WARNING: inconsistent term references in translated message. original: [''], translated: []

If you look at a page that threw the warning, you can see that the link got broken. Example: bottom of https://docs.vircadia.dev/de/create/entities/avatar-interactions.html#create-avatar-entities

Expected behavior
The links should either be translated properly, or not at all.

Your project
https://github.com/vircadia/vircadia-docs-sphinx

Screenshots
Original:
1Auswahl_874

Translated:
1Auswahl_873

Environment info

  • OS: Linux Mint 19.3 and Ubuntu 18.04
  • Python version: 3.7.10 and 3.6.9
  • Sphinx version: 2.4.4, 3.5.3 and 3.5.4
  • Sphinx extensions: recommonmark and a version of sphinxcontrib.video which is newer than upstream

Additional context
This does not only happen to German but also at least French and Spanish as well.
You may take a look at our GitHub Actions check as well: https://github.com/vircadia/vircadia-docs-sphinx/runs/2356846363#step:6:194

@tk0miya
Copy link
Member

tk0miya commented Apr 17, 2021

I think this is a bug of recommonmark. It seems it does not output the hyperlink mark-up into the message catalog. This should be [Interact with Your Environment](../../explore/interact) instead of Interact with Your Environment.
https://github.com/vircadia/vircadia-docs-sphinx/blob/master/docs/source/locales/de/LC_MESSAGES/create.po#L4358-L4359

@JulianGro
Copy link
Author

Oh nice. I didn't notice that in the PO files. So it is sphinx-intl update that does this, but like you said it is probably a bug in recommonmark since it only happens on markdown files.

Thank you very much.

@JulianGro
Copy link
Author

Apparently this is a known issue: readthedocs/recommonmark#163

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants