Details
-
Task
-
Resolution: Fixed
-
None
-
None
-
None
-
Empty show more show less
Description
According to the xliff spec, the attribute "xml:space" defines how to deal with whitespace inside of tags. There are two values: "default" → this means the application (translate5) can do with the whitespace what ever we want and "preserve" where the white space should be preserved. If the attribute is missing "default" is the default.
Regarding different real live XLF files I got to the following conclusion:
- Okapi XLF makes use of the flag
- OpenTM2 XLF: does not make use of the flag as far as I can see
- Our customers XML files containing XLF: No xml:space attribute is given, but analyzing the content led me to the assumption that it would be better to ignore the whitespace:
<trans-unit id="1344-19-1"> <source> <g [style info...]>Text refering to the following chinese name</g> <g [different style info...]>[CHINESE NAME]</g> <g [style info...]>.</g> </source> </trans-unit>
Looking at this content, it would be correct in my opinion to ignore the whitespace in the translate5 import since it is only to format the XML here and has absolutely no semantic for the users content. Indeed the whitespace produces eight additional tags plus the six needed tags.
For XLF import the xml:space should be respected. "preserve" is the current default, and should stay for CSV and SDLXLIFF import.
A new boolean Zf_configuration config "preserve all whitespace" is created.
If it is set to yes, all whitespace is preserved by using internal tags (current behaviour).
If it is set to no: All whitespace is ignored, expect a xml:space=preserve attribute was given in the current node or its parent node.
Attachments
Issue Links
- relates to
-
TRANSLATE-925 support xliff 1.2 as import format
- Done