DEEPL Call Failing in SDK

I am currently writing a program that is using the project automation API. The program takes in a user defined path, then scans all the files. From this it makes a project and run the analyse and pre translate batch tasks. The program then creates the project and runs pre tanslate(Machine translation and Translation Memories) and analyse batch tasks. The program then produces a project and a package with the processed files. The program works end to end when the google translate API is used and all the files are machine translated successfully. The issue i am having is calling the DeepL plugin. DeepL is installed and works fine when the batch tasks are ran manually within Trados. When i call DeepL within the code the DeepL plugin is added to the project and machine translation runs but all the segments read [Segment already translated...source not re-sent].

Below is the code which i used to call DeepL is there something wrong with this request. *Note* - I use this exact same code to call google translate and this works fine. I also contacted DeepL and they directed me here.

Any Help is greatly appreciated.

  public void AddDeepLMT(FileBasedProject project, string apiKey)
        {
            Uri DeeplUri = new Uri("deepltranslationprovider:///");
 
            TranslationProviderConfiguration tmConfig = project.GetTranslationProviderConfiguration();
 
            tmConfig.Entries.Add
            (
                new TranslationProviderCascadeEntry
                (
                    new TranslationProviderReference(DeeplUri), false, true, true, 0
                )
            );
            project.Credentials.AddCredential(DeeplUri, apiKey);
            project.UpdateTranslationProviderConfiguration(tmConfig);
        }

  • Hi ,

    The message "[Segment already translated...source not re-sent]" is normally displayed when the translations were already received from the server, and the requests will not be made again, because the option "Re-send draft amd translated segments" from DeepL plugin is unchecked.

    By default the custom settings for the  DeepL provider looks like below, and in this case the provider will not make another request to DeepL service and user will not be charged.

    DeepL Translation Provider settings window with an unchecked option for 'Re-send draft and translated segments'.

    The DeepL provider settings are described in this documentation.

    If you intend to have the "Re-send draft and translated segments" option unchecked, then you can try to uncheck also the option "Enable LookAhead" from File->Options->Editor->Automation Studio menu and see if the message is still overwritting your translations? It might be possible that LookAhead option to keep in cache the message and  because of this, the translations are overwritten.

    Normally, if the "Re-send draft and translated segments" option is unchecked, your translations should look like (see below example):

    Trados Studio interface showing a warning message 'Segment already translated...source not re-sent' next to a translated segment.

    Above you can see the provider informs you that the segment was already translated, and because of this, the request is not send to the server when you navigate between the segments already translated/ run the pre-translate batch task. (this happens with the help of "Re-send draft and translated segments" option which is unchecked.

     

    With kind regards,

    Florentina Caputa



    Generated Image Alt-Text
    [edited by: Trados AI at 1:19 PM (GMT 0) on 5 Mar 2024]