Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 13 commits into from Feb 1, 2023

Conversation

kjac
Copy link
Contributor

@kjac kjac commented Jan 27, 2023

Prerequisites

  • I have added steps to test this contribution in the description below

Description

As the API is moving away from referencing entities by IDs, it's getting harder and harder to use the language IDs currently exposed for fallback language and translation language identification. This PR refactors those usages so we use language ISO codes as identifiers instead.

The management API contract remains unchanged by these changes, as it is already using ISO codes 😄

However, with these changes applied, the current backoffice is no longer able to set nor display language fallbacks. Dictionary items can still be created and edited as per usual.

Breaking changes ⚠️

This PR introduces breaking changes. Another PR has been created to flag these changes in V11 - see #13753.

Testing this PR

Test this PR by:

  • Creating, editing and deleting languages with and without fallback languages
  • Creating, editing and deleting translations in multiple languages

As a minimum this needs to be tested through the management API (get in touch with @kjac for Postman collections). It would be prudent to test this in the current backoffice as well, to the extend it is possible.

Copy link
Member

@bergmania bergmania left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found a small issue I fixed while testing.

I was able to create languages with an invalid fallback culture. The fallback culture was saved as null.

Now I added now more state in LanguageOperationStatus.

I think this is mainly a Mac Issue (maybe also windows) and It looks like most short iso codes, are faked as valid. For longer codes, it fails like expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants