From d624143179d2c2acd1c1ec137568d9b525c2512c Mon Sep 17 00:00:00 2001 From: Ionel-Cristian Moldovan <66057010+icmoldovan@users.noreply.github.com> Date: Fri, 24 May 2024 13:00:06 +0300 Subject: [PATCH] remove old how to update (#226) --- ...pdate_plugins_to_trados_studio_2022_sr1.md | 122 ---------- ...pdate_plugins_to_trados_studio_2022_sr2.md | 208 ------------------ .../update_plugins_to_Studio2022.md | 135 ------------ articles/toc.yml | 6 - 4 files changed, 471 deletions(-) delete mode 100644 articles/hints_tips/Update_Plugins/how_to_update_plugins_to_trados_studio_2022_sr1.md delete mode 100644 articles/hints_tips/Update_Plugins/how_to_update_plugins_to_trados_studio_2022_sr2.md delete mode 100644 articles/hints_tips/Update_Plugins/update_plugins_to_Studio2022.md diff --git a/articles/hints_tips/Update_Plugins/how_to_update_plugins_to_trados_studio_2022_sr1.md b/articles/hints_tips/Update_Plugins/how_to_update_plugins_to_trados_studio_2022_sr1.md deleted file mode 100644 index 290ad2b68..000000000 --- a/articles/hints_tips/Update_Plugins/how_to_update_plugins_to_trados_studio_2022_sr1.md +++ /dev/null @@ -1,122 +0,0 @@ -# How to update plugins to SR1 - -In an effort to achieve consistent behaviour across a range of platforms and applications, some changes have been made to control the way in which language metadata is used in our software. These changes may affect your plugin or application integration with the public APIs, especially if [Sdl.Core.Globalization.Language](../../../api/core/Sdl.Core.Globalization.Language.yml) referenced in the project. - -The following are a list of changes and known issues to consider when updating your plugin to be compatible with SR1 - -- Plugin Manifest -- Project References -- Language Registry API - -## Plugin Manifest - -The manifest file **pluginpackage.manifest.xml** is located at the root of your project solution. The values of the **RequiredProduct** should be updated to align with the latest release. - -### RequiredProduct - -- Min version should be set to: 17.1. If your plugin has been updated to support this latest release of , then you should reflect this by setting the minimum supported version to 17.1 -- Max version should be set to 17.9. It is recommended to also set this value, as it will provide the AppStore with sufficient information in correctly identifying plugins that are compatible with the version of that is launched. -- Name should be set to: *TradosStudio* - -Example - -```xml - - - My plugin name - 1.1.0.0 - My plugin description - Trados AppStore Team - - -``` - -## Project References -The following changes should be applied in the project file (.csproj) - -- Add a reference to Sdl.Core.Globalization.Async, if your code is making reference to [Sdl.Core.Globalization.Language](../../../api/core/Sdl.Core.Globalization.Language.yml) - -``` xml - - $(MSBuildProgramFiles32)\Trados\Trados Studio\Studio17\Sdl.Core.Globalization.Async.dll - -``` -> [!NOTE] -> -> It is recommended that you use the reserved and well-known MSBuild property **$(MSBuildProgramFiles32) ** as opposed to *$(ProgramFiles)* to define the location of the 32-bit program folder *C:\Program Files (x86)\* - -- To update settings directly in the project file from Visual Studio - - Right-click on the project node in the Solution Explorer and select Unload Project. - - Then, right-click on the project and choose Edit -- Once you have applied your changes in the project file, then reload project - - In the Solution Explorer, select the projects you want to load (press Ctrl while clicking to select more than one project) - - Then right-click on the project and choose Reload Project. - -## Language Registry API -Third party developers now have access to Trados Studio's custom language registry, which offers finer control over language management than the language registry provided by Microsoft. Following this change, [CultureCode] is now the recommended alternative to the standard CultureInfo. - -To ensure compatibility with Studio and other RWS system interfacing with Studio please recover the language info using our internal language registry - -```cs -private CultureCode GetCultureCode(string cultureIsoCode) -{ - try - { - // Language registry contains all the languages that are supported in Studio - var language = LanguageRegistryApi.Instance.GetLanguage(cultureIsoCode); - return new CultureCode(language.CultureInfo); - } - catch (UnsupportedLanguageException) - { - // In case the language is not supported an exception is thrown - return null; - } -} -``` - -Use **LanguageRegistryApi.Instance** to recover all langauges - -```cs -private IList GetAllLanguages() -{ - return LanguageRegistryApi.Instance.GetAllLanguages() -} -``` - -## Known Issues -The following are a list of known issues and solutions that you might encounter depending on your settings and configuration: - -### Trados.Community.Toolkit (formally SDL.Community.Toolkit) -A new version of the Trados Community Toolkit, version 4.1.0, has been released to support the latest version of Trados Studio 2022 SR1. This includes the following assemblies: - -- [Trados.Community.Toolkit.Core](https://www.nuget.org/packages/Trados.Community.Toolkit.Core) -- [Trados.Community.Toolkit.LanguagePlatform](https://www.nuget.org/packages/Trados.Community.Toolkit.LanguagePlatform) -- [Trados.Community.Toolkit.Integration](https://www.nuget.org/packages/Trados.Community.Toolkit.Integration) -- [Trados.Community.Toolkit.FileType](https://www.nuget.org/packages/Trados.Community.Toolkit.FileType) -- [Trados.Community.Toolkit.ProjectAutomation](https://www.nuget.org/packages/Trados.Community.Toolkit.ProjectAutomation) - -### Dependency version changes -There is a list of known dependency version changes that may influence your integration with the latest Trados Studio 2022 APIs; this is typically seen from standalone applications that are running outside of the Trados Studio context. To resolve these references, include the following binding redirects in the configuration file of the project. - -``` xml - - - - - - - - - - - - - - - - - - - - -``` \ No newline at end of file diff --git a/articles/hints_tips/Update_Plugins/how_to_update_plugins_to_trados_studio_2022_sr2.md b/articles/hints_tips/Update_Plugins/how_to_update_plugins_to_trados_studio_2022_sr2.md deleted file mode 100644 index 6aee5037c..000000000 --- a/articles/hints_tips/Update_Plugins/how_to_update_plugins_to_trados_studio_2022_sr2.md +++ /dev/null @@ -1,208 +0,0 @@ -# How to update plugins to SR2 - -There will be significant changes to the Terminology provider API with the release of SR2. These changes are all geared towards decoupling the Multiterm integration from to promote independent development cycles and reduce the risk of compatibility issues. This means that updates, bug fixes, and new features can be developed and released separately and lead to faster development cycles for each product. - -Unfortunately, this will introduce breaking changes for plugin and project automation integrations with the Terminology provider API. The following are a list of changes and known issues to consider when updating your plugin to be compatible with SR2 - -## Terminology Provider API - -Make reference to the [release notes](https://developers.rws.com/studio-api-docs/apiconcepts/releasenotes/tradosstudio2022sr2.html) for SR2 when updating your plugin integrations with the Terminology Provider API. It includes all of the API changes that will facilitate better management, customization, and extensibility of terminology providers, providing more flexibility and control for developers and users. -- **Removed Classes and Interfaces**: Several classes and interfaces have been removed, such as _AbstractTerminologyProvider_, _IDefinition_, _IDefinitionLanguage_, and others. -- **Updated Classes**: Major changes include the Definition class, _Entry_, _EntryField_, _EntryLanguage_, and others. These updates involve changes in property types, constructors, and interfaces. -- **TerminologyProviderManager**: Now implements _ITerminologyProviderManager_, offering new methods for managing terminology providers, such as _RemoveTerminologyProvider_. -- **ITerminologyProvider Updates**: The _ITerminologyProvider_ interface has several new properties and methods for managing active filters, initialization, and more. The type of returned values for methods like _GetEntry_ and _Search_ has changed. -- **New Interfaces**: Several new interfaces have been added, including _ITerminologyProviderManager_, _ITerminologyProviderWinFormsUIWithCreate_, and _ITerminologyProviderWinFormsUIWithEdit_. - -**Note:** A full integration of these new changes to the Terminology Provider API are available from the [IATE Terminology Provider project](https://github.com/RWS/Sdl-Community/tree/master/IATETerminologyProvider) for reference. - -## ITerminologyProvider - -The *AbstractTerminologyProvider* is no longer available & in its place you must implement the *ITerminologyProvider* interface, which has some new properties & methods such as *ActiveFilter* property & associated method *GetFilters()* that enable a user to add filters to restrict the results that provider displays when searching a termbase during translation. - -```cs -public class MyTerminologyProvider : ITerminologyProvider -{ - public FilterDefinition ActiveFilter { get; set; } - - public IList GetFilters() - { - var filterDefinitions = new List(); - var filterDefinition = new FilterDefinition - { ID = 0, Name = "Source contains synonyms" }; - filterDefinitions.Add(filterDefinition); - - return filterDefinitions; - } -} -``` - -### Terminology Provider Type -Set the *Type* to *TerminologyProviderType.Custom* for Third-party terminology providers -```cs -public class MyTerminologyProvider : ITerminologyProvider -{ - public TerminologyProviderType Type => TerminologyProviderType.Custom; -} -``` - -### Definition -Its important to fully describe the *DescriptiveFields* to the *Definition* property of the provider to provide sufficient information when integrating with other services, such as the **Terminology Verifier**. For example: to enable integration with the feature to check for forbidden terms, you should include the *DescriptiveField* at the *TermLevel*, as shown here: - -```cs -public class MyTerminologyProvider : ITerminologyProvider -{ - public Definition Definition => new Definition(GetDescriptiveFields(), - GetDefinitionLanguages()); - - public IList GetDescriptiveFields() - { - var result = new List(); - - var definitionField = new DescriptiveField - { - Label = "Definition", Level = FieldLevel.EntryLevel, - Mandatory = true, Multiple = true, - Type = FieldType.String - }; - result.Add(definitionField); - - var statusField = new DescriptiveField - { - Label = "Status", Level = FieldLevel.TermLevel, - Mandatory = false, Multiple = true, - Type = FieldType.PickList, - PickListValues = - new[] { "Deprecated", "Obsolete", "Admitted", "Preferred", "Proposed" } - }; - result.Add(statusField); - - return result; - } -} -``` -```cs -public IList GetDefinitionLanguages() -{ - var result = new List(); - - var currentProject = SdlTradosStudio.Application?. - GetController()?.CurrentProject; - if (currentProject == null) return result; - - var projectInfo = currentProject.GetProjectInfo(); - - result.Add(new DefinitionLanguage - { - Locale = projectInfo.SourceLanguage.CultureInfo, - Name = projectInfo.SourceLanguage.DisplayName - }); - - result.AddRange( - projectInfo.TargetLanguages.Select(language => new DefinitionLanguage - { - Locale = language.CultureInfo, - Name = language.DisplayName - })); - - return result; -} -``` - -## ITerminologyProviderWinFormsUI - -You will noticed that the property *SupportsEditing* & the method *Edit(IWin32Window owner, ITerminologyProvider terminologyProvider)* have been removed from the *ITerminologyProviderWinFormsUI* interface. If your provider allows a user to edit the provider settings by displaying a settings dialog, then implement the new interface *ITerminologyProviderWinFormsUIWithEdit*. Additionally, the new interface *ITerminologyProviderWinFormsUIWithCreate* introduces a new extensibility point that will display a context menu item in the **Create** button from the Terminology Provider Settings in . This is useful for use cases where the creation of the provider needs to be a separate to the edit settings dialogs. -```cs -[TerminologyProviderWinFormsUI] -public class MyTerminologyProviderWinFormsUI : ITerminologyProviderWinFormsUIWithEdit, - ITerminologyProviderWinFormsUIWithCreate -{ - public ITerminologyProvider Create() - { - // Adds the capability to create a ITerminologyProvider. - // Allows the creation of an ITerminologyProvider from the UI. - // It returns a ITerminologyProvider - return null; - } - - public bool Edit(IWin32Window owner, ITerminologyProvider terminologyProvider) - { - // Adds the capability to edit settings. - // Used to display a dialog to interactively change the provider settings. - return true; - } - - public ITerminologyProvider[] Browse( - IWin32Window owner, ITerminologyProviderCredentialStore credentialStore) - { - // Adds the capability to select a ITerminologyProvider. - // Used to display a dialog to add a new terminology provider. - return null; - } -} -``` - -## Plugin Manifest - -The manifest file **pluginpackage.manifest.xml** is located at the root of your project solution. The values of the **RequiredProduct** should be updated to align with the latest release. - -### RequiredProduct - -- Min version should be set to: 17.2. If your plugin has been updated to support these latest changes to the Terminology Provider API, then you should reflect this by setting the minimum supported version of your plugin to 17.2 -- Max version should be set to 17.9. It is recommended to also set this value, as it will provide the AppStore with sufficient information in correctly identifying plugins that are compatible with the version of that is launched. -- Name should be set to: *TradosStudio* - -Example -```xml - - - My plugin name - 1.1.0.0 - My plugin description - Trados AppStore Team - - -``` - - -## Known Issues -The following are a list of known issues and solutions that you might encounter depending on your settings and configuration: - -### Trados.Community.Toolkit (formally SDL.Community.Toolkit) -A new version of the Trados Community Toolkit, version 4.1.1, has been released to support the latest version of SR2. This includes the following assemblies: - -- [Trados.Community.Toolkit.Core](https://www.nuget.org/packages/Trados.Community.Toolkit.Core) -- [Trados.Community.Toolkit.LanguagePlatform](https://www.nuget.org/packages/Trados.Community.Toolkit.LanguagePlatform) -- [Trados.Community.Toolkit.Integration](https://www.nuget.org/packages/Trados.Community.Toolkit.Integration) -- [Trados.Community.Toolkit.FileType](https://www.nuget.org/packages/Trados.Community.Toolkit.FileType) -- [Trados.Community.Toolkit.ProjectAutomation](https://www.nuget.org/packages/Trados.Community.Toolkit.ProjectAutomation) - -### Dependency version changes -There is a list of known dependency version changes that may influence your integration with the latest SR2 APIs; this is typically seen from standalone applications that are running outside of the context. To resolve these references, include the following binding redirects in the configuration file of the project. - -``` xml - - - - - - - - - - - - - - - - - - - - - - - - - -``` \ No newline at end of file diff --git a/articles/hints_tips/Update_Plugins/update_plugins_to_Studio2022.md b/articles/hints_tips/Update_Plugins/update_plugins_to_Studio2022.md deleted file mode 100644 index bec9e9c72..000000000 --- a/articles/hints_tips/Update_Plugins/update_plugins_to_Studio2022.md +++ /dev/null @@ -1,135 +0,0 @@ -# How to update plugins to - -Plugins built for previous releases of are not compatible with . While the main reason for this is due to the assembly versions increased to align with the latest product release, there are also other breaking changes to take in to consideration. - -The following are a list of changes and known issues to consider when updating your plugin to be compatible with . - -> [!NOTE] -> -> In order to migrate a plugin to be compatible with we need to install: -> .NET Framework *4.8*. It can be installed form https://dotnet.microsoft.com/download/dotnet-framework/net48. After you install the framework a restart is required. - -### How check if the .Net Framework was installed correctly -After restart, you can check if the version was installed correctly using Powershell (opened as Administrator) by typing following command. -```sh -gci ‘HKLM:\SOFTWARE\Microsoft\NET Framework Setup\NDP’ -recurse | gp -name Version -EA 0 | where { $_.PSChildName -match ‘^(?!S)\p{L}’} | select PSChildName, Version -``` -Make sure that version *4.8* is displayed in the list. - - -
- -## Plugin Framework -The latest version of the plugin framework packages should be installed. You can add/update the plugin framework nuget packages in your project via the package manager user interface or console. -### Package Manager UI -* In **Solution Explorer**, right-click **References** and choose **Manage NuGet Packages**. -* Select nuget.org as the **Package source**. -* Search for `Sdl.Core.PluginFramework` from the **Browse** tab. -* Select the package from the list and click **Install** or **Update**. - * `Sdl.Core.PluginFramework`, version _2.1.0_ - * `Sdl.Core.PluginFramework.Build`, version _17.0.0_ -* Accept any license prompts to finnish the installation. - - -
- -## Plugin Manifest - -The manifest file pluginpackage.manifest.xml is located at the root of your project solution. The values of the `RequiredProduct` should be updated to align with the latest release. - -RequiredProduct -* Min version should be set to: _17.0_ -* Max version should be set to _17.9_. It is recommend to also set this value, as it will provide the RWS AppStore with sufficient information in correctly identifying plugins that are compatible with the version of that is launched. -* Name should be set to: _TradosStudio_ - -**Example:** - -~~~xml - - My plugin name - 1.1.0.0 - My plugin description - My author name - - -~~~ - - -
- -## Project References & Deployment Path -The following changes should be applied in the project file (.csproj) - -All references should point to the new installation path *$(ProgramFiles)\Trados\Trados Studio\Studio17*. For example: - -~~~xml - - $(ProgramFiles)\Trados\Trados Studio\Studio17\Sdl.Desktop.IntegrationApi.Extensions.dll - -~~~ - -The plugin deployment path should point to the new location *$(AppData)\Trados\Trados Studio\17\Plugins*. For example: - -~~~xml -$(AppData)\Trados\Trados Studio\17\Plugins -~~~ - -> [!NOTE] -> -> To update settings directly in the project file from Visual Studio -> * Right-click on the project node in the **Solution Explorer** and select **Unload Project**. -> * Then, right-click on the project and choose **Edit** -> -> Once you have applied your changes in the project file, then reload project -> * In the **Solution Explorer**, select the projects you want to load (press **Ctrl** while clicking to select more than one project) -> * Then right-click on the project and choose **Reload Project**. - -
-*** -
- -## Known Issues -The following are a list of known issues and solutions that you might encounter depending on your settings and configuration - -### Project Reference, Private = false issue -We have discovered a new symptom while building plugins with the latest plugin framework against . If the reference option (private = false) is present in the assembly reference of the project, then the plugin will not be built correctly. - -You will noticed that the API extension context is missing from the *.plugin.xml file. This is needed by the desktop platform to recognize and load the plugin in the studio context. - -**Solution** - -Remove this declaration or setting its value to true (default) will resolve the problem. - -**Example** - -The option declaration `False` in the following example should be removed, or set to true - -~~~xml - - False - $(ProgramFiles)\Trados\Trados Studio\17\Sdl.Desktop.IntegrationApi.Extensions.dll - -~~~ - -
- -### Migrate packages.config to PackageReference -If you project is still using a packages.config file to reference the nuget packages, then we need to migrate it to PackageReference from the Visual Studio solution. Right-click on the **packages.config** file from the project solution and select **Migrate packages.config to PackageReference...** from the context menu. - - -
- -### Remove redundant references to the plugin framework -Unload the project from Visual Studio and remove the redundant references to the plugin framework as highlighted underneath: - - -
- -### .NetFramework is higher than the current targeted framework error -Unload the project and search in .csproj file for `TargetFrameworkVersion`. Make sure you have only one `TargetFrameworkVersion` version in the file and is pointing to _v4.8_. For example: - -~~~xml -v4.8 -~~~ -**Note:** If there is a second reference in the file please remove that version. - diff --git a/articles/toc.yml b/articles/toc.yml index c49761ee0..b9d79d7d0 100644 --- a/articles/toc.yml +++ b/articles/toc.yml @@ -26,12 +26,6 @@ href: hints_tips/Studio_Styles/StudioStyles.md - name: How to update plugins to Trados Studio 2024 href: hints_tips/Update_Plugins/how_to_update_plugins_to_trados_studio_2024.md - - name: How to update plugins to Trados Studio 2022 - href: hints_tips/Update_Plugins/update_plugins_to_Studio2022.md - - name: How to update plugins to Trados Studio 2022 SR1 - href: hints_tips/Update_Plugins/how_to_update_plugins_to_trados_studio_2022_sr1.md - - name: How to update plugins to Trados Studio 2022 SR2 - href: hints_tips/Update_Plugins/how_to_update_plugins_to_trados_studio_2022_sr2.md - name: How to implement the Studio Useful Tips service href: hints_tips/UsefulTips/UsefulTipsApiArticle.md