Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

Link are not working with internationalization in Sphinx #163

Closed
kisvegabor opened this issue Jul 12, 2019 · 2 comments
Closed

Link are not working with internationalization in Sphinx #163

kisvegabor opened this issue Jul 12, 2019 · 2 comments

Comments

@kisvegabor
Copy link

Hi,

I'm making some experiments with Sphinx, gettext, and recommonmark.

I've noticed that in the outout pot files the link markups from rst files are present but they disappear from the md files. When I translate a text with a link there won't be links in the output file. However, I'm not sure if it's a recommonmark or Sphinx issue.

Example md file:

To see how you can port LittlevGL to your device go to the [Porting](/porting/index) section.

pot file

msgid "To see how you can port LittlevGL to your device go to the Porting section."
msgstr ""

po file

msgid ""
"To see how you can port LittlevGL to your device go to the Porting "
"section."
msgstr "Some translation... Porting section."

I'd expect to the pot file to look like this:

msgid "To see how you can port LittlevGL to your device go to the  [Porting](/porting/index) section."
msgstr ""

And the po file

msgid ""
"To see how you can port LittlevGL to your device go to the [Porting](/porting/index)  "
"section."
msgstr "Some translation... [Porting](/porting/index) section."

Is there any workaround for this? Or is it a known issue?

@astrojuanlu
Copy link
Contributor

This is unlikely to get fixed in recommonmark: #221

I copy here @JulianGro comments on MyST-Parser from vircadia/vircadia-docs-sphinx#136:

While it does fix links being parsed incorrectly for translation, the new strings will still contain the wrong translation and only be marked as "fuzzy" indicating that the translation needs to be updated.

I'm collecting i18n issues related to Markdown on Sphinx, because it seems a common pain point.

@jpmckinney
Copy link

I had fixed this in unmerged #187

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants