Stephan (MittagQI)
unread,Mar 20, 2025, 8:20:50 AMMar 20Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to okapi-users
Hi everyone,
first of all, a warm welcome to everybody. This is my first post here :-)
I'm struggling about XML-Filter together with the option extractUntranslatable.
Let's say I have this text:
<text>this text <noTranslate>should not</noTranslate> be translated.</text>
normally I lock inline tags, which should not be translated, with the following rules:
<its:withinTextRule withinText="yes" selector="//noTranslate" />
<its:translateRule translate="no" selector="//noTranslate" />
and result looks like this:
<source xml:lang="en">this text <bpt id="1" ctype="x-noTranslate"><noTranslate></bpt><ph id="2">should not</ph><ept id="1"></noTranslate></ept> be translated.</source>
So the part "should not" is locked for translation. When I add the rule
<okp:options extractUntranslatable="yes"/>
result looks like this:
<source xml:lang="en">this text <bpt id="1" ctype="x-noTranslate"><noTranslate></bpt>should not<ept id="1"></noTranslate></ept> be translated.</source>
So the part "should not" is NOT locked any more. This does not feel correct for me.
Only solution to lock the "should not" part ist by replacing the rule:
<its:translateRule translate="no" selector="//noTranslate" />
with
<its:localeFilterRule localeFilterList="!*" selector="//noTranslate" />
then result is again what I want and looks like this:
<source xml:lang="en">this text <bpt id="1" ctype="x-noTranslate"><noTranslate></bpt><ph id="2">should not</ph><ept id="1"></noTranslate></ept> be translated.</source>
So, question, is this behaviour a bug or a feature?
As mentioned above, it does not feel correct for me. Because when I add the <okp:options extractUntranslatable="yes"/> to an existing rule-set, I have to check very carefully if this can effect any translate="no" rules.
Stephan