Skip to content

Commit

Permalink
Microsoft Translator 2.0.3.0 - SDLCOM-6254: Added "Ocp-Apim-Subscript…
Browse files Browse the repository at this point in the history
…ion-Region" header
  • Loading branch information
ealbu committed Oct 9, 2024
1 parent 46de0b8 commit 2f21c5b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions MicrosoftTranslatorProvider/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public static class Constants
public const string MicrosoftNaming_FullName = "Microsoft Translator Provider";
public const string MicrosoftTranslatorString = "Microsoft Translator";
public const string OcpApimSubscriptionKeyHeader = "Ocp-Apim-Subscription-Key";
public const string OcpApimSubscriptionRegionHeader = "Ocp-Apim-Subscription-Region";

public const string TellMe_StoreUrl = "https://appstore.rws.com/plugin/179/";
public const string TellMe_HelpUrl = "https://community.rws.com/product-groups/trados-portfolio/rws-appstore/w/wiki/6546/microsoft-machine-translation-provider";
Expand Down
2 changes: 1 addition & 1 deletion MicrosoftTranslatorProvider/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.2.0")]
[assembly: AssemblyFileVersion("2.0.3.0")]
1 change: 1 addition & 0 deletions MicrosoftTranslatorProvider/Service/MicrosoftService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static async Task<bool> AuthenticateUser(MicrosoftCredentials credentials
request.Method = HttpMethod.Post;
request.RequestUri = uri;
request.Headers.TryAddWithoutValidation(Constants.OcpApimSubscriptionKeyHeader, credentials.APIKey);
request.Headers.TryAddWithoutValidation(Constants.OcpApimSubscriptionRegionHeader, credentials.Region);

var response = await httpClient.SendAsync(request);
response.EnsureSuccessStatusCode();
Expand Down
2 changes: 1 addition & 1 deletion MicrosoftTranslatorProvider/pluginpackage.manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<PluginPackage xmlns="http://www.sdl.com/Plugins/PluginPackage/1.0">
<PlugInName>Microsoft Translator Provider</PlugInName>
<Version>2.0.2.0</Version>
<Version>2.0.3.0</Version>
<Description>Microsoft Translator Provider</Description>
<Author>Trados AppStore Team</Author>
<RequiredProduct name="TradosStudio" minversion="18.0" maxversion="18.9" />
Expand Down

0 comments on commit 2f21c5b

Please sign in to comment.