Commit 624e6d39 authored by yched's avatar yched

#115425 - call t() for field descriptions

parent 6788a931
......@@ -245,7 +245,7 @@ function fieldgroup_form_alter($form_id, &$form) {
'#title' => t($group['label']),
'#collapsed' => $group['settings']['collapsed'],
'#collapsible' => $group['settings']['collapsible'],
'#description' => $group['description'],
'#description' => t($group['description']),
'#weight' => $group['weight'],
'#attributes' => array('class' => strtr($group['group_name'], '_', '-')),
);
......
......@@ -219,7 +219,7 @@ function nodereference_widget($op, &$node, $field, &$items) {
'#size' => $field['multiple'] ? min(count($options), 6) : 0,
'#options' => $options,
'#required' => $field['required'],
'#description' => $field['widget']['description'],
'#description' => t($field['widget']['description']),
);
return $form;
......@@ -264,7 +264,7 @@ function nodereference_widget($op, &$node, $field, &$items) {
if ($field['multiple']) {
$form[$field['field_name']]['#type'] = 'fieldset';
$form[$field['field_name']]['#description'] = $field['widget']['description'];
$form[$field['field_name']]['#description'] = t($field['widget']['description']);
$delta = 0;
foreach ($items as $item) {
if ($item['nid']) {
......@@ -295,7 +295,7 @@ function nodereference_widget($op, &$node, $field, &$items) {
'#autocomplete_path' => 'nodereference/autocomplete/'. $field['field_name'],
'#default_value' => $items[0]['default node_name'],
'#required' => $field['required'],
'#description' => $field['widget']['description'],
'#description' => t($field['widget']['description']),
);
}
return $form;
......
......@@ -299,7 +299,7 @@ function number_widget($op, &$node, $field, &$items) {
if ($field['multiple']) {
$form[$field['field_name']]['#type'] = 'fieldset';
$form[$field['field_name']]['#description'] = $field['widget']['description'];
$form[$field['field_name']]['#description'] = t($field['widget']['description']);
$delta = 0;
foreach ($items as $data) {
if (isset($data['value'])) {
......@@ -337,7 +337,7 @@ function number_widget($op, &$node, $field, &$items) {
'#title' => t($field['widget']['label']),
'#default_value' => isset($items[0]['value']) ? $items[0]['value'] : '',
'#required' => $field['required'],
'#description' => $field['widget']['description'],
'#description' => t($field['widget']['description']),
'#size' => 20,
'#maxlength' => 11,
'#attributes' => array('class' => 'number'),
......
......@@ -100,7 +100,7 @@ function optionwidgets_widget($op, &$node, $field, &$items) {
'#size' => min(count($options), 6),
'#options' => $options,
'#required' => $field['required'],
'#description' => $field['widget']['description'],
'#description' => t($field['widget']['description']),
);
}
else {
......@@ -111,7 +111,7 @@ function optionwidgets_widget($op, &$node, $field, &$items) {
'#multiple' => FALSE,
'#options' => $options,
'#required' => $field['required'],
'#description' => $field['widget']['description'],
'#description' => t($field['widget']['description']),
);
}
break;
......@@ -125,7 +125,7 @@ function optionwidgets_widget($op, &$node, $field, &$items) {
'#title' => $options[$on_value],
'#default_value' => $items['default keys'][0],
'#return_value' => $on_value,
'#description' => $field['widget']['description'],
'#description' => t($field['widget']['description']),
'#required' => FALSE,
);
break;
......@@ -138,7 +138,7 @@ function optionwidgets_widget($op, &$node, $field, &$items) {
'#default_value' => $items['default keys'],
'#options' => $options,
'#required' => $field['required'],
'#description' => $field['widget']['description'],
'#description' => t($field['widget']['description']),
);
}
else {
......@@ -149,7 +149,7 @@ function optionwidgets_widget($op, &$node, $field, &$items) {
'#default_value' => $items['default key'],
'#options' => $options,
'#required' => $field['required'],
'#description' => $field['widget']['description'],
'#description' => t($field['widget']['description']),
);
}
break;
......
......@@ -248,7 +248,7 @@ function text_widget($op, &$node, $field, &$items) {
if ($field['multiple']) {
$form[$field['field_name']]['#type'] = 'fieldset';
$form[$field['field_name']]['#description'] = $field['widget']['description'];
$form[$field['field_name']]['#description'] = t($field['widget']['description']);
$delta = 0;
foreach ($items as $data) {
if ($data['value']) {
......@@ -311,7 +311,7 @@ function text_widget($op, &$node, $field, &$items) {
'#title' => t($field['widget']['label']),
'#default_value' => isset($items[0]['value']) ? $items[0]['value'] : '',
'#required' => $field['required'],
'#description' => $field['widget']['description'],
'#description' => t($field['widget']['description']),
'#maxlength' => $field['max_length'] ? $field['max_length'] : '',
'#weight' => $field['widget']['weight'],
);
......@@ -323,7 +323,7 @@ function text_widget($op, &$node, $field, &$items) {
'#default_value' => $items[0]['value'],
'#required' => $field['required'],
'#rows' => $field['widget']['rows'],
'#description' => $field['widget']['description'],
'#description' => t($field['widget']['description']),
'#weight' => $field['widget']['weight'],
);
}
......
......@@ -163,7 +163,7 @@ function userreference_widget($op, &$node, $field, &$items) {
'#size' => $field['multiple'] ? min(count($options), 6) : 0,
'#options' => $options,
'#required' => $field['required'],
'#description' => $field['widget']['description'],
'#description' => t($field['widget']['description']),
);
return $form;
......@@ -205,7 +205,7 @@ function userreference_widget($op, &$node, $field, &$items) {
if ($field['multiple']) {
$form[$field['field_name']]['#type'] = 'fieldset';
$form[$field['field_name']]['#description'] = $field['widget']['description'];
$form[$field['field_name']]['#description'] = t($field['widget']['description']);
$delta = 0;
foreach ($items as $item) {
if ($item['uid']) {
......@@ -236,7 +236,7 @@ function userreference_widget($op, &$node, $field, &$items) {
'#autocomplete_path' => 'user/autocomplete',
'#default_value' => $items[0]['default user_name'],
'#required' => $field['required'],
'#description' => $field['widget']['description'],
'#description' => t($field['widget']['description']),
);
}
return $form;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment