- 🇩🇪Germany Grevil
This seems to be a duplicate of 🐛 Field Group Label are not translating Closed: won't fix ?
On multilingual sites, field group labels (and all other translatable properties) are overriden with the values from the current UI language on form submisson. This causes data loss (the original texts).
config_translation
and
🐛
Entity view/form mode formatter/widget settings have no translation UI
Needs review
What happened? The display entity was loaded manually, in the language suitable for the UI (= translated). Those values were then used in the form, which saves the settings in the config's original language.
The core patch is only required to provide a UI - we only require a translation override, e.g. from a configuration sync.
Depending on the context, use the provided entity (i.e. $form_state->getFormObject()->getEntity()
or explicitly load the display entity without translation overrides:
$storage = \Drupal::entityTypeManager()->getStorage('entity_' . $context . '_display');
$display = $storage->loadOverrideFree($entity_type . '.' . $bundle . '.' . $mode);
This applies especially to field_group_info_groups
, but the display entity is also loaded manually in other functions.
On view/form display forms, the field group human_name
needs additional handling to apply translations.
Write tests, patch and review.
On view/form display forms, the field group element forms will display texts in the configuration language, regardless of UI language.
TBD
Active
3.0
Miscellaneous
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
This seems to be a duplicate of 🐛 Field Group Label are not translating Closed: won't fix ?