diff --git a/core/modules/translation_entity/translation_entity.module b/core/modules/translation_entity/translation_entity.module index e832be1..2f2b17d 100644 --- a/core/modules/translation_entity/translation_entity.module +++ b/core/modules/translation_entity/translation_entity.module @@ -589,16 +589,25 @@ function translation_entity_form_field_ui_field_overview_form_alter(array &$form /** * Implements hook_form_FORM_ID_alter(). + * Add a column to manage fields tab for a content type to show which fields are enabled for translation. */ function translation_entity_form_field_ui_field_overview_form_alter(array &$form, array &$form_state, $form_id) { - $form['fields']['#header'][] = 'Translation'; + + $operations = array_pop($form['fields']['#header']); + $form['fields']['#header'][] = 'Translatable'; + $form['fields']['#header'][] = $operations; + foreach (element_children($form['fields']) as $field => $value) { if ($value != '_add_new_field') { $field_data = field_info_field($value); - $form['fields'][$value]['translation'] = array( - 'label' => array( - '#markup' => $field_data['translatable'] ? t('Enabled') : t('Disabled'), - )); + + //Move out the operations, we need to have translatable field before operations + $operations_data = array_pop($form['fields'][$value]); + $form['fields'][$value]['Translatable'] = array( + 'label' => array( + '#markup' => $field_data['translatable'] ? t('Yes') : '', + )); + $form['fields'][$value][] = $operations_data; } } return $form;