IBX-3265: Fixed translation of User content objects #63
+35
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Looks like translating User content objects was never working properly. Architecture of Content editing forms is very limiting thus the solution is not perfect. It required a few steps to fix the issue:
User
object with incorrect language was passed toUserUpdateMapper
which prevented displaying an editing formFieldValueValidator
was defined as data constraint which had to be changed to form constraint in order to provide more context to the validator. Intuitively you'd use validation groups here but it isn't possible with how we dynamically map fields. Right now the form will defineFieldValue
constraint withintent
option passed as payload. Then the validator itself can detect wether it should skip validation on nontranslatable fieldtypes.Content
object to checkmainLanguageCode
.