Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Appears like there's a typo in components/select.inc:
When changing
$element['#translatable'][] = 'other';
to
$element['#translatable'][] = 'other_text';
in line 403, label becomes translatable.
Further change necessary for applying the translated text.
Comment | File | Size | Author |
---|---|---|---|
#3 | make_other_label_translatable-3090285-3.patch | 751 bytes | fjgarlin |
|
Comments
Comment #2
Liam MorlandThanks. Please write up the needed changes as a patch.
Comment #3
fjgarlin CreditAttribution: fjgarlin as a volunteer and at Amazee Labs commentedPatch attached
Comment #4
Liam MorlandThe line changed by the patch was added in #2442241: Translatable property for 'Other' option text is missing.
Comment #5
thomas.wardin CreditAttribution: thomas.wardin commentedNeeds the "companion change" in order to work: https://www.drupal.org/project/webform_translation/issues/3075467
Comment #6
Liam MorlandI don't understand what is happening here. When I add a select component with the "other" option enabled, there is an "other" form control created. The text "other_text" does not appear in the HTML source.
#2442241: Translatable property for 'Other' option text is missing was about making the "other" label translatable. Presumably, that fix worked for the person who wrote that fix. Does it not work anymore?
Comment #7
Liam MorlandComment #8
Liam MorlandIf this is still a problem, please provide steps to reproduce and an updated patch.