Refactor config_translation_entity_type_alter to move entity type handling to respective defining modules

Created on 3 August 2023, 11 months ago

Problem/Motivation

This is a follow-up to Entity view/form mode formatter/widget settings have no translation UI ๐Ÿ› Entity view/form mode formatter/widget settings have no translation UI Needs review which surfaced an issue with the way config translation is handled for different entity types.
https://git.drupalcode.org/project/drupal/-/merge_requests/4294#note_189658

The current implementation of the config_translation_entity_type_alter function is complex and tightly coupled with various entity types. This function sets up the handlers for different entity types to enable config translation.
This issue aims at refactoring the config_translation_entity_type_alter and moving the handling of entity types to their respective defining modules. This change will make the code more maintainable and consistent with how other contrib modules handle similar scenarios.

Steps to reproduce

Proposed resolution

The function should no longer handle specific entity types like 'block' or 'field_config' directly. Instead, it should identify entities that require translation support and invoke hooks or methods to set up the necessary configurations. These hooks should allow modules to add handlers conditionally when Config Translation module is enabled.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ“Œ Task
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component
Config translationย  โ†’

Last updated about 1 month ago

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia srishtiiee

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024