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"><inner></bpt><ph id="2">In</ph><ph id="3"><img alt="Description" src="image.png"/></ph><ept id="1"></inner></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"><inner></bpt>In<ph id="2"><img alt="Description" src="image.png"/></ph><ept id="1"></inner></ept>After</source>
<target xml:lang="fr"></target>
</trans-unit>
Please note the wrapping up of <ph> tags around "In" text.
Edited by Denis Konovalyenko