Resources

Import of TBX.xml from SDL Trados

SDL Trados does not support the general TBX format for term bases. Instead, SDL Trados uses the XML format with a TBX schema. Importing this XML format into a Memsource TB is supported. However, not all attributes can be imported.

The imported attributes will be:

  • Source
  • Target
  • Synonyms
  • Date of Creation
  • Date of Modification
  • Names of Author and Reviewer: These will be imported only if the name is the same as the username of an existing Memsource user. You can either edit the names in the TBX.xml or add the users to Memsource.
  • Customized Attributes: These will be imported into the term’s Note. Every attribute will have a separate line starting with the attribute’s name. For example:
    • Origin: Wikipedia
    • Theme: Law
    • Status: New
  • Please note that attributes specified for the whole term concept will be added to every individual term's Note (each language, each synonym, etc.)

Editing the TBX.XML Before Import

In order to make the best use of your data, you can edit your TBX.XML file before importing it to Memsource. To edit the file, you will have to open it in a text editor that can handle Multiline Regex (such as Notepad++) and that can use regular expressions in Search and Replace features.

Editing Note, Usage and Status

All the customized attributes in TBX.XML files have the following format (Note: The actual names of the attributes will be different since they are not standardized):

<descripGrp>
<descrip type="Comment">term =API= should not be translated</descrip>
</descripGrp>
<descripGrp>
<descrip type="Definition">API = application programming interface</descrip>
</descripGrp>
<descripGrp>
<descrip type="Example">Memsource offers a set of API calls.</descrip>
</descripGrp>
<descripGrp>
<descrip type="Status">confirmed</descrip>
</descripGrp>

These attributes will be automatically imported into the Note in Memsource:

  • Comment: term =API= should not be translated
  • Definition: API = application programming interface
  • Example: Memsource offers a set of API calls
  • Status: confirmed

If you want to change this behavior and import, for example, only the "Comment" as a Memsource Note, "Example" as Usage, the Status as Approved or New (Memsource supports only those two options) and don't need to import "Definition", you can edit your TBX.XML file to fit the standard of the Memsource format for TBX files:

<termNote type="Note">term =API= should not be translated</termNote>
<termNote type="usageNote">Memsource offers a set of API calls.</termNote>
<termNote type="status">Approved</termNote>

Open the file in a text editor that can handle Multiline Regex (such as Notepad++) and can use regular expressions in Search and Replace features.

Changing "Comment" to "Note"'

Search:

<descripGrp>.[^\<]+<descrip type="Comment">([^\<]+)</descrip>.[^\<]+</descripGrp>

Replace:

<termNote type="Note">\1</termNote>

Changing "Example" to "Usage"

Search:

<descripGrp>.[^\<]+<descrip type="Example">([^\<]+)</descrip>.[^\<]+</descripGrp>

Replace:

<termNote type="usageNote">\1</termNote>

Setting "Status" to "Approved" Search:

<descripGrp>.[^\<]+<descrip type="Status">[^\<]+</descrip>.[^\<]+</descripGrp>

Replace:

<termNote type="status">Approved</termNote>

Deleting "Definition"

Search:

<descripGrp>.[^\<]+<descrip type="Definition">([^\<]+)</descrip>.[^\<]+</descripGrp>

Replace with an empty field.

Importing Usernames to Memsource

Memsource only supports the importing of Memsource usernames to term bases due to the displaying or hiding of Linguist names and usernames in Editor, etc. If you need to keep the names connected to a term, there are two ways of doing it:

  1. Create a new user in Memsource, using the same username as is in the TBX.
  2. Add the usernames to the term's Note (the fields for "Created by" and "Edited by" in Memsource TB will be empty). For how to do this, see the instructions below:

Adding an Author to Note

You will need to remove the author from the <transacGrp / origination> element and add it to the <descript> element.

<transacGrp>
<transac type="terminologyManagementTransactions">origination</transac>
<date>2006-09-27T11:25:19</date>
<transacNote type="responsibility">MikeS</transacNote>
</transacGrp>

should be replaced by:

<transacGrp>
<transac type="terminologyManagementTransactions">origination</transac>
<date>2006-09-27T11:25:19</date>
</transacGrp>
<descripGrp>
<descrip type="author">MikeS</descrip>
</descripGrp>

The regular expression will be:

Search:

(origination</transac>.[^\<]+<date>[^\<]+</date>.[^\<]+)<transacNote type="responsibility">([^\<]+)</transacNote>.[^\<]+</transacGrp>

Replace:

\1</transacGrp>\r\n<descripGrp>\r\n<descrip type="author">\2</descrip>\r\n</descripGrp>

Adding Edited by to a Note

To add Edited by to a Note, you will need to remove the Editor from the <transacGrp / modification> element and add it to the <descript> element.

<transacGrp>
<transac type="terminologyManagementTransactions">modification</transac>
<date>2006-09-27T11:25:19</date>
<transacNote type="responsibility">lauraB</transacNote>
</transacGrp>

should be replaced by:

<transacGrp>
<transac type="terminologyManagementTransactions">modification</transac>
<date>2006-09-27T11:25:19</date>
</transacGrp>
<descripGrp>
<descrip type="Edited by">lauraB</descrip>
</descripGrp>

The regular expression will be:

Search:

(modification</transac>.[^\<]+<date>[^\<]+</date>.[^\<]+)<transacNote type="responsibility">([^\<]+)</transacNote>.[^\<]+</transacGrp>

Replace:

\1</transacGrp>\r\n<descripGrp>\r\n<descrip type="edited by">\2</descrip>\r\n</descripGrp>