To reproduce:

start with English / Spanish site

1. Create a new checkbox profile item
2. Fill it out how ever you want, but make form_name profile_awesome, and in the explanation field type "are you awesome?"
3. Save
4. go to admin/build/translate/search and search on "awesome"
5. field:profile_awesome:explanation comes up
6. Edit at and add a translation (e.g. "¿Eres increíble?")
7. In another window load a profile with Spanish language selected
8. Explanation for checkbox is **NOT** Translated.

9. Do a search on "awesome" again.
10. now you've got
field:profile_awesome:explanation
**AND**
field:profile_awesome:description
11. Edit the field:profile_awesome:description and add the same translation.
12. In another window load a profile in Spanish
13. Translation works

Sure looks like a bug to me.

I think I fixed it. I attached a patch to HEAD. Don't know if I did it right since I've never posted a patch.

It's basically just changing "profile:field:$field:description" to "profile:field:$field:explanation" in one place.

CommentFileSizeAuthor
#3 i18n-dirty.patch829 byteskotnik
i18nprofile.module.patch874 bytesmtsanford

Comments

spouilly’s picture

I confirm I do have the same issue (French/English website).

The patch is solving partially the problem. It does indeed bring the translation of the profile explanation on the profile registration page. But at the same time the patch remove extra content (provided by drupal) added to the explanation (such as the privacy level of the field: "The content of this field is kept private and will not be shown publicly.")

Not sure if it can be fixed easily:

In drupal/module/profile/profile.module: _profile_form_explanation($field) is used to add the extra information to the description when building the form. But from why I have read, i18n profile translate directly the form (i.e. once it has been created, after _profile_form_explanation() has been called).

Unfortunately at this stage, the field structure (->visibilty, ->type) are no longer available (only the field name).

Sylvain

jose reyero’s picture

Status: Patch (to be ported) » Needs work

Need to address spouilly's issues in #1.

About regenerating the explanation message and field's properties not available on form building, possibly we'll need to reload the field data (visibility, type) here.

kotnik’s picture

StatusFileSize
new829 bytes

I have exactly the same issue and since I'm busy with the project, I applied this rather nasty hack, but it will make things work until I get the time to devote it to this issue.

kenorb’s picture

+1

miccelito’s picture

Component: Code » Blocks

You may try Translation table module http://drupal.org/project/translation_table which may solve the problem with i18n translation of description texts.

edit: above module doesn't solve the issue. I suggest you solve the translation of description (explanation) text by using css instead of adding hacks to i18n module.
I.e:
1. in profiles > field > explanation text field: enter <span class="en">English text goes here...</span><span class="es">Spanish text goes here...</span>
2. in your themed css: add
.i18n-en span.es, .i18n-es span.en { display:none; }

joseph.olstad’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)