WebformTranslationConfigManager does not respect cognates.

Created on 30 April 2024, 7 months ago

Problem/Motivation

When translating custom Yes/No options, the WebformTranslationConfigManager does not retain "No" as the translated label (since it matches the default language's label), and repeats the first label for both options (ex. "Sí" is the label for both Yes and No).

When attempting to leave the translated label empty (ex. leaving "No"'s label translation field empty), the option is omitted altogether (only "Sí"/Yes is available).

Reloading the form again after saving gives this:

Steps to reproduce

  1. Ensure the Webform and Config Translation modules are enabled.
  2. Create a webform with a Radios/Checkboxes element
  3. Enter Custom Options and ensure one of the options is a cognate (ex. "No")
  4. Save the webform and visit the translation for the second language that also has that cognate (ex. English as Default, Spanish as
    secondary).
  5. Attempt to translate the cognate

Proposed resolution

Option 1.
Determine why the webform is defaulting to the other option's label. Update to instead use the default language's label when no translation label is present.

Option 2.
Create exceptions for cognates (potentially as a form option somewhere in the Webform settings, or similar).

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

6.2

Component

Code

Created by

🇺🇸United States tommasorandazzo

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

Comments & Activities

Production build 0.71.5 2024