diff --git a/core/modules/aggregator/src/FeedForm.php b/core/modules/aggregator/src/FeedForm.php index 35359ce..aa5069c 100644 --- a/core/modules/aggregator/src/FeedForm.php +++ b/core/modules/aggregator/src/FeedForm.php @@ -19,19 +19,6 @@ class FeedForm extends ContentEntityForm { /** * {@inheritdoc} */ - public function form(array $form, FormStateInterface $form_state) { - $form = parent::form($form, $form_state); - // @todo Allow non translatable entity types having language support to be - // configured in the content language setting. - - // Ensure the language widget is displayed. - $form['langcode']['#access'] = TRUE; - return $form; - } - - /** - * {@inheritdoc} - */ public function save(array $form, FormStateInterface $form_state) { $feed = $this->entity; $insert = (bool) $feed->id(); diff --git a/core/modules/content_translation/content_translation.admin.inc b/core/modules/content_translation/content_translation.admin.inc index cddd7e1..0d6d496 100644 --- a/core/modules/content_translation/content_translation.admin.inc +++ b/core/modules/content_translation/content_translation.admin.inc @@ -88,7 +88,6 @@ function _content_translation_form_language_content_settings_form_alter(array &$ $storage_definitions = $entity_type instanceof ContentEntityTypeInterface ? $entity_manager->getFieldStorageDefinitions($entity_type_id) : array(); $entity_type_translatable = $entity_type->isTranslatable(); - $form['settings'][$entity_type_id]['#translatable'] = $entity_type_translatable; foreach (entity_get_bundles($entity_type_id) as $bundle => $bundle_info) { // Here we do not want the widget to be altered and hold also the "Enable // translation" checkbox, which would be redundant. Hence we add this key @@ -144,12 +143,13 @@ function _content_translation_form_language_content_settings_form_alter(array &$ function _content_translation_preprocess_language_content_settings_table(&$variables) { // Alter the 'build' variable injecting the translation settings if the user // has the required permission. - $element = $variables['element']; if (!\Drupal::currentUser()->hasPermission('administer content translation')) { return; } + $element = $variables['element']; $build = &$variables['build']; + array_unshift($build['#header'], array('data' => t('Translatable'), 'class' => array('translatable'))); $rows = array(); diff --git a/core/modules/language/src/Form/ContentLanguageSettingsForm.php b/core/modules/language/src/Form/ContentLanguageSettingsForm.php index 32ab95c..fc53554 100644 --- a/core/modules/language/src/Form/ContentLanguageSettingsForm.php +++ b/core/modules/language/src/Form/ContentLanguageSettingsForm.php @@ -63,8 +63,7 @@ public function buildForm(array $form, FormStateInterface $form_state) { $bundles = $this->entityManager->getAllBundleInfo(); $language_configuration = array(); foreach ($entity_types as $entity_type_id => $entity_type) { - $langcodeKey = $entity_type->getKey('langcode'); - if (!$entity_type instanceof ContentEntityTypeInterface || empty($langcodeKey)) { + if (!$entity_type instanceof ContentEntityTypeInterface || !$entity_type->hasKey('langcode')) { continue; } $labels[$entity_type_id] = $entity_type->getLabel() ?: $entity_type_id;