I think the YouTube field is not translating correctly.
Here is what I am doing:
(1) install a brand new Drupal site, for example using drush qd -y
(2) download and enable i18n_field and youtube
drush dl i18n variable youtube
drush en i18n_field youtube -y
(3) log into your site (for example using drush uli), go to admin/config/regional/language and enable French as a new language
(4) go to admin/config/regional/language/configure and set "URL" as a detection mechanism
(5) go to admin/config/people/accounts/fields and add a youtube field called "English Field Title" (machine name: field_english_field_title); add also a text field called "English Field Title (not youtube)" (machine name: field_english_field_title_not_yo)
(6) go to admin/config/people/accounts/fields/field_english_field_title/translate/fr and set the label to "French Field Title"
(7) go to admin/config/people/accounts/fields/field_english_field_title_not_yo/translate/fr and set the label to "French Field Title (not youtube)"
(8) go to fr/user/1/edit, and you will see "French Field Title (not youtube)", but, for the Youtube field, instead of "French Field Title", you will see "English Field Title"
Cheers,
Albert.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | youtube-i18n_field-field-translations-2229871-7.patch | 1.67 KB | guschilds |
| #5 | youtube_i18n_issue_translating_title-2229871-5.patch | 524 bytes | ZikPhil |
Comments
Comment #1
alberto56 commentedComment #2
ZikPhil commentedThe issue seems to be that there is a t function missing in the hook_field_widget_form that is preventing the title to look for translated content.
I just added that line before the field element is saved :
So far no issues :)
Cheers!
Comment #3
ZikPhil commentedThe previous patch was against the current dev version, this is for the current 1.2 version.
Edit: Woops, they are both identical. No clues why the previous one didnt worked.
Comment #4
ZikPhil commentedOk guys hang with me, that also includes the description.
Cheers.
Comment #5
ZikPhil commentedComment #6
alberto56 commentedMight this be linked to #1904368: [7.x-1.8 regression] Field translation fails in numerous situations, perhaps?
Comment #7
guschilds commentedHey all,
Thanks for bringing this up, for such detailed steps to reproduce, and for the patches. The patches in #2 and #3 were identical because 1.2 and the 7.x-1.x branch are currently the same. Those patches, however, didn't seem to solve the problem for me.
After looking at how a few common modules implement
hook_field_widget_form(), I came to realize that this module's implementation was a bit off. After correcting it to be more in line with those I was looking at, the translations for both title and description began working.Please give the attached patch a try on the 7.x-1.2 release by following the steps in the issue's description. Translations for both title and description should now work.
Thanks again,
Gus
Comment #9
guschilds commentedI have committed the fix from #7 to the 7.x-1.x branch. It will be available in the next release. I will also be creating a new issue to ensure this is not a bug in the 8.x branch.