How are translation details saved in the Translation Memory (TM) history?
Introduction
This article describes the simplified process for saving a particular translation in the Translation Memory (TM) history. For demonstration purposes, the process is explained using three different sample scenarios.
A TM record is saved in the Translation Memory (TM) history in these two situations:
When a TM record is overwritten by a newer version of it.
When a TM record is deleted.
IMPORTANT!
Keep in mind that, in order for the overwritten or deleted TM to be saved in the history, the Save TM segment history option must be selected in the XTM Cloud global settings: Configuration → Settings → Translation → TM → Matches - general.
Saving records in the TM history
When a TM record is updated by a second project
Scenario
A new XTM Cloud project is created, containing the following data:
Project name:
Project.Customer:
Test Customer.Source segment: This is an example text.
Target segment: To jest przykładowy tekst.
Tags:
Tag1,Tag2
The translation is inserted in the target segment, and confirmed, manually, in XTM Workbench.
Each TM segment is stored in a table whose name is the code for the target language that the segment is translated into, so the record is saved in the corresponding TM current table in the database. Example: in the case of Polish, the table is called
pl_pl.
There are exceptions to the naming convention above. Some languages have the so-called language variants, for which XTM Cloud offers an option of variant matching (Configuration → Settings → Translation → TM → Matches general → Match against all language variants).
In such case, there exists only one table for a particular language, whose name is the country code (for example, fr for French). In this table, once can then check what language variant a particular TM record has been created for by looking at the tgtlang column.
The same rule applies to the TM history table, in which case, for the French language, it is named tuhistoryfr, and NOT tuhistoryfr_fr.
id | 456387
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":-1,"tgtNextCrc":-1,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}NOTE
At this point, the TM record has no target context (the source file contained only one segment), which is indicated by the values "tgtPrevCrc":-1 and "tgtNextCrc":-1 in the contextinformations column, for the previous and next target context respectively.
Naturally, it is also saved in the XTM Cloud UI (in the TM tab screen):
Once the project workflow finishes in the XTM Cloud UI, a copy of the record (
revision = 1) is also saved in the corresponding TM history table for the particular target language, in the database, as a result of TM post processing. This is because, when the workflow is being finished, the system needs to add the target context to all TM records created or updated in the current project/job, to prepare all of them for use as reverse memory matches in the future. Example: in the case of Polish, this history table is calledtuhistorypl_pl.
id | 456741
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":-1,"tgtNextCrc":-1,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}
tuentityid | 456387
revision | 1Note that the TM current table id = TM history table tuentityid.
At this point, the TM record in the
pl_pltable is added target context, which is indicated, again, by the values"tgtPrevCrc":0and"tgtNextCrc":0in the contextinformations column, for the previous and next target context respectively.
id | 456387
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":0,"tgtNextCrc":0,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}IMPORTANT!
Keep in mind that a translation is saved in the TM in accordance with the XTM Cloud customer settings and the configuration specified in the global settings, in XTM Cloud: Configuration → Settings → Translation → TM.
Now, a second XTM Cloud project is created, containing the following data:
Project name:
Project B.Customer:
Test Customer.Source segment: This is an example text.
Target segment: To jest tekst z przykładu.
Tags:
Tag1
The segment is matched against the existing TM in XTM Workbench. However, a new translation is then inserted and confirmed in the target segment.
At this point, the TM record is updated, correctly, with its new translation in the database:
id | 456387
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest tekst z przykładu.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":0,"tgtNextCrc":0,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}NOTE
When a particular TM record is overwritten, what is changed is not only the actual translation but also the project’s tags, which are simply appended to the current TM record, from any subsequent projects that will update the said record.
Take a look at the TM tab screen in the XTM Cloud UI once again:
Again, due to TM post processing, the record’s copy (
revision = 2) is saved in the corresponding TM history table (tuhistorypl_pl) for a particular target language. At this point, there are two TM records in total.
id | 456744
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":0,"tgtNextCrc":0,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}
tuentityid | 456387
revision | 2Finally, once the project workflow is finished in the XTM Cloud UI, another copy of the record (
revision = 3) is saved in the corresponding TM history table (tuhistorypl_pl) for a particular target language. At this point, there are three TM records in total.
id | 456746
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest tekst z przykładu.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":0,"tgtNextCrc":0,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}
tuentityid | 456387
revision | 3This is in compliance with what you see in the XTM Cloud UI if you search by Historic segments in the TM tab…
… or simply view the TM history for this TM record.
Visual representation
When a TM record is deleted from XTM Cloud
Scenario
A new XTM Cloud project is created, containing the following data:
Project name:
Project A.Customer:
Test Customer.Source segment: This is an example text.
Target segment: To jest przykładowy tekst.
Tags:
Tag1,Tag2
The translation is inserted in the target segment, and confirmed, manually, in XTM Workbench.
The record is saved in the corresponding TM current table in the database. In the case of Polish, the table is called
pl_pl.
id | 456387
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":-1,"tgtNextCrc":-1,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}Naturally, it is also saved in the XTM Cloud UI (the TM tab):
Once the project workflow is finished in the XTM Cloud UI, a copy of the record (
revision = 1) is also saved in the corresponding TM history table for a given target language.
id | 456741
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":-1,"tgtNextCrc":-1,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}
tuentityid | 456387
revision | 1At this point, the TM record in the
pl_pltable is also added target context, which is indicated, again, by the values"tgtPrevCrc":0and"tgtNextCrc":0in the contextinformations column, for the previous and next target context respectively.
id | 456387
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":0,"tgtNextCrc":0,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}Now, let’s see what happens if you delete the current TM record. You can do so directly from the TM tab screen.
IMPORTANT!
This action is irreversible, as you are informed immediately by a popup message:
The TM record is deleted instantly from the TM current table (
pl_pl).However, the copy of the record (
revision = 0– signifying that this TM record has been deleted from the TM base) is saved in the corresponding TM history table (tuhistorypl_pl) for a particular target language. This copy is referred to the corresponding record in the TM current table (pl_pl) via theoriginaltuentityidcolumn (uhistorypl_pl.oringaltuentityid=pl_pl.id). Thetuentityidcolumn is null. At this point, there are two TM records in total.
id | 456741
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":0,"tgtNextCrc":0,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}
tuentityid |
revision | 0
originaltuentityid | 456387The deleted TM record is also displayed in the TM tab in the XTM Cloud UI, once you search by Deleted segments.
Visual representation
When a TM record is updated directly in the TM manager, in the UI
Scenario
A new XTM Cloud project is created, containing the following data:
Project name:
Project A.Customer:
Test Customer.Source segment: This is an example text.
Target segment: To jest przykładowy tekst.
Tags:
Tag1,Tag2
The translation is inserted in the target segment, and confirmed, manually, in XTM Workbench.
The record is saved in the corresponding TM current table in the database. In the case of Polish, the table is called
pl_pl.
id | 456387
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":-1,"tgtNextCrc":-1,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}Once the project workflow is finished in the XTM Cloud UI, another copy of the record (
revision = 1) is also saved in the corresponding TM history table for a particular target language.
id | 456741
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":-1,"tgtNextCrc":-1,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}
tuentityid | 456387
revision | 1At this point, the TM record in the
pl_pltable is also added target context, which is indicated, again, by the values"tgtPrevCrc":0and"tgtNextCrc":0in the contextinformations column, for the previous and next target context respectively.
id | 456387
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":0,"tgtNextCrc":0,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346},{"nameId":456344,"valueId":456347}]}Now, let’s perform a couple of updates on the TM record directly in the TM tab screen, in the XTM Cloud UI. To begin with, you can change the project’s tags.
The record in question is updated with a new set of tags in the corresponding TM current table in the database.
id | 456387
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":0,"tgtNextCrc":0,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346}]}There is also an update in the TM history table. New entry (
revision = 2) is added accordingly.
id | 456741
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest przykładowy tekst.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":0,"tgtNextCrc":0,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346}]}
tuentityid | 456387
revision | 2Finally, let’s change the translation.
At this point, the TM record is updated, correctly, with its new translation in the database:
id | 456387
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest tekst z przykładu
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":0,"tgtNextCrc":0,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346}]}A copy of the record (
revision = 3) is also saved in the corresponding TM history table for a particular target language. There are now three TM records in total.
id | 456741
customer | DamianCompany_23
project | Project A
srctu | This is an example text.
tu | To jest tekst z przykładu.
tuid | 1
contextinformations | {"contextInformations":[{"tgtPrevCrc":0,"tgtNextCrc":0,"srcPrevCrc":0,"srcNextCrc":0}]}
tags | {"tags":[{"nameId":456344,"valueId":456346}]}
tuentityid | 456387
revision | 2Visual representation