Salesforce

Trados Accelerate / Cloud / Enterprise / Team: Fields are not imported when using TMXs created by Déjà Vu

« Go Back

Information

 
Article TypeSolution Article
Scope/EnvironmentTrados Accelerate
Trados Enterprise
Trados Studio cloud capabilities
Trados Team
Symptoms/Context

You import a TMX created by Déjà Vu into Trados Accelerate / Cloud / Enterprise / Team. The import runs fine, but when you open the Translation Memory in maintenance mode, you see that none of the fields have been imported.
Resolution
 

Enhancement Request

An enhancement request has been raised with our Development Team, requesting that fields within TMXs exported by Déjà Vu are imported into Trados Accelerate / Cloud / Enterprise / Team.
 

Workaround: Manipulate the contents of the TMX export with a script

The following PowerShell script converts Déjà Vu TMX exports into an RWS-style versions from which the contents of the fields can be imported. Note that you may have to add/remove/modify <prop type> values to match the fields in your exported TMX.
 
$infiles = gci *.tmx ;
 
foreach ($infile in $infiles)
{
 
  $intextstream = New-Object System.IO.StreamReader($infile.FullName) ;
   
  $outfilename = $infile.fullname -replace "\.tmx", ".tmx.FieldValueType" ;
 
  if (Test-Path -Path "$outfilename")
  {Remove-Item "$outfilename"} ;
 
  $outtextstream = [System.IO.StreamWriter]::new( $outfilename, 'Write', [System.Text.Encoding]::UTF8) ; # THIS LINE OF CODE REQUIRES POWERSHELL 3.0 TO BE INSTALLED
   
  while (($inline = $intextstream.ReadLine()) -ne $null)
  {
 
    # TMX Header
     
    $inline = $inline -replace "creationtool=""DejaVu""", "creationtool=""SDL Language Platform""" ;
    $inline = $inline -replace "creationtoolversion=""4""", "creationtoolversion=""8.0""" ;
    $inline = $inline -replace "o-tmf=""DVMDB""", "o-tmf=""SDL TM8 Format""" ;
   
    $inline = $inline -replace "<header ([^<>]*)(/>)", "<header `$1>
      <prop type=""x-client:SingleString""></prop>
      <prop type=""x-idiom-tm-uda-Client_Ref:SingleString""></prop>
      <prop type=""x-domain:SingleString""></prop>
      <prop type=""x-project:SingleString""></prop>
      <prop type=""x-idiom-tm-uda-Project_ID:SingleString""></prop>
      <prop type=""x-filename:SingleString""></prop>
      <prop type=""x-rowid:SingleString""></prop>
      <prop type=""x-issource:SingleString""></prop>
    </header>" ;
 
    $inline = $inline -replace "\s*</header>", "
      <prop type=""x-client:SingleString""></prop>
      <prop type=""x-idiom-tm-uda-Client_Ref:SingleString""></prop>
      <prop type=""x-domain:SingleString""></prop>
      <prop type=""x-project:SingleString""></prop>
      <prop type=""x-idiom-tm-uda-Project_ID:SingleString""></prop>
      <prop type=""x-filename:SingleString""></prop>
      <prop type=""x-rowid:SingleString""></prop>
      <prop type=""x-issource:SingleString""></prop>
    </header>" ;
     
    # TMX Body
   
    $inline = $inline -replace "(<prop type=""[^"":]*)("">)", "`$1:SingleString`$2" ;
     
    # $inline = $inline -replace "(<prop type=""x-idiom-)(source-ipath|target-ipath):SingleString("">)", "`$1`$2:SingleString`$3" ;
    $inline = $inline -replace "(<prop type=""x-idiom-)(next-hashcode|prev-hashcode):SingleString("">)", "`$1`$2:Integer`$3" ;
    $inline = $inline -replace "(<prop type=""x-idiom-)(segment-status):SingleString("">)", "`$1`$2:SinglePicklist`$3" ;
     
    $inline = $inline -replace "(<prop type=""x-Recognizers):SingleString("">)", "`$1:MultiplePicklist`$2" ;
    # $inline = $inline -replace "(<prop type=""x-idiom-db-description):SingleString("">)", "`$1:SingleString`$2" ;
    # $inline = $inline -replace "(<prop type=""x-TMName):SingleString("">)", "`$1:SingleString`$2" ;
    # $inline = $inline -replace "(<prop type=""x-idiom-o-tmf):SingleString("">)", "`$1:SingleString`$2" ;
    # $inline = $inline -replace "(<prop type=""x-client):SingleString("">)", "`$1:SingleString`$2" ;
    # $inline = $inline -replace "(<prop type=""x-idiom-tm-uda-Client_Ref):SingleString("">)", "`$1:SingleString`$2" ;
    # $inline = $inline -replace "(<prop type=""x-domain):SingleString("">)", "`$1:SingleString`$2" ;
    # $inline = $inline -replace "(<prop type=""x-project):SingleString("">)", "`$1:SingleString`$2" ;
    # $inline = $inline -replace "(<prop type=""x-idiom-tm-uda-Project_ID):SingleString("">)", "`$1:SingleString`$2" ;
    # $inline = $inline -replace "(<prop type=""x-filename):SingleString("">)", "`$1:SingleString`$2" ;
    # $inline = $inline -replace "(<prop type=""x-rowid):SingleString("">)", "`$1:SingleString`$2" ;
     
    # <tuv><prop type="x-issource">true</prop><seg>source segment</seg></tuv>
    # <tuv><prop type="x-issource">false</prop><seg>target segment</seg></tuv>
     
    # $inline = $inline -replace "(<prop type=""x-issource):SingleString("">)", "`$1:SingleString`$2" ;
     
    $outtextstream.WriteLine($inline) ;
     
  }
   
  $intextstream.close() ;
   
  $outtextstream.close() ;
 
}

 
Root Cause

The TMX specification has a fairly loose definition, and neither Déjà Vu nor Trados Accelerate / Cloud / Enterprise / Team appears to be at fault. Rather an enhancement needs to be made to the latter in order for it to process the fields contained in Déjà Vu's TMX export.
Reference
Attachment 1 
Attachment 2 
Attachment 3 
Attachment 4 
Attachment 5 

Powered by