Closed (cannot reproduce)
Project:
Webform Localization
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
21 Mar 2012 at 14:11 UTC
Updated:
15 Aug 2013 at 20:45 UTC
I’m using webform (3.17) and form_localazation, to build a form with some textfields, a select item and a grid. In the webform ‘forms settings’, all checkboxes of ‘Localization by string translation’ are checked. The checkboxes of ‘Localization by sync’ aren’t.
Via “Configuration > Regional and language > Translate interface > Translate” I’ve added every label, every select value and every grid question an option.
Back to the webform display, only the labels of the textfields are translated. The labels of the select item and the grid aren’t translated. Even the select values and grid options and questions are in the default language, although they were available in the Translation part.
Comments
Comment #1
DEJU commentedPerhaps a work around, but I'm not sure if this the right way in Drupal.
In the 'Translate' form, the Webform grid title is shown as followed:
TEXT GROUP: Webform Localization
STRING: Test Grid (=> the displaylabel of my field), webform:1:4:#title
CONTEXT: 1:4:#title
After adding the right translation, de language isn't striked through anymore. The result of this translation isn't displayed in the webform.
When I use the hook hook_webform_component_render_alter with following code:
The 'Translate' form shows an extra translatable item as followed:
TEXT GROUP: Built-in interface
STRING: Test Grid (=> the displaylabel of my field), /mysite/?q=fr/node/1
CONTEXT: (empty)
Translating this item, the webform is correctly displayed.
Comment #2
DEJU commentedLooking deeper into the arguments that are passed to the hook ($element and $component), a textfield contains
the item ['#webform_component']['extra']['translated_strings'][0], which refer to context of the translate form (e.g.: webform:1:2:#title).
A select or grid field do not have this 'translated_string' item in the $element and $component array.
Comment #3
GDrupal commentedThis need a further review indeed, let me check it and I will let you know, select and grid work different and should be displaying ok. as are in our testing, I will try to reproduce your problem.
Thanks!
Comment #4
GDrupal commented@DEJU i can not reproduce your problem i have tried several times using webform (3.17) and the lst copy of webform_localization. Do you have the last version? are you using this to get it:
git clone --branch 7.x-1.x GDrupal@git.drupal.org:sandbox/GDrupal/1407100.git webform_localizationThanks!
Comment #5
DEJU commentedYes I do (Webform 7.x-3.17 and the latest webform_localization)
Some screenshots
Comment #6
GDrupal commentedThis can´t be reproduced right now. Please feel free to open it if you have more information.