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 needs 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:
Converting specific code into inline tags during TM import
Sometimes, when importing an XLSX file into your TM, you would like specific code to be converted into inline tags, based on the configuration principles set in a specific filter template. One of the reasons for such action is to receive adequate TM matches in XTM Workbench.
EXAMPLE: Consider the following sentence from a source file: <KeywordName>Spin Radius:</> {0}m. Everything between As a result, the sentence in question would be rendered as follows in XTM Workbench: {1}Spin Radius:{2} {3}m. |
IMPORTANT!
At the first glance, you might think that the option you need is Set tags for imported TM.
However, this option does not have anything to do with inline tags. The “titular” tags for imported TM are the ones that are set in the XTM Cloud global settings, in Configuration → Data → Tags → Tags, which are mostly used to penalize records through TM/Term penalty profiles. For more information, read the following article: How to create tags and tag groups.
For the time being, XTM Cloud does not offer a straightaway possibility to apply specific filter templates during the import process. However, there is a way to have it done nonetheless. Take the following steps:
First of all, separate your XLSX file into two.
In the first file, place the text in the source language.
In the second file, place the text in the target language.
Next, perform the aligning process. This is where you are able to apply a specific filter template if you want your aligned content to go through certain file-processing rules, such as conversion of variables into inline tags. For more information, follow this article: How to align translated documents.
Make sure you have a relevant configuration applied in your XTM instance. For this purpose, contact the XTM International Support team to specify and address your needs.
As a result, you will receive the aligned.xlsx file.
As a last step, perform the importing process. Choose relevant source and target languages and use the aligned.xlsx file mentioned above. For more information, follow this article: How to import a translation memory (TM) into XTM Cloud.
That is it! You should now have your TM imported with relevant code correctly converted into inline tags.
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.