We have alt and title fields now (https://drupal.org/node/1307054)

But they are language neutral, the same text is shown on all languages.

Files: 
CommentFileSizeAuthor
#10 media-popup_translations-2017647-10.patch4.36 KBLeksat
PASSED: [[SimpleTest]]: [MySQL] 922 pass(es).
[ View ]
#4 Screen Shot 2013-06-25 at 10.35.07 AM.png102.93 KBmgifford

Comments

rob_johnston’s picture

I think this is related: #1470018: Provide Entity Translation integration. Still working through this myself.

mgifford’s picture

Ok, so that issue for Entity Translation was fixed in October, but I think this is still a problem with at least the released version of Media.

@rob_johnston did you get it working?

rob_johnston’s picture

That issue gave me some clues as to what to expect and let me try to list them here (hope I don't skip a step):

  1. I went to /admin/config/regional/entity_translation and under "Translatable entity types" I enabled "File".
  2. On the same page, for the "File" type I now have the "Image" set to default to the current language and to exclude language neutral (my preference).
  3. I then went to /admin/structure/file-types and for the "Image" type, under "Manage fields", I edited the "Alt Text" and "Title Text" and clicked "Enable translation" at the bottom.
  4. I then edited the content type and synchronized the image field across translations

So when I do that, after creating the content in English, saving, and creating the translation in French, I click the edit button for the image. I then see a new button up on the top left (easy to miss) that says "Add French translation" and a drop-down that indicated that I'm currently editing the English version. This is the clue that I got from the referenced issue. This form that pops-up is very similar to the full file edit form (e.g. if I know my file is saved as number 1234 then I could go to /file/1234/edit).

So, does this work for anybody else? Non-intuitive, I'd say, and I think that this pop-up form should be in the current language so the "Add French translation" button could disappear. It's an extra step that would be easy for a user to forget to do.

mgifford’s picture

StatusFileSize
new102.93 KB

I'm trying to replicate this, but having trouble. I've got the alt text translation enabled here:
eng/admin/structure/file-types/manage/image/fields/field_file_image_alt_text

But I'm also using the media module so that might be messing things up. When I edit an image here:
eng/admin/content/file/edit-multiple/34

I don't see anything that allows me to edit the image.

In step 4 when I edit an image I'm not seeing anything for the translation:

Screen Shot of Media module pop-up

But ya, definitely not intuitive.

rob_johnston’s picture

It's possible that I forgot a step, but I can't think what it might be.

When you go to edit an individual file from the /admin/content/file/edit-multiple page, do you get the "Translate" link on the top-right of the screen?

It wasn't until I synchronized the image field between translations that I saw the "Add French translation" button appear on the top left of that pop-up form that you attached. If the image has a different file number in both languages then the button doesn't appear. If you were to add a line to the "entity_translation" table where entity_type=file, entity_id=34, language=fr, source=en, status=1, and translate=0, etc, would you then see the button?

supermoos’s picture

Did any of you find a way to enable alt and title translations? I have enabled the alt & title fields as translatable under the file types. And under /admin/config/regional/entity_translation, I've also tried both enabling and disabling field translation of the image field on my content type - seems to make no difference. The only thing that seems weird is that under my node content type edit form and the "Synchronize translations"-tab, no fields are available for synchronization?

davidk2’s picture

re: #3 rob_johnston - it works for me. Both fields (alt + title) are translated now, but title + alt atributes in HTML code has still only one language in all translated entities/images.

pikku-h’s picture

Im not sure if this should be separate issue, but the same thing happens without translations:

  1. Node 1 has image with title "Title 1"
  2. Create Node 2, pick (the same image as in Node 1) image from library and set image title to "Title 2"
  3. Node 1 image title is now "Title 2"
mgifford’s picture

Issue summary:View changes
Issue tags:+accessibility, +i18n
Leksat’s picture

Version:7.x-2.0-unstable7» 7.x-2.0-alpha4
Status:Active» Needs review
StatusFileSize
new4.36 KB
PASSED: [[SimpleTest]]: [MySQL] 922 pass(es).
[ View ]

Here is a patch providing basic support for entity translation. I've tested in only with media field.

The translation support works only if both parent entity and file entity are managed by entity_translation module.

The file entity translation handler in the media popup form inherits form/source language from the parent entity translation handler when it's possible.

I've made the patch on the base of 7.x-2.0-alpha4 because latest 7.x-2.x (3fc13e9) does not work for me at all.