Use ISO codes instead of language IDs for fallback languages and translations (#13751)

* Use language ISO code for language fallback instead of language ID

* Remove language and language ID from dictionary item and dictionary item translation

* ADd unit test for dictionary item translation value extension

* Make the internal service implementations sealed

* Rename translation ISO code to be more explicit in its origin (Language)

* Add breaking changes suppression

* Handle save of invalid fallback iso code

* Fixed test

* Only allow non-UserCustomCulture's

* Fixed and added tests

* Rename ISO code validation method

* Fix language telemetry test (create Swedish with the correct ISO code)

---------

Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Kenn Jacobsen
2023-02-01 09:37:37 +01:00
committed by GitHub
parent 641cae7fb5
commit 8caee5297b
52 changed files with 603 additions and 627 deletions

View File

@@ -132,10 +132,12 @@ public class TelemetryProviderTests : UmbracoIntegrationTest
{
// Arrange
var langTwo = _languageBuilder.WithCultureInfo("da-DK").Build();
var langThree = _languageBuilder.WithCultureInfo("se-SV").Build();
var langThree = _languageBuilder.WithCultureInfo("sv-SE").Build();
await LanguageService.CreateAsync(langTwo);
await LanguageService.CreateAsync(langThree);
var langTwoResult = await LanguageService.CreateAsync(langTwo);
Assert.IsTrue(langTwoResult.Success);
var langThreeResult = await LanguageService.CreateAsync(langThree);
Assert.IsTrue(langThreeResult.Success);
IEnumerable<UsageInformation> result = null;