Closed (duplicate)
Project:
Internationalization
Version:
7.x-1.8
Component:
Fields
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Apr 2013 at 09:31 UTC
Updated:
3 Jun 2013 at 16:07 UTC
Hi,
After I updated i18n to the latest release (7.x-1.8), translations for some fields became broken. I digged deeper and found that there are two problems:
1. in i18n_field_field_widget_form_alter() on line 180: if $element['#entity'] is empty field is not translatable. But this #entity could be stored in the other place in array (see at three screenshots attached). I suggest to remove this line at all.
2. According to the first item, some fields (even if their cardinality = 1) may store their labels into [0] array key. So we should process that situation too.
Patch that works for me attached.
As this release brokes translations for some fields I consider that this issue is major.
| Comment | File | Size | Author |
|---|---|---|---|
| i18n_field-not-all-fields-are-translated-0.patch | 1.75 KB | spleshka | |
| field_i18n_example_3.png | 60.33 KB | spleshka | |
| field_i18n_example_2.png | 95.6 KB | spleshka | |
| field_i18n_example_1.png | 60.42 KB | spleshka |
Comments
Comment #1
sergiu.popa commentedI had problems for an integer field. The translated label was not showing. After applying the patch, everything's okay. Thank you
Comment #2
bnadem commentedMe too, I had problems translating a float field, now every thing seems OK, Thank you very much !
Comment #3
jibranRelated #1157512: Labels are not translated with i18n_field for Drupal core. and #1961750: Unable to translate field label and description containing html tags/entities.
Comment #4
bojanz commentedThe most complete fix for this is in #1904368: [7.x-1.8 regression] Field translation fails in numerous situations. I am rerolling it now.
Closing this one.