Here is the scenario:

  1. Entity translation is enabled on webform node types
  2. A single form is created and the strings translation option is on
  3. A confirmation message is set on the node while browsing in the sites default language
  4. The string is translated using the translate interface
  5. A user switches to French
  6. Edits the webform settings
  7. The confirmation message appears in French (as it has been translated)
  8. User saves the webform form settings
  9. The confirmation message is now in French for all languages

Basically, since the form settings page isn't language aware, it overrides the default language string with the loaded translation when you save in any other language.

I suggest we disable form settings fields which are translated to prevent them from being saved. Meaning those fields can only be edited in the sites default language.

Patch to follow.

Comments

dave bagler’s picture

Status: Active » Needs review
StatusFileSize
new4.28 KB

This patch removes the webform menu from the webform's local tasks if the user's current language is not the site's default language. It also implements hook_node_presave() to check if the user is editing the node the webform is attached to in a language other than the site's default language and if so resets the confirmation and submit text in the node object to the default language's confirmation and submit text.

dave bagler’s picture

Issue summary: View changes

Added list

Alienpruts’s picture

I'm having the same problems with my confirmation strings but ALSO with the Submit button texts. I'll try this patch and conduct some further tests.

(Oh yeah, tnx for the patch :) )

EDIT :

While testing I've found that my labels are having this problem as well.......

EDIT 2 :

Seems all is well after your patch...

The labels that changed from one language to the other was my fault really : to better test the patch I changed the default language, so the labels had to be "re-translated" from the default language to my second one.

Tnx again for the patch :)

GDrupal’s picture

Issue summary: View changes
Status: Needs review » Fixed

Thank you all for all the work on this issue!
I solve this in a different way, perhaps less messy for me.
Check my last commit and let me know how it goes.
http://drupalcode.org/project/webform_localization.git/commit/d89ba9e

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

mducharme’s picture

Priority: Normal » Major
Status: Closed (fixed) » Needs work

This issue is still happening. Exact same description as the original. All of my default language strings are replaced after being translated.

Both 'Expose webform component strings suitable for translation.' and 'Keep a single webform across a translation set.' are checked.

mducharme’s picture

Priority: Major » Normal
Status: Needs work » Fixed

Sorry, I had the 1.x version of this module in place. Upgraded to 4.x now. My bad.

mducharme’s picture

Status: Fixed » Needs work

I switched to the 4.x branch but again, this issue is still happening.

mducharme’s picture

Status: Needs work » Needs review
StatusFileSize
new4.35 KB

The patch still works to fix the variables on the form settings page. What was committed did not fix these. I've updated the patch to fix some white-space issues and to add the 'redirect_url' variable in addition to the 'confirmation' and 'submit_text' that was in the previous patch.

joseph.olstad’s picture

is patch 8 still required? it does apply cleanly. looking for a review.

rodlangh’s picture

Seems to be related to Issue 2604562
Looks like the same problem is described as in point 4:

when you translate submit_text and edit the form in that language. You will see your translation. When you then save the form in that language, the i18n source value of submit_text will be overridden with the translation.

As that patch has been submitted, this issue should be resolved as well.

joseph.olstad’s picture

Status: Needs review » Closed (duplicate)

lets close this as a duplicate then

Rodlangh, thanks for checking!