feedback
feedback copied to clipboard
[BUG] links with special characters break after translation
Summary
I have a link in my bug-feature.md file with liquid code: [GitHub Discussions]({{site.github}}/discussions)
.
When the bug-feature.md gets translated through Gitlocalize, it changes the link to: [GitHub Discussions](%7B%7Bsite.github%7D%7D/discussions)
. This breaks my links, which is pretty annoying if I have to manually fix it everytime someone translates a page.
Steps to reproduce
Have a Markdown file with a link that uses the {
or }
chars. Translate it through Gitlocalize, make a PR and see the proposed changes.
Repository URL
https://gitlocalize.com/repo/8177
What is the current bug behavior?
Gitlocalize changes the {
and }
chars to its unicode
What is the expected correct behavior?
Gitlocalize should properly parse special characters inside links and not change them.
Relevant logs and/or screenshots
Possible fixes
(If you have any idea to solve the problem, please help us.)
@mtdvlpr Thank you for reporting this! We'll try to find the way to keep urls the same as in the original file.
@svasilenkov, I now also noticed that greater than signs (>
) are changed to >
. This occurs everywhere in the file, not just in links. Could this also be fixed?
@svasilenkov, another one I just experiences: some special markup gets changed to html tags. Italic using _text_
gets transformed to <em data-md-type="emphasis">text</em>
and the same thing happens to some code blocks and strong text.
@mtdvlpr Could you please give us links to the files illustrating the problems?
This page has the generated code, em and strong blocks: https://github.com/mtdvlpr/meeting-media-manager/blob/gitlocalize-bugs/locales/pt/_posts/2022-08-17-configuration.md
This page has the >
characters converted to >
:
https://github.com/mtdvlpr/meeting-media-manager/blob/gitlocalize-bugs/locales/nl/_posts/2022-08-17-present-media.md`
@svasilenkov, the problems mentioned above are not ideal, but also not breaking. The pages are correctly rendered. The original problem ({
and }
converted into %7B
and %7D
) is a problem, because it breaks the links that are supposed to be generated based on variables. An example of that problem is the following file:
https://github.com/mtdvlpr/meeting-media-manager/blob/gitlocalize-bugs/locales/nl/_posts/2022-08-17-bug-feature.md
@mtdvlpr Thank you so much for the examples. I've added the issue in our todo list.