"notranslate" in xlf files

Hi,

I hope I'm here at the right place for my question.

I work in Trados Studio, we receive xlf files (exported from K4) from our client. The client there marks some single words as "notranslate", e.g.:

<g ctype="x-tlf-char-style" equiv-text="style" id="IM-361-1-4" tlf:char-style="80;228;9;11,213;-1,100;0;0;0"><g ctype="x-tlf-notranslate" equiv-text="notranslate" id="IM-361-1-5">XXXXX</g></g><g ctype="x-tlf-char-style" equiv-text="style" id="IM-361-1-6" tlf:char-style="80;228;9;11;-1;0;0;0"> Operating Instructions</g></source><target state="needs-translation"></target></trans-unit></group>

The XXXXX is the text that should not be translated.

How do I tell Studio to tag this text as text, which should not be translated, I suppose it should be tagged accordingly?

Thanks,

Johannes

emoji
  • This file worked with the first solution you gave me. But not with the second. Thanks.

    emoji
  •  

    The problem you have here is that with this file you actually have nested g elements:

              <source>
                <g ctype="x-tlf-char-style" equiv-text="style" id="IM-581-8-1"
                tlf:char-style="834;226;10;11;-1;0;0;0">Remove the</g>
                <g ctype="x-tlf-char-style" equiv-text="style" id="IM-581-8-2"
                tlf:char-style="834;226;10;11,213;-1,100;0;0;0">
                  <g ctype="x-tlf-notranslate" equiv-text="notranslate"
                  id="IM-581-8-3">Safe-Cone</g>
                </g>
                <g ctype="x-tlf-char-style" equiv-text="style" id="IM-581-8-4"
                tlf:char-style="834;226;10;11;-1;0;0;0">Filter.</g>
              </source>

    This isn't a particularly smart way to use XLIFF as there is really no sensible way to control this.  It would be far more sensible to ensure that each <g> element is its own trans-unit, and to do this your client would need to restructure the <group> by creating individual trans-unit elements for each <g> element within the <source>. This makes each segment clearly identifiable and independently translatable, which is especially useful in localization workflows.

    For example:

    <group extype="story" id="ST-581" resname="Decommissioning" translate="yes">
      <trans-unit id="TU-581-7" translate="yes">
        <source>Switch off the device.</source>
        <target state="needs-translation"></target>
      </trans-unit>
      <trans-unit id="TU-581-8-1" translate="yes">
        <source>
          <g ctype="x-tlf-char-style" equiv-text="style" id="IM-581-8-1" tlf:char-style="834;226;10;11;-1;0;0;0">Remove the</g>
        </source>
        <target state="needs-translation"></target>
      </trans-unit>
      <trans-unit id="TU-581-8-2" translate="yes">
        <source>
          <g ctype="x-tlf-char-style" equiv-text="style" id="IM-581-8-2" tlf:char-style="834;226;10;11,213;-1,100;0;0;0">
            <g ctype="x-tlf-notranslate" equiv-text="notranslate" id="IM-581-8-3">Safe-Cone</g>
          </g>
        </source>
        <target state="needs-translation"></target>
      </trans-unit>
      <trans-unit id="TU-581-8-3" translate="yes">
        <source>
          <g ctype="x-tlf-char-style" equiv-text="style" id="IM-581-8-4" tlf:char-style="834;226;10;11;-1;0;0;0">Filter.</g>
        </source>
        <target state="needs-translation"></target>
      </trans-unit>
    </group>

    In this structure:

    • Each <g> element inside the original <source> of trans-unit TU-581-8 has been moved to its own trans-unit.
    • Each trans-unit is assigned a unique ID (TU-581-8-1, TU-581-8-2, TU-581-8-3, etc.) to maintain the order and uniqueness.
    • The <source> and <target> elements are retained within each trans-unit for consistency with XLIFF standards.

    This approach facilitates more granular control over the translation process for each segment and ensures that the structure is clear and manageable for translators.  In fact it will also benefit your client in the long run as the whole localization process will be more economical and less likely to cause problems when they get the translated files back full of mistakes.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji
  • Hi Paul,

    thanks a lot for taking this deep look into this issue. Unfortunately this does not solve the issue the way I hoped for.

    We have one sentence:

    Remove the Safe-Cone Filter.

    The term "Safe-Cone" is marked as untranslatable.

    This also should be one segment in the translation.

    When I understand it correct, then in your solution the client should handle this one sentence with three segments, right?

    Remove the

    Save-Cone

    Filer.

    This is not practicable, as in various languages the word order is changing, so I would need the whole sentence in one segment, but with the non-translatable term tagged in some way.

    Thanks,

    Johannes

    emoji
  •  

    Unfortunately this does not solve the issue the way I hoped for.

    ok - then I think your best bet with this file is to do this:

    1. copy source to target using the out of the box XLFF filetype.
    2. save the target so you have an XLIFF with the source already in the target (although your client could probably make this easier for you and just provide an XLIFF with the target already populated with a copy of the source)
    3. create a custom XML filetype that only extracts the target content (that is actually source text) and translate that

    I think it should be fairly trivial to create the filetype for this, especially with all the examples you now have for the XPath expressions.

    The downside to this approach, and it would have been the same in the Multilingual XML filetype, is that you won't be able to affect the XLIFF statuses which the XLIFF filetype can manage.  Other than that I think this is the way to go... monolingual custom XML filetype translating the text stored in the target elements.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

    emoji