TranslationProviderServer.GetTranslationMemories error

when I use this call:

TranslationProviderServer.GetTranslationMemories([Sdl.LanguagePlatform.TranslationMemoryApi.TranslationMemoryProperties]::Container)

it says "This server does not support TM Server functionality", which is not correct.

how can I track where the issue is?

 

Parents Reply Children
  • I get the full TMList from server then pick just the matching tm object from the list.

    URIs are not composed but used from what the servers returns us.

    By debugging the script I obtained the TM URI content string and special url characters are UrlEncoded, like that:

    sdltm.xxx.xxx.com/ ENRICO&tmName=Test_2015_enrico_EN

    I don't know if this is correct or not, but from what I could check the url is the same way in GS 2015 and in GS 2017. In 2015 works, in 2017 it doesn't.

    The code used to instantiate the translation provider is this:

    foreach($tmUri in $uriToTMs)
    {
    [Sdl.ProjectAutomation.Core.TranslationProviderConfiguration] $tmConfig = $fileBasedProject.GetTranslationProviderConfiguration();
    $tmtoadd = New-Object Sdl.ProjectAutomation.Core.TranslationProviderReference ($tmUri.uri);
    #next two lines configure options for memories based on TM name matching
    if($tmUri.uri -match "tmName=OLDS"){$penalty = 1;$updateme = $false;}else{$penalty=0;$updateme = $true};
    if($tmUri.uri -match "tmName=All"){$penalty = 1;;$updateme = $false};
    $entry = New-Object Sdl.ProjectAutomation.Core.TranslationProviderCascadeEntry ($tmtoadd, $true, $true, $updateme, $penalty);
    $tmConfig.Entries.Add($entry);
    $fileBasedProject.UpdateTranslationProviderConfiguration($tmConfig);
    }

    $uriToTMs is an array of tm uris as returned from the server.

    I need right now to use SDK API instead of REST calls because I need to configure each project. I couldn't do it with project templates as REST Calls ask me to do.
    Actually REST Api are quicker to implement for sure. I wish for a finer control of project creation in a future update.

    Any Help is really appreciated. I don't know where to look further.