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.
After recently upgrading to the latest dev of i18n the checkbox fields on our forms were showing the default on value (1) instead of the field label even though 'Use field label instead of the "On value" as label' was selected for the field.
Comment | File | Size | Author |
---|---|---|---|
#4 | i18n_field-_boolean_checkbox_label-2029043-4.patch | 630 bytes | vasike |
#1 | i18n_field-checkbox_label-2029043-1.patch | 572 bytes | joel_osc |
Comments
Comment #1
joel_osc CreditAttribution: joel_osc commentedHere is a patch using same method as options.module. Just one note: it seems to me (but I am no expert in this code) that there is no translation handler for the label property yet. It does not matter too much on my site as we are using entity_translation and the boolean fields are shared, but just I thought I would mention it in case anyone mixes this patch up with one that might make the label translation work.
Comment #2
joel_osc CreditAttribution: joel_osc commentedChanging to Needs Review.
Comment #3
hoporr CreditAttribution: hoporr commentedThis is a followup issue to https://drupal.org/node/1904368. Similar problem was reported there in #49.
Comment #4
vasikereroll and correct the previous patch (use translated value of the label).
patch attached
Comment #5
hoporr CreditAttribution: hoporr commentedConfirming: patch #4 works, labels are also translated.
Thank you joel_osc & vaskike
Comment #6
weri CreditAttribution: weri commentedI reviewed and tested the patch #4. It works as expected.
Comment #7
caktux CreditAttribution: caktux commented#4 works great and my vote goes for a new release, having empty checkboxes all over a website can be quite critical.
Comment #8
carnau CreditAttribution: carnau commented#4 Solves the issue, many thanks!
Comment #9
Jose Reyero CreditAttribution: Jose Reyero commented#4: i18n_field-_boolean_checkbox_label-2029043-4.patch queued for re-testing.
Comment #10
das-peter CreditAttribution: das-peter commentedStruggled over this, applied patch - works as expected. Thanks :)
Comment #11
skylord CreditAttribution: skylord commented#4 is OK - please commit.
Comment #12
cspitzlay#4 works for me, too.
Comment #13
das-peter CreditAttribution: das-peter commentedOh, I just remembered that I've commit access to i18n :O
@Jose I hope you don't mind that I've committed the patch.
Here we go: http://drupalcode.org/project/i18n.git/commit/a184b48
Comment #14
Jose Reyero CreditAttribution: Jose Reyero commented@das-peter,
Sure, there's a reason why you have commit access ;-)
Comment #15
wiifmThis bug was driving me nuts, I did not even know that i18n was the cause. Thanks for the commit, 7.x-1.x-dev is much better now.