Issue summary
Problem

The "Seeds Widgets Modal" field formatter (seeds_widgets_modal) exposes a Modal Title as a formatter setting. Formatter settings are stored in display config, so the title is a single, fixed value that cannot be translated per language.

This works acceptably for the block widget path, because there the widget settings are saved into a translatable content field (field_widget_settings) on the block, so each translation gets its own title. But when the same formatter is attached to an entity reference (revisions) field on a content type — especially when that content type is rendered through Layout Builder — the title comes from config and stays in the source language for every translation.

Steps to reproduce

Enable a second language and content translation.
On a content type, set an entity_reference_revisions (paragraph) field's formatter to Seeds Widgets Modal and enter a Modal Title.
(Optionally) render the content type via Layout Builder.
View the node in the second language.
Expected: the modal trigger/header title shows the translated value.
Actual: the title shows the source-language value in all languages.

Why config translation doesn't solve it

entity_view_display config entities have no Config Translation mapper/handler, so view displays never appear in admin/config/regional/config-translation.
The module also shipped no config schema for the formatter settings, so modal_title was untyped and not translatable-capable.
With Layout Builder per-entity overrides, the layout is stored in the content field layout_builder__layout (not config), so language config overrides do not apply at all.
Root cause

The modal title is held as formatter (config) state rather than translatable content, and there is no UI path to translate display/Layout Builder component settings.

Proposed solution

Source the modal title from translatable content instead of config, mirroring the block path:

Add a dedicated translatable string field field_seeds_widget_modal_title to the paragraph_widget bundle.
Add a dedicated form mode (seeds_widget_modal) — a copy of the default paragraph form plus the new field — so the title input only appears where the modal is actually used (selected per content type via the Paragraphs widget's Form display mode), and does not leak into the other formatters' forms.
Update ModalFormatter::viewElements() to read the title from the paragraph translation matching the render language, falling back to the existing modal_title formatter setting when empty. This works in normal displays, Layout Builder default layouts, and per-entity overrides, because the referenced paragraph is content and follows entity translation.
Add config/schema/seeds_widgets.schema.yml typing modal_title as label so the fallback setting is validated and translatable-capable (silences "no schema" warnings).
Clean up dead, unused fields on the seeds_widget block bundle that are never read by any code: field_seeds_widget_desktop, field_seeds_widget_tablet, field_seeds_widget_mobile, field_seeds_widget_modal_title.
Add a hook_update_N() to install the new field/form mode/form display on existing sites.

Comments

ahmad-alyasaki created an issue. See original summary.

  • 38bca84d committed on 2.5.x
    task: #3606994 Modal Title is not translatable when the Modal formatter...
ahmad-alyasaki’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.