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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joel_osc’s picture

Here 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.

joel_osc’s picture

Status: Active » Needs review

Changing to Needs Review.

hoporr’s picture

This is a followup issue to https://drupal.org/node/1904368. Similar problem was reported there in #49.

vasike’s picture

reroll and correct the previous patch (use translated value of the label).
patch attached

hoporr’s picture

Confirming: patch #4 works, labels are also translated.

Thank you joel_osc & vaskike

weri’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

I reviewed and tested the patch #4. It works as expected.

caktux’s picture

#4 works great and my vote goes for a new release, having empty checkboxes all over a website can be quite critical.

carnau’s picture

#4 Solves the issue, many thanks!

Jose Reyero’s picture

das-peter’s picture

Struggled over this, applied patch - works as expected. Thanks :)

skylord’s picture

#4 is OK - please commit.

cspitzlay’s picture

#4 works for me, too.

das-peter’s picture

Status: Reviewed & tested by the community » Fixed

Oh, 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

Jose Reyero’s picture

@das-peter,
Sure, there's a reason why you have commit access ;-)

wiifm’s picture

This 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.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.