ITS Filter: a non-translatable inline extraction made available for translation

Content:

<outer>Before<inner>In<img src="image.png" alt="Description"/></inner>After</outer>

with filter configuration:

<okp:options extractUntranslatable="yes"/>
<its:translateRule selector="//outer" translate="yes"/>
<its:translateRule selector="//inner" translate="no"/>
<its:withinTextRule selector="//inner|//img" withinText="yes"/>

has to be extracted as:

<trans-unit id="1">
<source xml:lang="en">Before<bpt id="1">&lt;inner&gt;</bpt><ph id="2">In</ph><ph id="3">&lt;img alt="Description" src="image.png"/&gt;</ph><ept id="1">&lt;/inner&gt;</ept>After</source>
<target xml:lang="fr"></target>
</trans-unit>

And the very same content with the following configuration:

<okp:options extractUntranslatable="yes"/>
<its:translateRule selector="//outer" translate="no"/>
<its:translateRule selector="//inner" translate="no"/>
<its:withinTextRule selector="//inner|//img" withinText="yes"/>

has to be extracted as:

<trans-unit id="1" translate="no">
<source xml:lang="en">Before<bpt id="1">&lt;inner&gt;</bpt>In<ph id="2">&lt;img alt="Description" src="image.png"/&gt;</ph><ept id="1">&lt;/inner&gt;</ept>After</source>
<target xml:lang="fr"></target>
</trans-unit>

Please note the wrapping up of <ph> tags around "In" text.

Edited Apr 08, 2025 by Denis Konovalyenko
Assignee Loading
Time tracking Loading