diff --git a/src/contentful/CareLeavers.ContentfulMigration/CareLeavers.ContentfulMigration.csproj b/src/contentful/CareLeavers.ContentfulMigration/CareLeavers.ContentfulMigration.csproj
index 154c1fb7..013cb2d6 100644
--- a/src/contentful/CareLeavers.ContentfulMigration/CareLeavers.ContentfulMigration.csproj
+++ b/src/contentful/CareLeavers.ContentfulMigration/CareLeavers.ContentfulMigration.csproj
@@ -11,11 +11,11 @@
-
-
-
-
-
+
+
+
+
+
diff --git a/src/contentful/CareLeavers.ContentfulMigration/packages.lock.json b/src/contentful/CareLeavers.ContentfulMigration/packages.lock.json
index 3f4043df..7efc4ee2 100644
--- a/src/contentful/CareLeavers.ContentfulMigration/packages.lock.json
+++ b/src/contentful/CareLeavers.ContentfulMigration/packages.lock.json
@@ -14,56 +14,56 @@
},
"Microsoft.Extensions.Configuration": {
"type": "Direct",
- "requested": "[9.0.15, )",
- "resolved": "9.0.15",
- "contentHash": "qxlTxFw69SHEljR49rJ1PPZn2Z/uqEixCb2vFE77BaX1CSyt+6aHvCOfj1LD7kXtKwxxrBaJBgLdu19c8jipLg==",
+ "requested": "[9.0.16, )",
+ "resolved": "9.0.16",
+ "contentHash": "QetFHhyFfoKjFeZCHl2gLrMFzTfMpy/F805+gYKnZjonG/QvHJNHiP1M8wlziHYqI8qsG/1B8gX6lAUivj202g==",
"dependencies": {
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.15",
- "Microsoft.Extensions.Primitives": "9.0.15"
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.16",
+ "Microsoft.Extensions.Primitives": "9.0.16"
}
},
"Microsoft.Extensions.Configuration.Binder": {
"type": "Direct",
- "requested": "[9.0.15, )",
- "resolved": "9.0.15",
- "contentHash": "6hOTcdyGlJBBHl1DqbnvqSbHsJp814r5HMXGkTH1Jg6IosqwqZhh00/UCUJ0oXrACO096wWuCMfKMIPbnMGWIQ==",
+ "requested": "[9.0.16, )",
+ "resolved": "9.0.16",
+ "contentHash": "TCDQP8lhJJ2tCINCrgwSzfTPVAHSemXj+awfkY1n6F1qxuojz0kQlUId/21qfN02cosyHHb0fQlJtaJyYn1VYw==",
"dependencies": {
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.15"
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.16"
}
},
"Microsoft.Extensions.Configuration.EnvironmentVariables": {
"type": "Direct",
- "requested": "[9.0.15, )",
- "resolved": "9.0.15",
- "contentHash": "5laaPT77pVbLlj2vZklHhvapPcG2hXmRAM04OtDdhZv9dDfibm5NLYq81M7/W3JgVqdRl7TL4CxM1+0qduQi4Q==",
+ "requested": "[9.0.16, )",
+ "resolved": "9.0.16",
+ "contentHash": "cuZm5fbFVbe3ylEXV43IhJcsUZ0jhdh7Km9F0AMuYSyfjPNeJItzTlNxQdts4Y0LjfNl7cIFEEkJ13zJmXC8iA==",
"dependencies": {
- "Microsoft.Extensions.Configuration": "9.0.15",
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.15"
+ "Microsoft.Extensions.Configuration": "9.0.16",
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.16"
}
},
"Microsoft.Extensions.Configuration.Json": {
"type": "Direct",
- "requested": "[9.0.15, )",
- "resolved": "9.0.15",
- "contentHash": "rZidIJ2FOyOUPlXwgsdVP2BeAr0CTxzHA21wZoCVhMZx08bMkGvuJGIjDswNh1LmEwPLmEf/E9LOigT3EpKMGA==",
+ "requested": "[9.0.16, )",
+ "resolved": "9.0.16",
+ "contentHash": "vuuJyt3Ic262mpZxDcR5/LHmswQ68OcqKp+lS96nrWEHdxJ6NCtmouNoT136Ea06/l5Lat5KzC05JRGSJIN+ow==",
"dependencies": {
- "Microsoft.Extensions.Configuration": "9.0.15",
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.15",
- "Microsoft.Extensions.Configuration.FileExtensions": "9.0.15",
- "Microsoft.Extensions.FileProviders.Abstractions": "9.0.15",
- "System.Text.Json": "9.0.15"
+ "Microsoft.Extensions.Configuration": "9.0.16",
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.16",
+ "Microsoft.Extensions.Configuration.FileExtensions": "9.0.16",
+ "Microsoft.Extensions.FileProviders.Abstractions": "9.0.16",
+ "System.Text.Json": "9.0.16"
}
},
"Microsoft.Extensions.Configuration.UserSecrets": {
"type": "Direct",
- "requested": "[9.0.15, )",
- "resolved": "9.0.15",
- "contentHash": "z+uJopcjxkfu6ywNBcOm2gGXwne/q+LTL/6z5MEol0pCmQ+gH5nIU00SZZGCR14vbW33z3M3HLVvfoKEjsORmQ==",
+ "requested": "[9.0.16, )",
+ "resolved": "9.0.16",
+ "contentHash": "+roFrhfQW7V/AufiXHIJz9lcH9NUnaqVYXxpongLcsuOtT0BJAMFwbmQ+T7D9QhUctoxE0O/O+1myrTdX80eqA==",
"dependencies": {
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.15",
- "Microsoft.Extensions.Configuration.Json": "9.0.15",
- "Microsoft.Extensions.FileProviders.Abstractions": "9.0.15",
- "Microsoft.Extensions.FileProviders.Physical": "9.0.15"
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.16",
+ "Microsoft.Extensions.Configuration.Json": "9.0.16",
+ "Microsoft.Extensions.FileProviders.Abstractions": "9.0.16",
+ "Microsoft.Extensions.FileProviders.Physical": "9.0.16"
}
},
"Microsoft.CSharp": {
@@ -73,51 +73,51 @@
},
"Microsoft.Extensions.Configuration.Abstractions": {
"type": "Transitive",
- "resolved": "9.0.15",
- "contentHash": "M9s2mDxtfNdS6SbemODzDxHgm+eIhZPSuTc0s0QazQoSceTXTv+OjthKqf8r/FehXtABXD01ijQNdtODDFtnxg==",
+ "resolved": "9.0.16",
+ "contentHash": "+Hgfx2NC+lLG7S47DxhASWp9bbCuEPyzO7s/JTJ9DLc0QXpFTBdJVQouoHaqqQCOD+78k+Np+/cSaQdqrhrf5g==",
"dependencies": {
- "Microsoft.Extensions.Primitives": "9.0.15"
+ "Microsoft.Extensions.Primitives": "9.0.16"
}
},
"Microsoft.Extensions.Configuration.FileExtensions": {
"type": "Transitive",
- "resolved": "9.0.15",
- "contentHash": "HtxlK3nOdSt/AInMnTFbvg6tToOMXmsl+jZ6g6pYjzDhlfeQZksE/yKS8YG14yzvtgIFTUkh95qZ+UCqqguxSQ==",
+ "resolved": "9.0.16",
+ "contentHash": "Pyk9/H+V7PSibfJgu0yEWi9wwunct5I1XMUNsvLyOH5aH5hJL07deJBY5Q+h9zatl+Uw6us+34c4az/x3Z0oRA==",
"dependencies": {
- "Microsoft.Extensions.Configuration": "9.0.15",
- "Microsoft.Extensions.Configuration.Abstractions": "9.0.15",
- "Microsoft.Extensions.FileProviders.Abstractions": "9.0.15",
- "Microsoft.Extensions.FileProviders.Physical": "9.0.15",
- "Microsoft.Extensions.Primitives": "9.0.15"
+ "Microsoft.Extensions.Configuration": "9.0.16",
+ "Microsoft.Extensions.Configuration.Abstractions": "9.0.16",
+ "Microsoft.Extensions.FileProviders.Abstractions": "9.0.16",
+ "Microsoft.Extensions.FileProviders.Physical": "9.0.16",
+ "Microsoft.Extensions.Primitives": "9.0.16"
}
},
"Microsoft.Extensions.FileProviders.Abstractions": {
"type": "Transitive",
- "resolved": "9.0.15",
- "contentHash": "yzWilnNU/MvHINapPhY6iFAeApZnhToXbEBplORucn01hFc1F6ZaKt0V9dHYpUMun8WR9cSnq1ky35FWREVZbA==",
+ "resolved": "9.0.16",
+ "contentHash": "/YLSWDs+p0Y4+UGPoWI3uUNq7R5/f/8zw8XeViuhfSTGnPowoqbllBE9aR4TteFgNfIH4IHkhUwSlhMLB0aL8g==",
"dependencies": {
- "Microsoft.Extensions.Primitives": "9.0.15"
+ "Microsoft.Extensions.Primitives": "9.0.16"
}
},
"Microsoft.Extensions.FileProviders.Physical": {
"type": "Transitive",
- "resolved": "9.0.15",
- "contentHash": "iFT4OZXDitw6IHkQTE7G//UZAKIPS14wuM6aVZTlfzVvR6PdICnL3f2OKayu2nEamE5XBzpvUKcOT0xOX93eBA==",
+ "resolved": "9.0.16",
+ "contentHash": "jRD7Q/gUMwcd3qhjv+j72apkLhxV0bci1AiqUVAZ9Cy53XgZG1Qwy4/MVxUN4xh8F0L/J8UP0l4+FLnhfZnJ7A==",
"dependencies": {
- "Microsoft.Extensions.FileProviders.Abstractions": "9.0.15",
- "Microsoft.Extensions.FileSystemGlobbing": "9.0.15",
- "Microsoft.Extensions.Primitives": "9.0.15"
+ "Microsoft.Extensions.FileProviders.Abstractions": "9.0.16",
+ "Microsoft.Extensions.FileSystemGlobbing": "9.0.16",
+ "Microsoft.Extensions.Primitives": "9.0.16"
}
},
"Microsoft.Extensions.FileSystemGlobbing": {
"type": "Transitive",
- "resolved": "9.0.15",
- "contentHash": "zr0KtzBYm8f8pD3jLNlg9jy/8K9p9z9rCZebRJmQ0nWAikNwHVx2zc5MbDt88bctC8gc8jtqGhy/e7TFNW3gOg=="
+ "resolved": "9.0.16",
+ "contentHash": "e+DBK3rmeR4UUUprclszcOu1b6KB6sVpyw2fL7WQLSEt2D29NMFZpEa+2VeFzZWm7IAou7ELBq67LtWs6H6CXQ=="
},
"Microsoft.Extensions.Primitives": {
"type": "Transitive",
- "resolved": "9.0.15",
- "contentHash": "WRPJ9kpIwsOcghRT0tduIqiz7CDv7WsnL4kTJavtHS4j5AW++4LlR63oOSTL2o/zLR4T1z0/FQMgrnsPJ5bpQQ=="
+ "resolved": "9.0.16",
+ "contentHash": "w5RE1MR0lnAElsRJaFd2POIXl/H62aBKmfX8ibYmRmbk0JB9V/9jR0VD5NxiP1ETWpnDAnPguTSe7fF/FdsHEQ=="
},
"Newtonsoft.Json": {
"type": "Transitive",
@@ -126,21 +126,21 @@
},
"System.IO.Pipelines": {
"type": "Transitive",
- "resolved": "9.0.15",
- "contentHash": "oPtlPToTsvPCPKWglEzoBvyAOAkebDNSIZeEda2z4wVGji1BV1+1NVqLrceMXRUY8yrXzi8cqrOwaWRq4XEBxg=="
+ "resolved": "9.0.16",
+ "contentHash": "wULNihoFgu6JMzwxSbvG2fYtp8h3dxM8aIzcvQv535aMRECy+c3b8YL5m/36vwETPOcRJjyIN8SASTITdm8JZg=="
},
"System.Text.Encodings.Web": {
"type": "Transitive",
- "resolved": "9.0.15",
- "contentHash": "EPjnxVcoecQEtdsFMlLW2yh/NdqhMny4CV6Y5dHeDZXyOxVQOnmmifIoDCcQfcx+5kqNTQ27xJDNFYPcuaKiEw=="
+ "resolved": "9.0.16",
+ "contentHash": "860BMNxGLHCc8QWHb+ERfDgzEIsRk3GXZnWYMyMmynuFNAoabHhWSWBElPbzI839MBf+hUJWADp/1rLH1+/2Eg=="
},
"System.Text.Json": {
"type": "Transitive",
- "resolved": "9.0.15",
- "contentHash": "rQUurOZYEo81Cvq253gO4FTDO9r+RBUBQVI3q7qwS31SH1wtUfP+Aw23I81ZkFSUBC4f1hPqea0wxo15rR5/dA==",
+ "resolved": "9.0.16",
+ "contentHash": "BgvJQq4uc6jOiiuZ/5LTxrZ+hXTmnm/Q/Sq9/RM2LtBqY8YSA7UB8NgF6j0ZdqWrfvk9Z8AfwV+WMTONIOXESw==",
"dependencies": {
- "System.IO.Pipelines": "9.0.15",
- "System.Text.Encodings.Web": "9.0.15"
+ "System.IO.Pipelines": "9.0.16",
+ "System.Text.Encodings.Web": "9.0.16"
}
}
}
diff --git a/src/web/CareLeavers.Web/CareLeavers.Web.csproj b/src/web/CareLeavers.Web/CareLeavers.Web.csproj
index a1aa5c0f..489c353d 100644
--- a/src/web/CareLeavers.Web/CareLeavers.Web.csproj
+++ b/src/web/CareLeavers.Web/CareLeavers.Web.csproj
@@ -20,8 +20,8 @@
-
-
+
+
@@ -29,7 +29,7 @@
-
+
diff --git a/src/web/CareLeavers.Web/Translation/AzureTranslationService.cs b/src/web/CareLeavers.Web/Translation/AzureTranslationService.cs
index dc67b809..c8a16acc 100644
--- a/src/web/CareLeavers.Web/Translation/AzureTranslationService.cs
+++ b/src/web/CareLeavers.Web/Translation/AzureTranslationService.cs
@@ -1,4 +1,5 @@
using System.Text;
+using Azure;
using Azure.AI.Translation.Document;
using Azure.AI.Translation.Text;
using CareLeavers.Web.Configuration;
@@ -27,14 +28,10 @@ public class AzureTranslationService(
return await TranslateDocument(html, language.Code);
}
- var translateOptions = new TextTranslationTranslateOptions(toLanguage, html)
- {
- TextType = TextType.Html
- };
-
- var response = await azureTranslationClient.TranslateAsync(translateOptions);
+ Response>? response =
+ await azureTranslationClient.TranslateAsync(toLanguage, html, "en");
- return response.Value.FirstOrDefault()?.Translations.FirstOrDefault()?.Text;
+ return response.HasValue ? response.Value[0].Translations[0].Text : null;
}
private async Task TranslateDocument(string html, string language)
diff --git a/src/web/CareLeavers.Web/packages.lock.json b/src/web/CareLeavers.Web/packages.lock.json
index 3cbad7b6..178df431 100644
--- a/src/web/CareLeavers.Web/packages.lock.json
+++ b/src/web/CareLeavers.Web/packages.lock.json
@@ -14,27 +14,25 @@
},
"Azure.AI.Translation.Text": {
"type": "Direct",
- "requested": "[1.0.0, )",
- "resolved": "1.0.0",
- "contentHash": "1NuUYXydLzlJH8NXuq3SIBvCJ1VDSXJym0BA24bFWkLMDluYQaS4pwmrVyEfTqFmqO1fqzAxP87RMqH+zWdr4Q==",
+ "requested": "[2.0.0, )",
+ "resolved": "2.0.0",
+ "contentHash": "v0U87B7PkjvxppAVWSMZSDshTB1uPBR6nPcdGWrhzUW/v9RG5sP7QdjxJtyJtHVzrUmY9lM8Y2T2mO7KAAXBpQ==",
"dependencies": {
- "Azure.Core": "1.39.0",
- "System.ClientModel": "1.0.0",
- "System.Text.Json": "4.7.2"
+ "Azure.Core": "1.57.0"
}
},
"Azure.Core": {
"type": "Direct",
- "requested": "[1.55.0, )",
- "resolved": "1.55.0",
- "contentHash": "c7femvYS/xEUrLP1sNZN+DoQZmx3X+G3ZXtOOz0RL/7cGMCM3JVqepVmRd3AwM4IK8AtTGS4GOigCO+d/zaSsQ==",
+ "requested": "[1.57.0, )",
+ "resolved": "1.57.0",
+ "contentHash": "POStMP+rxaAEYScwGBpIUcnEpSj/3ctYmCmt2IqU3recuAjjddEgTq4q4TLImEdQCfsFr/HpEuYjiY/wKeAprQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "10.0.3",
"Microsoft.Extensions.Configuration.Abstractions": "10.0.3",
"Microsoft.Extensions.Hosting.Abstractions": "10.0.3",
"Microsoft.Identity.Client": "4.83.1",
"Microsoft.Identity.Client.Extensions.Msal": "4.83.1",
- "System.ClientModel": "1.11.0",
+ "System.ClientModel": "1.13.0",
"System.Diagnostics.DiagnosticSource": "10.0.3",
"System.Memory.Data": "10.0.3",
"System.Text.Encodings.Web": "10.0.3",
@@ -120,13 +118,13 @@
},
"Microsoft.Extensions.Caching.StackExchangeRedis": {
"type": "Direct",
- "requested": "[9.0.15, )",
- "resolved": "9.0.15",
- "contentHash": "A6cPl6wUW4wLOl03kqVzFYOzMVpFlOOjK5czvpYoqMMJgx3guzbyaugkeLmLfT5Vv2HXPkvBebxRgylgkkGuSg==",
+ "requested": "[9.0.16, )",
+ "resolved": "9.0.16",
+ "contentHash": "cW/17J/3KoCY2JhrWuS/R6wLIDUJHRs4DWXriACdfWRH7arXChcMleWDj5YMCrK5Lw4pQi4Ac10ZAM01nozSSg==",
"dependencies": {
- "Microsoft.Extensions.Caching.Abstractions": "9.0.15",
- "Microsoft.Extensions.Logging.Abstractions": "9.0.15",
- "Microsoft.Extensions.Options": "9.0.15",
+ "Microsoft.Extensions.Caching.Abstractions": "9.0.16",
+ "Microsoft.Extensions.Logging.Abstractions": "9.0.16",
+ "Microsoft.Extensions.Options": "9.0.16",
"StackExchange.Redis": "2.7.27"
}
},
@@ -1243,8 +1241,8 @@
},
"System.ClientModel": {
"type": "Transitive",
- "resolved": "1.11.0",
- "contentHash": "1Wl32zh7TbvN+HAO8NqDuaN0Ao2Qu/0j0NJSrXGDtpUQsTXQYJ3C6hd9/Ds2IrgP4agMQYFoXB35GZfC21ByHw==",
+ "resolved": "1.13.0",
+ "contentHash": "UneZiqYV3vmsCQJ2bO3fEzSGqK84kxEOOLN0OGDxxhAzef91gZLBQ5J8tgP0oTuwYmUSvwXGzvuq3Cvkedv8tA==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "10.0.3",
"Microsoft.Extensions.Hosting.Abstractions": "10.0.3",
diff --git a/src/web/tests/CareLeavers.Integration.Tests/CareLeavers.Integration.Tests.csproj b/src/web/tests/CareLeavers.Integration.Tests/CareLeavers.Integration.Tests.csproj
index 3f4dd4c7..3f3a4db8 100644
--- a/src/web/tests/CareLeavers.Integration.Tests/CareLeavers.Integration.Tests.csproj
+++ b/src/web/tests/CareLeavers.Integration.Tests/CareLeavers.Integration.Tests.csproj
@@ -11,16 +11,16 @@
-
+
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/web/tests/CareLeavers.Integration.Tests/packages.lock.json b/src/web/tests/CareLeavers.Integration.Tests/packages.lock.json
index c7e5b864..ba93067f 100644
--- a/src/web/tests/CareLeavers.Integration.Tests/packages.lock.json
+++ b/src/web/tests/CareLeavers.Integration.Tests/packages.lock.json
@@ -10,17 +10,17 @@
},
"coverlet.collector": {
"type": "Direct",
- "requested": "[10.0.0, )",
- "resolved": "10.0.0",
- "contentHash": "WFejCcOUR6k8UYyDnnR6Gk+obFYMsWrZuNqPJnsVFGVhpPSN0y20D4qbdKJnXinYGx9PQ397Hf9TnU1NBST8vA=="
+ "requested": "[10.0.1, )",
+ "resolved": "10.0.1",
+ "contentHash": "27jXSV/0DbVqF5jDrAxuQFZ9oaz6gmG03p8ttxAFk+X0M4woFYj7MoWDLCna5EGLb0CE6OE7X6ZH3Wt5smTtaA=="
},
"Microsoft.AspNetCore.Mvc.Testing": {
"type": "Direct",
- "requested": "[8.0.26, )",
- "resolved": "8.0.26",
- "contentHash": "TL+eef1mCEaIxviW5bXie65TitRUZvCES/Wor7u0/quRhhLxM3bNVYaGqL3fc9hsbZVQm283tggxpYV8JW80xw==",
+ "requested": "[8.0.27, )",
+ "resolved": "8.0.27",
+ "contentHash": "rRAs2gY2V//mOwhEJgWScEvIcVVT7EgOWVnxQshjdvjSk8z3XoyCVA68M8xRB1vrJymTgksfJGieeFJP9e2Q7w==",
"dependencies": {
- "Microsoft.AspNetCore.TestHost": "8.0.26",
+ "Microsoft.AspNetCore.TestHost": "8.0.27",
"Microsoft.Extensions.DependencyModel": "8.0.2",
"Microsoft.Extensions.Hosting": "8.0.1"
}
@@ -46,9 +46,9 @@
},
"NUnit": {
"type": "Direct",
- "requested": "[4.6.0, )",
- "resolved": "4.6.0",
- "contentHash": "RsafbuYR+HzdDhgfdLYrDOSuFdv8IgGpbe5NIqXWAhZ7t6lXNj9yNcLcAk34lKVio6OusBQolKlboyl/9hObNA=="
+ "requested": "[4.6.1, )",
+ "resolved": "4.6.1",
+ "contentHash": "xS4+YaBFUv1r8bcAbjitSfYaRZGfMwUiMdiaRziBXZpKgVxKDSHhjUn0mV5mObHGZRZq6eNa+WFWr3g8grj66A=="
},
"NUnit.Analyzers": {
"type": "Direct",
@@ -83,25 +83,23 @@
},
"Azure.AI.Translation.Text": {
"type": "Transitive",
- "resolved": "1.0.0",
- "contentHash": "1NuUYXydLzlJH8NXuq3SIBvCJ1VDSXJym0BA24bFWkLMDluYQaS4pwmrVyEfTqFmqO1fqzAxP87RMqH+zWdr4Q==",
+ "resolved": "2.0.0",
+ "contentHash": "v0U87B7PkjvxppAVWSMZSDshTB1uPBR6nPcdGWrhzUW/v9RG5sP7QdjxJtyJtHVzrUmY9lM8Y2T2mO7KAAXBpQ==",
"dependencies": {
- "Azure.Core": "1.39.0",
- "System.ClientModel": "1.0.0",
- "System.Text.Json": "4.7.2"
+ "Azure.Core": "1.57.0"
}
},
"Azure.Core": {
"type": "Transitive",
- "resolved": "1.55.0",
- "contentHash": "c7femvYS/xEUrLP1sNZN+DoQZmx3X+G3ZXtOOz0RL/7cGMCM3JVqepVmRd3AwM4IK8AtTGS4GOigCO+d/zaSsQ==",
+ "resolved": "1.57.0",
+ "contentHash": "POStMP+rxaAEYScwGBpIUcnEpSj/3ctYmCmt2IqU3recuAjjddEgTq4q4TLImEdQCfsFr/HpEuYjiY/wKeAprQ==",
"dependencies": {
"Microsoft.Bcl.AsyncInterfaces": "10.0.3",
"Microsoft.Extensions.Configuration.Abstractions": "10.0.3",
"Microsoft.Extensions.Hosting.Abstractions": "10.0.3",
"Microsoft.Identity.Client": "4.83.1",
"Microsoft.Identity.Client.Extensions.Msal": "4.83.1",
- "System.ClientModel": "1.11.0",
+ "System.ClientModel": "1.13.0",
"System.Diagnostics.DiagnosticSource": "10.0.3",
"System.Memory.Data": "10.0.3",
"System.Text.Encodings.Web": "10.0.3",
@@ -501,8 +499,8 @@
},
"Microsoft.AspNetCore.TestHost": {
"type": "Transitive",
- "resolved": "8.0.26",
- "contentHash": "IisB39TXuanDkmFpNKK7DSpwFJ2eQq1uL5pMEp3owHu8bMX7YP6bs+y2q7hLd9hQH3LQgLKwV9/ALp4IQaBlbg==",
+ "resolved": "8.0.27",
+ "contentHash": "qsPVul3TnViYzInVZUvCeRt7Xvpi7D3MrScjMshJ4WGboy3Xt/aq8TX2QzUyAZn/ncDmPpR8lPCPBI0U74/Ttg==",
"dependencies": {
"System.IO.Pipelines": "8.0.0"
}
@@ -632,12 +630,12 @@
},
"Microsoft.Extensions.Caching.StackExchangeRedis": {
"type": "Transitive",
- "resolved": "9.0.15",
- "contentHash": "A6cPl6wUW4wLOl03kqVzFYOzMVpFlOOjK5czvpYoqMMJgx3guzbyaugkeLmLfT5Vv2HXPkvBebxRgylgkkGuSg==",
+ "resolved": "9.0.16",
+ "contentHash": "cW/17J/3KoCY2JhrWuS/R6wLIDUJHRs4DWXriACdfWRH7arXChcMleWDj5YMCrK5Lw4pQi4Ac10ZAM01nozSSg==",
"dependencies": {
- "Microsoft.Extensions.Caching.Abstractions": "9.0.15",
- "Microsoft.Extensions.Logging.Abstractions": "9.0.15",
- "Microsoft.Extensions.Options": "9.0.15",
+ "Microsoft.Extensions.Caching.Abstractions": "9.0.16",
+ "Microsoft.Extensions.Logging.Abstractions": "9.0.16",
+ "Microsoft.Extensions.Options": "9.0.16",
"StackExchange.Redis": "2.7.27"
}
},
@@ -1464,8 +1462,8 @@
},
"System.ClientModel": {
"type": "Transitive",
- "resolved": "1.11.0",
- "contentHash": "1Wl32zh7TbvN+HAO8NqDuaN0Ao2Qu/0j0NJSrXGDtpUQsTXQYJ3C6hd9/Ds2IrgP4agMQYFoXB35GZfC21ByHw==",
+ "resolved": "1.13.0",
+ "contentHash": "UneZiqYV3vmsCQJ2bO3fEzSGqK84kxEOOLN0OGDxxhAzef91gZLBQ5J8tgP0oTuwYmUSvwXGzvuq3Cvkedv8tA==",
"dependencies": {
"Microsoft.Extensions.Configuration.Abstractions": "10.0.3",
"Microsoft.Extensions.Hosting.Abstractions": "10.0.3",
@@ -2475,15 +2473,15 @@
"type": "Project",
"dependencies": {
"Azure.AI.Translation.Document": "[2.0.0, )",
- "Azure.AI.Translation.Text": "[1.0.0, )",
- "Azure.Core": "[1.55.0, )",
+ "Azure.AI.Translation.Text": "[2.0.0, )",
+ "Azure.Core": "[1.57.0, )",
"Azure.Monitor.OpenTelemetry.AspNetCore": "[1.5.0, )",
"Azure.Storage.Blobs": "[12.28.0, )",
"HtmlAgilityPack": "[1.12.4, )",
"Joonasw.AspNetCore.SecurityHeaders": "[6.0.0, )",
"Microsoft.ApplicationInsights": "[2.23.0, )",
"Microsoft.Extensions.Azure": "[1.14.0, )",
- "Microsoft.Extensions.Caching.StackExchangeRedis": "[9.0.15, )",
+ "Microsoft.Extensions.Caching.StackExchangeRedis": "[9.0.16, )",
"OpenTelemetry.Api": "[1.15.3, )",
"OpenTelemetry.Extensions.Hosting": "[1.15.3, )",
"OpenTelemetry.Instrumentation.AspNetCore": "[1.15.2, )",
diff --git a/src/web/tests/CareLeavers.Web.Tests/CareLeavers.Web.Tests.csproj b/src/web/tests/CareLeavers.Web.Tests/CareLeavers.Web.Tests.csproj
index 52a8afc5..0079379c 100644
--- a/src/web/tests/CareLeavers.Web.Tests/CareLeavers.Web.Tests.csproj
+++ b/src/web/tests/CareLeavers.Web.Tests/CareLeavers.Web.Tests.csproj
@@ -12,13 +12,13 @@
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive
diff --git a/src/web/tests/CareLeavers.Web.Tests/Translation/AzureTranslationServiceTests.cs b/src/web/tests/CareLeavers.Web.Tests/Translation/AzureTranslationServiceTests.cs
index c85a9475..3648c0af 100644
--- a/src/web/tests/CareLeavers.Web.Tests/Translation/AzureTranslationServiceTests.cs
+++ b/src/web/tests/CareLeavers.Web.Tests/Translation/AzureTranslationServiceTests.cs
@@ -88,14 +88,13 @@ public async Task TranslateHtml_WhenHtmlIsRegularLength_Returns_Translated_Html(
await _fusionCache.SetAsync("translation:supported-languages",
new List { new() { Code = languageCode } });
- _textTranslationClientMock.TranslateAsync(Arg.Any())
- .Returns(Response.FromValue>(new List
+ _textTranslationClientMock.TranslateAsync(Arg.Any(), Arg.Any(), Arg.Any()).Returns(
+ Response.FromValue>(new List
{
- AITranslationTextModelFactory.TranslatedTextItem(
+ TranslationTextModelFactory.TranslatedTextItem(
translations:
[
- AITranslationTextModelFactory.TranslationText(targetLanguage: languageCode,
- text: translation)
+ TranslationTextModelFactory.TranslationText(languageCode, text: translation)
])
},
new ResponseMock()));
@@ -111,7 +110,7 @@ public async Task TranslateHtml_WhenLanguageCodeIsUnsupported_Returns_English()
{
const string html = "Test
";
- await _fusionCache.SetAsync("translation:supported-languages",
+ await _fusionCache.SetAsync("translation:supported-languages",
new List { new() { Code = "ZZ" } });
string? result = await _azureTranslationService.TranslateHtml(html, "Invalid");
@@ -160,13 +159,17 @@ public async Task GetLanguages_Returns_Languages_From_Azure_Minus_Excluded()
};
_contentfulConfigurationMock.GetConfiguration().Returns(config);
- GetSupportedLanguagesResult? azureLanguages = AITranslationTextModelFactory.GetSupportedLanguagesResult(
+ GetSupportedLanguagesResult? azureLanguages = TranslationTextModelFactory.GetSupportedLanguagesResult(
translation: new Dictionary
{
- { "en", AITranslationTextModelFactory.TranslationLanguage("English", "English") },
- { "sv", AITranslationTextModelFactory.TranslationLanguage("Swedish", "Svenska") },
- { "fr", AITranslationTextModelFactory.TranslationLanguage("French", "Francais") },
- { "ar", AITranslationTextModelFactory.TranslationLanguage("Arabic", "Arabic", LanguageDirectionality.RightToLeft) }
+ { "en", TranslationTextModelFactory.TranslationLanguage("English", "English") },
+ { "sv", TranslationTextModelFactory.TranslationLanguage("Swedish", "Svenska") },
+ { "fr", TranslationTextModelFactory.TranslationLanguage("French", "Francais") },
+ {
+ "ar",
+ TranslationTextModelFactory.TranslationLanguage("Arabic", "Arabic",
+ LanguageDirectionality.RightToLeft)
+ }
});
_textTranslationClientMock.GetSupportedLanguagesAsync(cancellationToken: Arg.Any())