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

@@ -246,7 +246,7 @@ public class ScopedRepositoryTests : UmbracoIntegrationTest
var item = (await dictionaryItemService.CreateAsync(
new DictionaryItem("item-key")
{
Translations = new IDictionaryTranslation[] { new DictionaryTranslation(lang.Id, "item-value") }
Translations = new IDictionaryTranslation[] { new DictionaryTranslation(lang, "item-value") }
})).Result;
// Refresh the keyed cache manually