diff --git a/core/modules/aggregator/src/Entity/Feed.php b/core/modules/aggregator/src/Entity/Feed.php index ceb0090..bb03b83 100644 --- a/core/modules/aggregator/src/Entity/Feed.php +++ b/core/modules/aggregator/src/Entity/Feed.php @@ -154,6 +154,9 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { $fields['langcode'] = BaseFieldDefinition::create('language') ->setLabel(t('Language code')) ->setDescription(t('The feed language code.')) + ->setDisplayOptions('view', array( + 'type' => 'hidden', + )) ->setDisplayOptions('form', array( 'type' => 'language_select', 'weight' => 2, diff --git a/core/modules/aggregator/src/FeedForm.php b/core/modules/aggregator/src/FeedForm.php index 065c06d..e2857ab 100644 --- a/core/modules/aggregator/src/FeedForm.php +++ b/core/modules/aggregator/src/FeedForm.php @@ -21,6 +21,9 @@ class FeedForm extends ContentEntityForm { */ 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; diff --git a/core/modules/contact/src/Entity/Message.php b/core/modules/contact/src/Entity/Message.php index 0724312..d5be8c8 100644 --- a/core/modules/contact/src/Entity/Message.php +++ b/core/modules/contact/src/Entity/Message.php @@ -142,10 +142,11 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { ->setLabel(t('UUID')) ->setDescription(t('The message UUID.')) ->setReadOnly(TRUE); +// s/comment/message/ $fields['langcode'] = BaseFieldDefinition::create('language') ->setLabel(t('Language')) - ->setDescription(t('The comment language code.')) + ->setDescription(t('The language code message.')) ->setDisplayOptions('form', array( 'type' => 'language_select', 'weight' => 2, diff --git a/core/modules/content_translation/src/ContentTranslationHandler.php b/core/modules/content_translation/src/ContentTranslationHandler.php index bcc2b19..b9f0d4b 100644 --- a/core/modules/content_translation/src/ContentTranslationHandler.php +++ b/core/modules/content_translation/src/ContentTranslationHandler.php @@ -151,7 +151,7 @@ public function entityFormAlter(array &$form, FormStateInterface $form_state, En $language_widget = &$form[$language_field]; } - // If we are editing the source entity, force the list of languages so that + // If we are editing the source entity, limit the list of languages so that // it is not possible to switch to a language for which a translation // already exists. Note that this will only work if the widget is structured // like \Drupal\Core\Field\Plugin\Field\FieldWidget\LanguageSelectWidget. diff --git a/core/modules/language/language.module b/core/modules/language/language.module index 735fce5..0120fa7 100644 --- a/core/modules/language/language.module +++ b/core/modules/language/language.module @@ -187,7 +187,7 @@ function language_entity_base_field_info_alter(&$fields) { foreach (array('form', 'view') as $type) { if ($definition->getDisplayOptions($type)) { // The related configurations will be purged manually on Language - // module uninstallation. See language_modules_uninstalled(). + // module uninstallation. @see language_modules_uninstalled(). $definition->setDisplayConfigurable($type, TRUE); } } diff --git a/core/modules/menu_link_content/src/Entity/MenuLinkContent.php b/core/modules/menu_link_content/src/Entity/MenuLinkContent.php index a8e9286..c5013bd 100644 --- a/core/modules/menu_link_content/src/Entity/MenuLinkContent.php +++ b/core/modules/menu_link_content/src/Entity/MenuLinkContent.php @@ -393,7 +393,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { $fields['langcode'] = BaseFieldDefinition::create('language') ->setLabel(t('Language')) - ->setDescription(t('The menu item language code.')) + ->setDescription(t('The menu link language code.')) ->setDisplayOptions('view', array( 'type' => 'hidden', )) diff --git a/core/modules/node/src/Tests/NodeTypeInitialLanguageTest.php b/core/modules/node/src/Tests/NodeTypeInitialLanguageTest.php index 88eab8c..f6571ca 100644 --- a/core/modules/node/src/Tests/NodeTypeInitialLanguageTest.php +++ b/core/modules/node/src/Tests/NodeTypeInitialLanguageTest.php @@ -111,7 +111,7 @@ function testLanguageFieldVisibility() { )); $this->assertTrue(empty($language_field), 'Language field value is not shown by default on node page.'); - // Changes Language field visibility to true and check if it is saved. + // Set language field visible and check has been set. $edit = array( 'fields[langcode][type]' => 'language', );