EXPERIMENTAL: Add support for mireo repeatable fields #82
Draft
gradinarufelix wants to merge 3 commits into2.0from
Draft
EXPERIMENTAL: Add support for mireo repeatable fields #82gradinarufelix wants to merge 3 commits into2.0from
gradinarufelix wants to merge 3 commits into2.0from
Conversation
956ad37 to
df0ee04
Compare
Introduces translation support for repeatable properties (e.g. JSON arrays) that contain translatable sub-properties. Changes: - Add TranslatableRepeatablePropertyName class for handling repeatable fields - Extend TranslatablePropertyName with isRepeatable() method - Update TranslatablePropertyNames to support repeatable properties - Enhance TranslatablePropertyNamesFactory to detect repeatable fields - Extend NodeTranslationService to process repeatable field translations - Add configuration options for repeatable fields in Settings.yaml
- Add @param PHPDoc for TranslatableRepeatablePropertyName constructor - Add type assertion in getRepeatableProperties() return - Fix array type annotations in normalizeRepeatableValue() - Fix PHPDoc types in translateRepeatableProperty() to match native types
When repeatable properties are translated, they produce an array value. The code was checking for a translation connector for array properties, but if none was found (as is the case for repeatable fields), it would keep the OLD target node value instead of applying the translated array. This fix adds an else clause to use the translated array value directly when no translation connector is configured for the property.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Introduces translation support for repeatable properties (e.g. JSON arrays) that contain translatable sub-properties.
Changes: