Unable to use config_translation to translate most toc_type entities

Created on 24 April 2025, about 18 hours ago

Problem/Motivation

On multilingual sites, you can't translate most of the configuration stored within a toc_filter config entity.

Steps to reproduce

  • Install Drupal core, 10.4 || 11.x
  • Enable toc_api_example and config_translation, eg. ddev drush en -y config_translation toc_api_example
  • Add an additional language (/admin/config/regional/language/add)
  • Create some content with some <h2>'s in the body field
  • View the content in the alternate language
  • At this point, we expect that the "Back to top" links will be in the default English and not translated. Lets go translate them!
  • Go to Structure > Table of contents types. Click Translate from the Operations column next to Default
  • Click Edit/Add from the Operations column for the language added in the previous step

Expected result

The "Back to top" (top_label) option should be available to translate.

Actual result

You can't translate the "Back to top" (top_label) option.

Proposed resolution

The config schema declares this setting as a string. It should be text so that it can be translated into other languages using config_translation module.

Remaining tasks

MR

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada m4olivei Grimsby, ON

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