Exporting a Server TM using the TranslationMemory API results in a TMX file that misses the context matching information

Hi, originally, I posted this question here, but I think I chose the wrong forum at least there was zero feedback ... So I post here again and hope to receive feedback here Slight smile

I have detected a problem with the Exporter class in the TranslationMemory API. The problem is that - when a server TM gets exported, the TMX is missing the context information after the export.

Here is my code:

Dim TMExporter As New Sdl.LanguagePlatform.TranslationMemoryApi.TranslationMemoryExporter(ServerBasedTranslationMemory.GetLanguageDirection(LangDir))

TMExporter.ChunkSize = 100

TMExporter.FilterExpression = GetFilterCreatedAt()

AddHandler TMExporter.BatchExported, AddressOf Exporter_BatchExported

strExportfile = ExportFolder & "\" & ServerTM & "_" & LanguageDirection.SourceLanguageCode.ToString & "_" & LanguageDirection.TargetLanguageCode.ToString & ".tmx"

Try

      Dim strNow As String = Now.ToString("yyyyMMdd_HHmmss")

      TMExporter.Export(strExportfile, True)

      System.IO.File.AppendAllText(LogFile, ControlChars.CrLf & strNow & " SUCCESS: " & ServerTM & " , Source Language: " & LanguageDirection.SourceLanguageCode.ToString & " , Target Language: " & LanguageDirection.TargetLanguageCode.ToString
      & " was successfully exported to " & strExportfile & ". " & exportProgress.ToString & " TUs were exported." & ControlChars.CrLf)

Catch ex As Exception

      Dim strNow As String = Now.ToString("yyyyMMdd_HHmmss")

      System.IO.File.AppendAllText(LogFile, ControlChars.CrLf & strNow & " ERROR: " & ServerTM & " , Source Language: " & LanguageDirection.SourceLanguageCode.ToString & " , Target Language: " & LanguageDirection.TargetLanguageCode.ToString &
      " could not be exported. The original error message was: " & ex.ToString & ControlChars.CrLf)

      System.IO.File.Delete(ExportFolder & "\" & ServerTM & "_" & LanguageDirection.SourceLanguageCode.ToString & "_" & LanguageDirection.TargetLanguageCode.ToString & ".tmx")

End Try

This code - when run on a local SDLTM exports everything just fine including the context information:

Screenshot of Trados Studio TMX code with highlighted section showing missing context information after export from a server TM.

But when I run it on a server TM, the TMX misses the context information after the export finishes:

Screenshot of Trados Studio TMX code with no visible errors or warnings, context information appears to be present.

I can also export the server TM from Trados Studio and from the Groupshare Web UI just fine and the exports always include the context information.

Also, as I said before - export from a SDLTM through the API also creates a TMX that includes the context information. 

It is really only the export from a server TM through the TM API that loses the context information. Is this a known issue? It basically means that - whereever automation of exporting TMX from server TMs is used to backup the TM data, this will currently lose the context information. 



Generated Image Alt-Text
[edited by: Trados AI at 4:12 AM (GMT 0) on 5 Mar 2024]
Parents
  • Hi  , I have reviewed this issue today, but unable to reproduce the issue that you are reporting.

    Prerequisites

    • Trados Studio 2022 SR1 - 17.1.6.16252
    • GS: 15.1.9.12529 - GS 2020 SR1 CU09

    Steps

    1. Create a server based tm from GroupShare
    2. Open the server based TM in Stduio & add some custom fields
    3. Add a few TU entries & assign a custom field value to one or two of the TU's
    4. Commit changes so that they are updated on the server.
    5. Create a standalone app to connect and export the server based TM to tmx
      1. Documentation: How to export serverbased TM to TMX

    Actual result

    The custom field values are exported correctly, visible from the TU's in the TMX that was exported from the serverbased TM

    Follow up

      Can you pls provide the GroupShare version + Trados Studio version you are using?

  • Dear Patrick, 

    many thanks for your answer. My issue is about the *context matching information* - not about custom fields. Custom fields - I agree - do survive the export. The context matching information in the TM is stored in these fields:

    <prop-type="x-IncludesContextContent">True</prop>

    This turns the feature on, I guess.

    Then on segment pair level, you will find:

    <prop type="x-Context"> etc. as highlighted in the screenshot:

    Screenshot of Trados Studio XML code with highlighted properties including 'x-IncludesContextContent' set to 'True' and 'x-Context' with segment pair level information.

    These elements - when you export via the API from a server TM - are *not* exported. I am quite sure you can repro it. I tested against an older GS 2020 SR 1 CU7 (gsdemo.gs.sdl.com) as well as my own VM running GS 2020 SR1 8.1. I will test against CU9 as well, but I am quite sure it is not a Groupshare issue - it is a Studio API issue. 



    Generated Image Alt-Text
    [edited by: Trados AI at 4:12 AM (GMT 0) on 5 Mar 2024]
  • Hi , you're absolutly right, I missread this initially; thx for additional info

    I'll review again (this time setting up the context match information, e.g. previous segment...) & confirm your findings before I escalate it to the development team. 

Reply Children