Under Community Review

Avoid inline text variable tags from being excluded from segments by fine-tuning segmentation processing in Studio

The segmentation processing in SDL Trados Studio 2017 needs a little bit of fine-tuning:

Inline tags representing a text variable that translators need to be able to move around in a segment due to differing word-order rules across languages should not be excluded from a segment.

In certain instances, when these inline tags occur as first or last element in a paragraph or sentence, they get excluded.

This will happen by default, if the stand-alone placeholder tag is enclosed by an inline formatting tag pair.
<span class="main"><variabletext id="1"/></span>
And if the file type settings are defined in the default way of defining file type settings:

Parser Rule Tag Type Segmentation Hint
//span Inline May Exclude
//variabletext Inline Include with Text

There is a work-around by defining two instead of one parser rules for each inline formatting tag pair:

Parser Rule Tag Type Segmentation Hint
//span[preceding-sibling::text()[string-length(normalize-space(.)) > 0] or following-sibling::text()[string-length(normalize-space(.)) > 0]] Inline Include with Text
//span Inline May Exclude

But this makes the definition of XML file type settings excessively complicated.

So I think the segmentation processing in Studio 2017 itself should be modified accordingly.

Such a Studio enhancement would avoid a bad segmentation like in segment 1 in the following Studio screenshot.

Screenshot of SDL Trados Studio 2017 showing incorrect segmentation. Segment 1 misses inline tags, segment 2 includes them, and segment 3 is correct.

for an XML file that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<body>
<p>Text containing a <span class="main"><variabletext id="1"/></span></p>
<p>Text containing a <span class="main"><variabletext id="2"/></span> and the segment continues.</p>
<p><span class="main">Text surrounded by inline tag pair.</span></p>
</body>