Field translation is implemented atm not very cleanly by using:
- hook_field_widget_properties_alter()
- a replacement for the original widget callback.
This causes a lot of really hard to debug issues like
#1788748: Issues with Organic Groups and Field translation (Wrong translation for field title)
#1848764: Translation of List(Text) problem...
#1283718: Fields labels not translated in error messages generated by implementations of hook_field_validate
#1591850: Notice: Undefined index: #properties in i18n_field_field_widget_form() when using special widgets
There's this new hook introduced in Drupal 7.8 that should allow a much cleaner implementation and prevent conflicts with other modules.
http://api.drupal.org/api/drupal/modules!field!field.api.php/function/ho...
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | field_translation_new_hook-04.patch | 6.69 KB | jose reyero |
| #4 | field_translation_new_hook-03.patch | 6.27 KB | jose reyero |
| #3 | field_translation_new_hook-02.patch | 6.08 KB | jose reyero |
| field_translation_new_hook.patch | 5.37 KB | jose reyero |
Comments
Comment #2
mxtComment #3
jose reyero commentedIt seems when cardinality is 1, the label and description used are those in $element['value'] instead.
This new patch should fix titles and descriptions.
Comment #4
jose reyero commentedThis new version should take care of a few more issues like #1591850: Notice: Undefined index: #properties in i18n_field_field_widget_form() when using special widgets
Comment #5
mxtI've tested last patch: still a minor issue described here: http://drupal.org/node/1788748#comment-6883100
Comment #6
jose reyero commentedNew version. Double check for not translating title/description when the source has changed.
Comment #7
mxtTested last 04 patch: issue in #5 still persists
Comment #8
jose reyero commented@MXT,
Thanks for the quick feedback.
We need to move on anyway (I'd like to release a new i18n version next week) and since this patch seems to fix a lot of issues, it is committed.
We'll work on the other thread (since this seems to be an og issue) to find a solution for it.
Comment #10
klausiThis broke a lot of field translations:
#1944408: translation of decimal and email fields worked with i18n 7.x1.7, but not with 7.x1.8 (Entity translation and i18n used)
#1904368: [7.x-1.8 regression] Field translation fails in numerous situations
#1964234: Not all fields are translated
Comment #11
bojanz commentedThere is now a committable patch at https://drupal.org/node/1904368#comment-7493892 (#1904368: [7.x-1.8 regression] Field translation fails in numerous situations), so let's continue there.
Marked the other issues as duplicates.
Comment #11.0
bojanz commentedUpdated issue summary.