Import in Groupshare TMs with Studio 2019

Hi everyone,

I am currently upgrading a Studio plugin from Studio 2015 to Studio 2019.

One part of the plugin consists in importing an SDLXLIFF file in a Groupshare TM. To do so, I used to use the ScheduledTranslationMemoryImportOperation constructor where I would have used the following methods (in the following sequence) to load the import operation on the server:

Create: to create the import operation

Upload: to upload the import file

Queue: to queue the instance of the import operation.

With Studio 2019, it seems the constructor ScheduledTranslationMemoryImportOperation does not exist anymore in the Sdl.LanguagePlatform.TranslationMemoryApi namespace. However, there seems to be a new constructor which might replace the above-mentionend constructor. It is named ScheduledServerTranslationMemoryImport.

My questions are:

1. Does the ScheduledServerTranslationMemoryImport constructor replace the ScheduledTranslationMemoryImportOperation? I can't see any trace of this new constructor in the documentation

2. Apparently, the new constructor has no "Create" and "Upload" methods. Which methods should be applied? Does the "Queue" method cover both the "create" and "upload" process?

Thank you in advance for your support.

Regards,

Laurent

 

 

 

Parents
  • Hi ,

    Queue method does not cover create process.

    You can use the following code to upload an xliff to an existing server tm:

    var uri = new Uri(@"uri");

    var translationProviderServer = new TranslationProviderServer(uri, false, "user name", "password");

    //Import to existing tm
    var guid = new Guid("Existing TM Guid");
    var tm = translationProviderServer.GetTranslationMemory(guid, TranslationMemoryProperties.None);
    var langDirection = tm.LanguageDirections;

    var import = new ScheduledServerTranslationMemoryImport(langDirection[0]);
    import.Source = new FileInfo(@"path to xliff");
    import.Queue();

Reply
  • Hi ,

    Queue method does not cover create process.

    You can use the following code to upload an xliff to an existing server tm:

    var uri = new Uri(@"uri");

    var translationProviderServer = new TranslationProviderServer(uri, false, "user name", "password");

    //Import to existing tm
    var guid = new Guid("Existing TM Guid");
    var tm = translationProviderServer.GetTranslationMemory(guid, TranslationMemoryProperties.None);
    var langDirection = tm.LanguageDirections;

    var import = new ScheduledServerTranslationMemoryImport(langDirection[0]);
    import.Source = new FileInfo(@"path to xliff");
    import.Queue();

Children