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: addtranslatable_uritype and apply it tofield.value.uri.core/modules/link/config/schema/link.schema.yml: applytranslatable_uritofield.value.link'suri.- Test coverage:
UriItemTestandLinkItemTestassert 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_urito theTextfieldform 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