Problem/Motivation

Translation tools are adding some markup for segments. Tools like Trados for example.

<target><mrk mtype="seg" mid="1">Text.</mrk></target>

With "XLIFF processing" is off, SimpleXML returns the target's direct text nodes, so the translated text inside is lost and we just get some whitespaces that were around the tag.

SImilar issue was already reported on the D7 version of the module #2280753: Remove XLIFF mrk tags from SDL Trados

Steps to reproduce

1. File translator, XLIFF format, "XLIFF processing" unchecked.
2. Export a job, wrap a target's text in …, import the file.
3. The item's translation is empty (whitespace only).

Proposed resolution

Read the target's full text content, trimmed when the target has child elements to avoid some indentation problem in the result translation.

Remaining tasks

User interface changes

API changes

Data model changes

Comments

phjou created an issue. See original summary.

phjou’s picture

Just adding the patch

phjou’s picture

Issue summary: View changes
phjou’s picture

phjou’s picture

Status: Active » Needs review