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.
Problem/Motivation
The settings form is currently not translatable.
Proposed resolution
Add the necessary configuration to allow the settings to be translated. A patch is attached which does this, and changes the help text field to a textarea to assist in translating it through the translation form.
Data model changes
This modifies the configuration schema to set 3 fields (emails and help text) as translatable.
Release notes snippet
Make relevant settings transltable.
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff_002_005.txt | 832 bytes | askibinski |
#5 | tfa-translatable-settings-3156039-005.patch | 1.27 KB | askibinski |
|
Comments
Comment #2
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedPlease don't change help_text to be a textarea.
Comment #3
dennis_meuwissen CreditAttribution: dennis_meuwissen commentedA new patch is attached. It also seems I forgot to add the tfa.config_translation.yml file last time around.
The help_text type is now changed into a label because leaving it as string and merely adding translatable: true does not make it show up in the translation UI. The config schema docs say type: label is shorthand for type: string, translatable: true though, but that does not seem to work.
Comment #4
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedComment #5
askibinski CreditAttribution: askibinski as a volunteer and at iO commentedHere is a minor improvement on the patch. The "translatable" property is not necessary because the core mail data type already uses "label" which is translatable by default.
Otherwise tested and works as expected.
Comment #7
jcnventura CreditAttribution: jcnventura at 1xINTERNET commentedThanks for the review and patch. I don't normally accept self-added RTBCs, but in this case I'll give it a pass since you only reduced changes from the original.