Configuration is not translatable

Created on 12 May 2025, 5 days ago

Problem/Motivation

The Block Title Link module currently doesn't support translation of the block title link settings. When using a multilingual site, users need to be able to translate the URL and title of block title links for different languages, but the module lacks the necessary schema configuration to make these fields translatable in the UI.

Steps to reproduce

  1. Install the Block Title Link module
  2. Configure a block with Block Title Link settings
  3. Try to translate the block in a multilingual site
  4. Notice that the Block Title Link settings (title_link_url and link_title) are not available for translation

Proposed resolution

Add a schema file to the module that defines the translatable fields. Create a config/schema/block_title_link.schema.yml file with the proper schema definition to make the relevant fields translatable.

# Schema for the configuration of the Block Title Link module.

block.settings.*.third_party.block_title_link:
  type: mapping
  label: 'Block Title Link settings'
  mapping:
    title_link_url:
      type: label
      label: 'Title Link URL'
    link_title:
      type: label
      label: 'Link Title'
    title_link_target:
      type: string
      label: 'Link Target'
    title_link_enable:
      type: boolean
      label: 'Enable Title Link'

User interface changes

The Block Title Link settings (Title Link URL and Link Title) will now appear in the block translation forms, allowing users to provide different values for different languages.

API changes

None. This change only affects the configuration schema.

Data model changes

No changes to the data model. The schema file only defines the existing configuration as translatable.

📌 Task
Status

Active

Version

1.1

Component

Code

Created by

🇭🇺Hungary szantog

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024