Guys,
I am trying to create fileBasedProject from a template.
This template has server based translation memory settings.
The anlysis and the trnaslation is working fine but the moment I publish this project to the group share and open it back in the
the tm settings are lost. below is code I am trying ..Please let me know if I am missing anything here. thanks in advance
template = new ProjectTemplateReference("path");
newProject = new FileBasedProject(this.GetInfoForTemplateProject(), template);
newProject.Credentials.AddCredential(my windows crentials);
var projectFiles = newProject.AddFolderWithFiles(projectFilePath, true);
foreach (var item in project.GetProjectInfo().TargetLanguages)
{
project.AddMasterTM(project.GetTranslationProviderConfiguration(), item.IsoAbbreviation);
}
ISettingsBundle settings = project.GetSettings();
TranslateTaskSettings pretranslateSettings = settings.GetSettingsGroup<TranslateTaskSettings>();
pretranslateSettings.NoTranslationMemoryMatchFoundAction.Value = NoTranslationMemoryMatchFoundAction.ApplyAutomatedTranslation;
newProject.RunAutomaticTasks(projectFiles.GetIds(), new string[]
{"Sdl.ProjectApi.AutomaticTasks.Scan",
"Sdl.ProjectApi.AutomaticTasks.Conversion",
"Sdl.ProjectApi.AutomaticTasks.Split",
"Sdl.ProjectApi.AutomaticTasks.Analysis",
"Sdl.ProjectApi.AutomaticTasks.Translate"
}, ProcessTaskStatusEvent, ProcessTaskMessageEvent
);
PublishProjectResult test123 = newProject.PublishProject(
new Uri("http://groupsharexyz:80"), false, "xyz", "xyz", "/orgPath", new EventHandler<PublishProjectEventArgs>(this.Publish));
If I create the project, do not publish and open in sdl trados. TM's are there.
The moment I publish this project to the server. I loose the tm settings.