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.
The options that are not part of a value or option lists from Mailchimp are not translatable.
The attached patch removed the duplicated code that mapped the choices in the mailchimp_insert_drupal_form_tag function and added a t() wrapper around the value part of the option string.
Comment | File | Size | Author |
---|---|---|---|
#3 | 3091752-make-options-translatable-2.patch | 1.65 KB | Rene Bakx |
#2 | 3091752-make-option-labels-translatable.patch | 1.65 KB | Rene Bakx |
Comments
Comment #2
Rene BakxComment #3
Rene BakxRerolled the patch so radio button options are actually translatable too.
Comment #4
gcbI haven't worked with translation a lot, but it was my understanding that passing variables into `t('')` was pointless: you should only pass raw text into it. I suppose I can imagine that that is just guidance, and not hard-and-fast, and that in cases like this where the text is coming from an external system but is oft repeated, translation could still be useful. Can you provide any more details about what this achieves, and perhaps instructions for testing out this improvement?