--- components/grid.inc 2011-03-05 03:08:55.000000000 +0100 +++ components/grid_new.inc 2011-03-23 15:30:55.812411001 +0100 @@ -366,6 +366,31 @@ function _webform_csv_data_grid($compone return $return; } +/** + * Implementation of _webform_translate_component(). + */ +function _webform_translate_grid($component, $filter = TRUE, $update = FALSE) { + if (!empty($component['value'])) { + $component['value'] = webform_tt("webform:component:{$component['cid']}:value", $component['value'], NULL, $update); + } + + //Translate options + $options = _webform_select_options_from_text($component['extra']['options'],TRUE); + foreach($options as $key => $option){ + $options[$key] = webform_tt("webform:component:{$component['cid']}:option:{$key}",$option,NULL,$update); + } + $component['extra']['options'] = _webform_select_options_to_text($options); + + //Translate questions + $questions = _webform_select_options_from_text($component['extra']['questions'],TRUE); + foreach($questions as $key => $question){ + $questions[$key] = webform_tt("webform:component:{$component['cid']}:question:{$key}",$question,NULL,$update);; + } + $component['extra']['questions'] = _webform_select_options_to_text($questions); + + return $component; +} + function theme_webform_grid($element) { $rows = array(); $header = array(array('data' => '', 'class' => 'webform-grid-question'));