Draft: Resolve "Symmetric translation: component instance version updates must propagate to all translations"
Closes #3591596
What this MR does
Makes the component instance update pipeline translation-aware. When updateComponentInstances() detects a version change and reconciles the current language's inputs, it now propagates that reconciliation to every other translation of the host entity.
Three commits, each building on the previous:
-
Shared infrastructure —
TranslationInputReconciler(pure-functional reconciliation: remove orphaned inputs, add defaults for new props, preserve existing translated values) +TranslatableComponentTreeEntityInterface(entity-type-agnostic translation access) +TranslationUpdateScopeInterface(symmetric vs future asymmetric strategy). -
Content entities —
Pageimplements the interface viaTranslatableComponentTreeContentEntityTrait.ComponentSourceManager::propagateToTranslations()runs after a successful update: iterates all translation languages, reconciles each, and handles auto-save conflicts (reconciliation applied on top of existing auto-saves). -
Config entities —
ComponentTreeConfigEntityBaseimplements the interface viaTranslatableComponentTreeConfigEntityTrait, using language config overrides. RefactorspropagateToTranslations()to use the interface methods instead of content-entity-specificgetTranslation(). Config entity overrides skip adding required-prop defaults (they fall back to the base config).
Testing steps
- Create a Page with a JS component, add a Spanish translation with translated prop values.
- Modify the JS component (add/remove a prop), save.
- Open the Page for editing — verify the Spanish translation's inputs are reconciled (new prop has default, deleted prop is gone, existing values preserved).
- Repeat with a ContentTemplate: create one with a translated config override, modify the component, verify the override is cleaned up.
Notes for reviewers
- The
propagateToTranslations()refactoring (commit 3) touches the content entity code path too — existing content entity tests confirm no regression. shouldAddRequiredPropDefaults()was added to the scope interface because config entity overrides don't need required-prop defaults (the base config fallback provides them). The@seeon the method points to where this is used.docs/data-model.mdsection 3.5 updated with a paragraph on translation propagation.