feedback
feedback copied to clipboard
Escaped Markdown Changed
Summary
Escaped text loses its escape character when imported in to gitlocalize. We use formatting such as \<This\> for custom formatting of buttons in our software.
Steps to reproduce
- Create a markdown file with some content escaped. For example \(This\), \<This\>, \[This\] or \{This\}.
- Import the project into git localize
- Notice that the backlashes are missing in both the source and destination files as shown in the git localize UI
- Attempt to translate the string anyway and submit a PR
- The escape character is missing.
Repository URL
https://github.com/AvolitesLtd/TitanManual
What is the current bug behavior?
The escape characters are removed
What is the expected correct behavior?
The string with the escaped characters shown
Relevant logs and/or screenshots
To help you find buttons and controls:
- \<This\> indicates a physical buttons on the console *(or \<Avo\> for red keys)*
- \[This\] indicates a softkey menu option on the touchscreen
- \{This\} indicates an option in a context menu or a general touch button on the screen
https://manual.avolites.com/docs/en/introduction/
https://github.com/AvolitesLtd/TitanManual/blob/master/docs/introduction.md (View the raw file, not the github formatted one)
Possible fixes
Don't pre format the markdown in the git localize interface. Show the raw markdown instead and allow the translator to ensure the markdown is formatted correctly.
Thanks for reporting this @Farrser
It looks like the problem here is that we're basically using the same markdown parser as Github does. While Github 'removes' the backslash to correctly display the escaped character when rendering the page (which is normal), we are removing the backslash in the same manner, which leads to unescaped characters in the target file.
We have added this to our roadmap.
While we're working on this, is there any way you can apply html-style escaping e.g. using <
instead of \<
?
Thanks!