TBX.XML

From Memsource
Jump to: navigation, search

Importing TBX.XML exported from SDL Trados Studio 2014

SDL Trados is not supporting general TBX format for termbase. Instead they use xml format with TBX schema. Importing this xml format into Memsource TB is supported, however not all attributes can be imported. Imported will be:

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

Editing the tbx.xml before import

You can edit your tbx.xml before importing it to Memsource in order to have the best use of your data. In order to edit tbx.xml, you have to open the file in text editor which can handle Multiline Regex (such as Notepad++ ) and use regular expression in Search&Replace

Editing Note, Usage and Status

All the customized attributes in tbx.xml have this format (the actual names of 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 Cloud offers a set of API calls.</descrip>
</descripGrp>
<descripGrp>
<descrip type="Status">confirmed</descrip>
</descripGrp>

These attributes will be automatically imported into Memsource Note:

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


If you want change it and import only "Comment" as a Memsource Note, "Example" as a Memsource Usage, Status as Approved or New (Memsource supports only those two options) and don't need to import "Definition", you can edit your tbx.xml to standard Memsource format for TBX:

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

Open the file in text editor which can handle Multiline Regex (such as Notepad++ ) and use regular expression in Search&Replace

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 empty field


Importing Usernames to Memsource

Memsource supports importing only Memsource usernames to TB due to displaying or hiding Linguist names and usernames in Editor etc.

If you need to keep the names connected to term, there are two ways of doing it:

1. Create a new user in Memsource Cloud, using the same username as is in TBX

or

2. Add the usernames to Note (the fields for "Created by" and "Edited by" in Memsource TB will be empty). See instruction bellow.

Adding Author to Note

you will have to remove author from <transacGrp / origination> element and add it to <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>

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 Note

you will have to remove editor from <transacGrp / modification> element and add it to <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>

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>