Hi Yves, hi everyone,
I thought, there must be a way, but I can not find one right now:
How would I achieve, that an external tag in an xml file is not excluded from the generated xliff file, but instead put in a trans-unit with translate="no"?
Is there a way?
Else we would like to implement one, probably with the Okapi
developer, we already work with.
For example for the following xml
<?xml version="1.0" encoding="UTF-8"?>
<root>
<notTranslate>This should not be
translated</notTranslate>
<translateThis>This is to be
translated</translateThis>
</root>
I would like to achieve the following xliff
<?xml version="1.0" encoding="UTF-8"?>
<xliff version="1.2"
xmlns="urn:oasis:names:tc:xliff:document:1.2"
xmlns:okp="okapi-framework:xliff-extensions"
xmlns:its="http://www.w3.org/2005/11/its"
xmlns:itsxlf="http://www.w3.org/ns/its-xliff/"
its:version="2.0">
<file original="original-627.xml" source-language="de-DE"
target-language="en-GB" datatype="xml">
<body>
<trans-unit id="2" translate="no">
<source xml:lang="en-GB">This should not be
translated</source>
<seg-source><mrk mid="0" mtype="seg">This should not
be translated</mrk></seg-source>
<target xml:lang="de-DE"><mrk mtype="seg"
mid="0"></mrk></target>
</trans-unit>
<trans-unit id="2">
<source xml:lang="en-GB">This is to be
translated</source>
<seg-source><mrk mid="1" mtype="seg">This is to be
translated</mrk></seg-source>
<target xml:lang="de-DE"><mrk mtype="seg"
mid="1"></mrk></target>
</trans-unit>
</body>
</file>
</xliff>
This ITS-markup for Okapi will not put the translate="no" into the xliff, but omit it completely:
<?xml version="1.0" encoding="UTF-8"
standalone="no"?><its:rules
xmlns:its="http://www.w3.org/2005/11/its"
xmlns:fct="http://www.fct.de/general"
xmlns:fm="http://www.fct.de/general"
xmlns:itsx="http://www.w3.org/2008/12/its-extensions"
xmlns:okp="okapi-framework:xmlfilter-options"
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.0">
<its:translateRule selector="//notTranslate"
translate="no"/>
<its:translateRule selector="//root|//translateThis"
translate="yes"/>
</its:rules>
best
Marc