Best Practices for Importing a Translation Memory (TM)
Introduction
This article covers translation memory import and describes how to prepare the import file.
Before reading this article, we recommend that you find out how to import an XTM Cloud translation memory. See How to import a translation memory (TM) into XTM Cloud. |
---|
Specifics
During TM import, each trans-unit (source/target segment pair) is treated as a separate entity and not as a sequence. For the context to be imported into the TM, it need to be specified for each trans-unit, with the proper syntax. Example:
<tu changedate="20180614T064017Z" creationdate="20180610T235807Z" creationid="exampleid" changeid="exampleid">
<prop type="client">exampleclient</prop>
<prop type="project">exampleproject</prop>
<prop type="domain">exampledomain</prop>
<prop type="subject"> </prop>
<prop type="corrected">no</prop>
<prop type="aligned">no</prop>
<tuv xml:lang="en-us">
<prop type="x-context-pre"><seg>previouscontext</seg></prop>
<prop type="x-context-post"><seg>nextcontext</seg></prop>
<seg>Test</seg>
</tuv>
<tuv xml:lang="ja">
<seg>Test</seg>
</tuv>
</tu>
As you might have spotted, the contexts are placed in the <prop type="x-context-pre">
and <prop type="x-context-post">
tags:
<prop type="x-context-pre"><seg>previouscontext</seg></prop>
<prop type="x-context-post"><seg>nextcontext</seg></prop>
The .tmx file containing the trans-units, which is exported from XTM Cloud, will not contain the x-context-pre
and x-context-post
tags. Example:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tmx SYSTEM "tmx14.dtd">
<tmx version="1.4">
<header adminlang="en-US"
creationtool="XTM"
creationtoolversion="$Revision$"
datatype="xml"
o-tmf="XTM"
srclang="en-US"
segtype="sentence">
<prop type="user-defined">CUSTOMER: test_59645</prop>
</header>
<body>
<tu creationdate="20220506T103004Z"
creationid="8691364,137286998"
changedate="20220509T014114Z"
changeid="8691364,137288593"
tuid="26179868">
<prop type="x-Project">Product</prop>
<prop type="x-previous-crc">1098448520</prop>
<prop type="x-next-crc">4043906193</prop>
<prop type="x-previous-target-crc">67209676</prop>
<prop type="x-next-target-crc">1884799095</prop>
<prop type="x-previous-source-text">Share your screen in a nearby conference room</prop>
<prop type="x-next-source-text">Dial in</prop>
<prop type="x-previous-target-text">在邻近的会议室中共享您的屏幕</prop>
<prop type="x-next-target-text">拨入</prop>
<prop type="x-segment-id">StopSharing</prop>
<prop type="Status">new</prop>
<prop type="x-xtm-status">approved</prop>
<tuv xml:lang="en-US">
<seg>Stop sharing</seg>
</tuv>
<tuv xml:lang="zh-CN">
<seg>停止共享</seg>
</tuv>
</tu>
</body>
</tmx>
In this file, we can see that the tool used to create the file was XTM Cloud: creationtool="XTM"
. This means that the contexts have already been converted. You will find them in the <prop type="x-previous-source-text">
tags. There are also hash codes in <prop type="x-previous-crc">
tags and <prop type="x-next-source-text">
tags and also hash codes in <prop type="x-next-crc">
tags.
For comparison, the contexts of a file from an external tool, before conversion, would look like this:
Good to know!
During the TM import process, you might sometimes experience the Done with errors message in the Import history section.
Click on the Details option, to see the root cause of the issue.
We can see that some segments were NOT imported, which means that some other segments were actually imported.
Following the message, try to review your source file and pinpoint potential errors. In the vast majority of cases, the problem stems from any kind of inconsistency in inline tags or lack thereof in some places in imported segments.