Sdl Sdk Project Automation Use Template and PreTranslateFiles using Server Based Translation Memories

How is it possible to run AutomaticTask.PreTranslateFiles, using server based Translation Memories?

MainTranslationProviderItem Uri="sdltm.gsdemo.gs.sdlproducts.com/ Global Solution Consultants%2FBC Translation Productivity%2FSDL EMEA LSP%2FSDL LSP Trials%2F{CompanyName}&tmName={TmName}" Enabled="true
private void RunAutomaticTask(FileBasedProject ThisSdlProject, string TargetLanguageCode){
    ProjectFile[] targetFiles = ThisSdlProject.GetTargetLanguageFiles(new Language(CultureInfo.GetCultureInfo(TargetLanguageCode)));
    AutomaticTask preTranslate = ThisSdlProject.RunAutomaticTask(targetFiles.GetIds(), AutomaticTaskTemplateIds.PreTranslateFiles);
}

I get the error: "The current parameters are not compatible with the Translation Provider Uri Schema"

Parents Reply
  • If it would be a credential problem, Studio would just hang... I tested this by creating a template which had a serverTM set and programatically running a pretranslate. It doesn't throw any exceptions, just hangs.

    By the way, here's another post of a user who had the same issue and fixed it (maybe it'll work for you too)

    From the error that you said you get, "the current parameters are not compatible with the Translation Provider Uri Schema", it would seem like the URI is not in the correct format (and it's not, if I look at other URIs in templates/projects I can see clear differences from the URI you provided). That's why I thought that maybe you've tried to write it manually and suggested that you should use the classes provided by the API to form it. 

    Can you provide the template you used?

    How did you create it?

    What version of Studio?

    Was it done programatically?

Children