-
New Feature
-
Resolution: Fixed
-
None
-
High
-
Enable HTML Markup in InstantTranslate
-
-
Emptyshow more show less
Currently tags are deleted from text that is pasted into InstantTranslate's text area, before the text is send to language resources for translation.
In the future they should stay and send (converted to xliff tags) to the language resources (in the same manner, as translate5 does it in the editor).
For performance reasons not Okapi should be used for this and to also cover syntactically incorrect HTML this should be based on Regex.
The regex must ensure, that characters like < and > do not cause problems, if they are not meant as tags. Rules for this could look like this:
- < is a tag start, if it is directly followed by [A-Z,a-z] and if before a coming > there is either no space or the characters " and = occur (therefore there are HTML attributes).
- > is a tag end, if it is preceeded by 1 or no / that is preceeded by[A-Z,a-z] and <
Regec could be: </?[A-Z,a-z]/?> - > is a tag end if it is preceeded by what was defined in the first bullet
- it must also be ensured, that an HTML comment is handled like a tag, so the complete content is returned, like it was send
Also translate5 is since a few months able to repair tag errors produced by DeepL (closing tag before starting one, missing tag of paired tag).
To support the tag syntax repair of translate5 it must be ensured, that opening tags are converted to opening g-tags for translation (or bx-tags - please check with tlauria ), closing ones to closing g-tags (or ex-tags) and stand-alone tags to x-tags.
- is blocked by
-
TRANSLATE-2862 Issue with the usage of "<" in InstantTranslate
- Done