diff --git a/core/modules/node/config/schema/node.views.schema.yml b/core/modules/node/config/schema/node.views.schema.yml index b1d24d9..a8e4cfa 100644 --- a/core/modules/node/config/schema/node.views.schema.yml +++ b/core/modules/node/config/schema/node.views.schema.yml @@ -93,14 +93,6 @@ views.argument_validator.node: type: string label: 'Filter value format' -views.field.node_language: - type: views.field.node - label: 'Node language' - mapping: - native_language: - type: boolean - label: 'Native language' - views.field.node: type: views_field label: 'Node' diff --git a/core/modules/node/src/NodeViewsData.php b/core/modules/node/src/NodeViewsData.php index b3df204..81c5550 100644 --- a/core/modules/node/src/NodeViewsData.php +++ b/core/modules/node/src/NodeViewsData.php @@ -40,7 +40,6 @@ public function getViewsData() { $data['node_field_data']['type']['argument']['id'] = 'node_type'; $data['node_field_data']['langcode']['help'] = t('The language of the content or translation.'); - $data['node_field_data']['langcode']['field']['id'] = 'node_language'; $data['node_field_data']['status']['field']['output formats'] = [ 'published-notpublished' => array(t('Published'), t('Not published')), @@ -282,7 +281,6 @@ public function getViewsData() { ) + $data['node_revision']['vid']; $data['node_revision']['langcode']['help'] = t('The language the original content is in.'); - $data['node_revision']['langcode']['field']['id'] = 'node_language'; $data['node_revision']['revision_log']['field']['id'] = 'xss'; @@ -304,7 +302,6 @@ public function getViewsData() { $data['node_field_revision']['title']['field']['id'] = 'node_revision'; $data['node_field_revision']['langcode']['help'] = t('The language of the content or translation.'); - $data['node_field_revision']['langcode']['field']['id'] = 'node_language'; $data['node_revision']['link_to_revision'] = array( 'field' => array( diff --git a/core/modules/node/src/Tests/Views/NodeLanguageTest.php b/core/modules/node/src/Tests/Views/NodeLanguageTest.php index 1869df8..0fc86a2 100644 --- a/core/modules/node/src/Tests/Views/NodeLanguageTest.php +++ b/core/modules/node/src/Tests/Views/NodeLanguageTest.php @@ -240,19 +240,6 @@ public function testNativeLanguageField() { \Drupal::languageManager()->getLanguageConfigOverride('fr', 'language.entity.fr')->set('label', 'Français')->save(); \Drupal::languageManager()->getLanguageConfigOverride('es', 'language.entity.es')->set('label', 'Español')->save(); $this->assertLanguageNames(TRUE); - - // Modify field to use language field instead of node_language field. - $config = \Drupal::config('views.view.test_language'); - $this->assertEqual($config->get('display.default.display_options.fields.langcode.plugin_id'), 'node_language'); - $config->set('display.default.display_options.fields.langcode.plugin_id', 'language'); - $config->save(); - $this->assertLanguageNames(TRUE); - - // Modify the test view to display English language names. - $config = \Drupal::config('views.view.test_language'); - $config->set('display.default.display_options.fields.langcode.native_language', FALSE); - $config->save(); - $this->assertLanguageNames(); } /** diff --git a/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_language.yml b/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_language.yml index 20d8780..82c4c79 100644 --- a/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_language.yml +++ b/core/modules/node/tests/modules/node_test_views/test_views/views.view.test_language.yml @@ -160,7 +160,7 @@ display: empty_zero: false hide_alter_empty: true native_language: false - plugin_id: node_language + plugin_id: language entity_type: node entity_field: langcode filters: diff --git a/core/modules/taxonomy/config/schema/taxonomy.views.schema.yml b/core/modules/taxonomy/config/schema/taxonomy.views.schema.yml index 3b46f3d..9283d0b 100644 --- a/core/modules/taxonomy/config/schema/taxonomy.views.schema.yml +++ b/core/modules/taxonomy/config/schema/taxonomy.views.schema.yml @@ -83,10 +83,6 @@ views.argument_default.taxonomy_tid: type: string label: 'Multiple-value handling' -views.field.taxonomy_term_language: - type: views.field.taxonomy - label: 'Taxonomy language' - views.field.term_link_edit: type: views_field label: 'Taxonomy language' diff --git a/core/modules/taxonomy/src/TermViewsData.php b/core/modules/taxonomy/src/TermViewsData.php index 4b4e578..ca88036 100644 --- a/core/modules/taxonomy/src/TermViewsData.php +++ b/core/modules/taxonomy/src/TermViewsData.php @@ -100,8 +100,6 @@ public function getViewsData() { $data['taxonomy_term_field_data']['description__value']['field']['click sortable'] = FALSE; - $data['taxonomy_term_field_data']['langcode']['field']['id'] = 'taxonomy_term_language'; - $data['taxonomy_term_field_data']['changed']['title'] = t('Updated date'); $data['taxonomy_term_field_data']['changed']['help'] = t('The date the term was last updated.'); diff --git a/core/modules/node/src/Plugin/views/field/Language.php b/core/modules/node/src/Plugin/views/field/Language.php deleted file mode 100644 index 9e55ce9..0000000 --- a/core/modules/node/src/Plugin/views/field/Language.php +++ /dev/null @@ -1,52 +0,0 @@ - FALSE); - - return $options; - } - - public function buildOptionsForm(&$form, FormStateInterface $form_state) { - parent::buildOptionsForm($form, $form_state); - $form['native_language'] = array( - '#title' => $this->t('Native language'), - '#type' => 'checkbox', - '#default_value' => $this->options['native_language'], - '#description' => $this->t('If enabled, the native name of the language will be displayed'), - ); - } - - /** - * {@inheritdoc} - */ - public function render(ResultRow $values) { - // @todo: Drupal Core dropped native language until config translation is - // ready, see http://drupal.org/node/1616594. - $value = $this->getValue($values); - $language = language_load($value); - $value = $language ? $language->getName() : ''; - return $this->renderLink($value, $values); - } - -} diff --git a/core/modules/taxonomy/src/Plugin/views/field/Language.php b/core/modules/taxonomy/src/Plugin/views/field/Language.php deleted file mode 100644 index 3fbc0b8..0000000 --- a/core/modules/taxonomy/src/Plugin/views/field/Language.php +++ /dev/null @@ -1,30 +0,0 @@ -getValue($values); - $language = \Drupal::languageManager()->getLanguage($value); - $value = $language ? $language->getName() : ''; - - return $this->renderLink($this->sanitizeValue($value), $values); - } - -}