Missing for ITS in okapi? Distiguish between lock and discard trans-unit for translation

9 views
Skip to first unread message

Marc Mittag

unread,
Jun 26, 2023, 4:01:25 PM6/26/23
to okapi-users
Dear all,

sometimes there is the need to distinguish between text, that is not of
interest for the translator and should not be shown in the translation
tool and text, that should not be translated but is relevant for context
reasons.

As far as I can see, there is no possibility by the xml:its filter in
Okapi and also not by the xliff 1.2 spec to distinguish between those
and set some different attribute/value combination for the 2 cases, right?

Because as far as I can see, only the translate-attribute of the
trans-unit can be used for this and it has only the boolean values yes/no.

Am I right? If yes, then in my eyes this is an important gap in both:
the xliff 1.2 standard and okapi its filter.

best

Marc

yves.s...@gmail.com

unread,
Jun 30, 2023, 12:35:31 AM6/30/23
to Marc Mittag, okapi-users
Hi Mark,

I believe you are correct, there is no separate ways to indicate those two aspects.
Cheers,

-ys
--
You received this message because you are subscribed to the Google Groups "okapi-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to okapi-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/okapi-users/df4eb4af-382b-f41d-436b-9cafa70d1546%40marcmittag.de.

Marc Mittag

unread,
Jul 10, 2023, 4:09:04 PM7/10/23
to yves.s...@gmail.com, okapi-users

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

Reply all
Reply to author
Forward
0 new messages