feat: #3595275 Allow translating default field values for link and uri fields

Add a new translatable_uri config schema type (type: uri with translatable: true) and use it for the default value URI of link fields (field.value.link) and uri fields (field.value.uri), so multilingual sites can configure language-specific default URLs.

Closes #3595275

Changes

  • core/config/schema/core.data_types.schema.yml: add translatable_uri type and apply it to field.value.uri.
  • core/modules/link/config/schema/link.schema.yml: apply translatable_uri to field.value.link's uri.
  • Test coverage: UriItemTest and LinkItemTest assert that the default value URI element is now marked translatable in its typed-data definition.

Follow-up: the schema change alone wasn't enough. A config schema type only renders on the Configuration Translation form if it's mapped to a form element in ConfigTranslationHooks::configSchemaInfoAlter(), and translatable_uri was missing from that map — so the URIs were marked translatable but never editable in the UI.

Additional changes:

  • Map translatable_uri to the Textfield form element in config_translation so it renders on the translation form.
  • Add ConfigTranslationFieldDefaultValueTest (functional) covering end-to-end translation of the link/uri default value URIs (appears on the form, saves per language, stored in the language config override).
Edited by Takuya Enomoto

Merge request reports

Loading