diff --git a/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/PluginResources.Designer.cs b/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/PluginResources.Designer.cs index bbc3bde0de..8e9fc45024 100644 --- a/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/PluginResources.Designer.cs +++ b/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/PluginResources.Designer.cs @@ -493,6 +493,16 @@ public static string TellMe_Provider_Results { } } + /// + /// Looks up a localized resource of type System.Byte[]. + /// + public static byte[] termbaseDefaultDefinitionFile { + get { + object obj = ResourceManager.GetObject("termbaseDefaultDefinitionFile", resourceCulture); + return ((byte[])(obj)); + } + } + /// /// Looks up a localized string similar to projectTerms-sourcecloud. /// diff --git a/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/PluginResources.resx b/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/PluginResources.resx index 4160c4b070..859a1ab2b9 100644 --- a/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/PluginResources.resx +++ b/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/PluginResources.resx @@ -290,4 +290,7 @@ Restart Studio and now you should be able to generate the new termbase. {0} results + + resources\termbasedefaultdefinitionfile.xdt;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + \ No newline at end of file diff --git a/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/Properties/launchSettings.json b/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/Properties/launchSettings.json index 41f8178fc3..636de940e0 100644 --- a/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/Properties/launchSettings.json +++ b/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/Properties/launchSettings.json @@ -3,6 +3,10 @@ "Profile 1": { "commandName": "Executable", "executablePath": "C:\\Program Files (x86)\\Trados\\Trados Studio\\Studio17\\SDLTradosStudio.exe" + }, + "SR1 Beta5": { + "commandName": "Executable", + "executablePath": "C:\\Program Files (x86)\\Trados\\Trados Studio\\Studio17Beta\\SDLTradosStudio.exe" } } } \ No newline at end of file diff --git a/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/Sdl.Community.ProjectTerms.Plugin.csproj b/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/Sdl.Community.ProjectTerms.Plugin.csproj index 6ee8158c45..4de2a508cb 100644 --- a/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/Sdl.Community.ProjectTerms.Plugin.csproj +++ b/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/Sdl.Community.ProjectTerms.Plugin.csproj @@ -3,62 +3,69 @@ net48 false + $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17 $(AppData)\Trados\Trados Studio\17\Plugins true + + + - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.Core.Globalization.dll + $(TradosFolder)\Sdl.Core.Globalization.dll + + $(TradosFolder)\Sdl.Core.Globalization.Async.dll + - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.Core.Settings.dll + $(TradosFolder)\Sdl.Core.Settings.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.Desktop.IntegrationApi.dll + $(TradosFolder)\Sdl.Desktop.IntegrationApi.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.Desktop.IntegrationApi.Extensions.dll + $(TradosFolder)\Sdl.Desktop.IntegrationApi.Extensions.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.Desktop.Platform.dll + $(TradosFolder)\Sdl.Desktop.Platform.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.FileTypeSupport.Framework.Core.dll + $(TradosFolder)\Sdl.FileTypeSupport.Framework.Core.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.FileTypeSupport.Framework.Core.Utilities.dll + $(TradosFolder)\Sdl.FileTypeSupport.Framework.Core.Utilities.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.FileTypeSupport.Framework.Implementation.dll + $(TradosFolder)\Sdl.FileTypeSupport.Framework.Implementation.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.MultiTerm.TMO.Interop.dll + $(TradosFolder)\Sdl.MultiTerm.TMO.Interop.dll True - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.ProjectApi.dll + $(TradosFolder)\Sdl.ProjectApi.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.ProjectAutomation.AutomaticTasks.dll + $(TradosFolder)\Sdl.ProjectAutomation.AutomaticTasks.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.ProjectAutomation.Core.dll + $(TradosFolder)\Sdl.ProjectAutomation.Core.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.ProjectAutomation.FileBased.dll + $(TradosFolder)\Sdl.ProjectAutomation.FileBased.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.ProjectAutomation.Settings.dll + $(TradosFolder)\Sdl.ProjectAutomation.Settings.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.TranslationStudio.Api.dll + $(TradosFolder)\Sdl.TranslationStudio.Api.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.TranslationStudioAutomation.IntegrationApi.dll + $(TradosFolder)\Sdl.TranslationStudioAutomation.IntegrationApi.dll - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.TellMe.ProviderApi.dll + $(TradosFolder)\Sdl.TellMe.ProviderApi.dll @@ -118,6 +125,9 @@ 6.0.0 + + + True diff --git a/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/TermbaseIntegrationAction/TermbaseDefinitionFile.cs b/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/TermbaseIntegrationAction/TermbaseDefinitionFile.cs index 019563053d..b0dbb92c69 100644 --- a/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/TermbaseIntegrationAction/TermbaseDefinitionFile.cs +++ b/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/TermbaseIntegrationAction/TermbaseDefinitionFile.cs @@ -25,9 +25,9 @@ public static string GetResourceTextFile(string fileName) var result = string.Empty; - using (Stream stream = typeof(TermbaseDefinitionFile).Assembly.GetManifestResourceStream("Sdl.Community.ProjectTerms.Plugin.Resources." + fileName)) + using (var stream = new MemoryStream (PluginResources.termbaseDefaultDefinitionFile)) { - using (StreamReader sr = new StreamReader(stream)) + using (var sr = new StreamReader(stream)) { result = sr.ReadToEnd(); } diff --git a/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/TermbaseIntegrationAction/TermbaseGenerationAction.cs b/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/TermbaseIntegrationAction/TermbaseGenerationAction.cs index 809c3a0d33..d7efbfb2f3 100644 --- a/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/TermbaseIntegrationAction/TermbaseGenerationAction.cs +++ b/ProjectTerms/Sdl.Community.ProjectTerms.Plugin/TermbaseIntegrationAction/TermbaseGenerationAction.cs @@ -6,6 +6,7 @@ using Sdl.Community.ProjectTerms.Plugin.Exceptions; using Sdl.Community.ProjectTerms.Telemetry; using Sdl.Core.Globalization; +using Sdl.Core.Globalization.LanguageRegistry; using Sdl.Desktop.IntegrationApi; using Sdl.Desktop.IntegrationApi.Extensions; using Sdl.MultiTerm.TMO.Interop; @@ -138,7 +139,7 @@ private void IncludeTermbaseInStudio(TermbaseGeneration termbaseCreator, string { foreach (var targetLanguage in targetLanguages.Keys) { - termbaseConfig.LanguageIndexes.Add(new TermbaseLanguageIndex(new Language(CultureInfo.GetCultureInfo(targetLanguages[targetLanguage])), targetLanguage)); + termbaseConfig.LanguageIndexes.Add(new TermbaseLanguageIndex(LanguageRegistryApi.Instance.GetLanguage(CultureInfo.GetCultureInfo(targetLanguages[targetLanguage]).Name), targetLanguage)); } } project.UpdateTermbaseConfiguration(termbaseConfig);