From 27dc2b498797a8d553ff60c470f2ea262d15dd7e Mon Sep 17 00:00:00 2001
From: webchick <webchick@24967.no-reply.drupal.org>
Date: Fri, 27 Sep 2013 15:14:38 +0200
Subject: [PATCH] Issue #2076141 by lokapujya: Unneeded dance around
 'Node'/'Content' entity label in views integration code.

---
 core/modules/field/field.views.inc       | 3 +--
 core/modules/file/file.views.inc         | 5 ++---
 core/modules/image/image.views.inc       | 5 ++---
 core/modules/taxonomy/taxonomy.views.inc | 5 ++---
 4 files changed, 7 insertions(+), 11 deletions(-)

diff --git a/core/modules/field/field.views.inc b/core/modules/field/field.views.inc
index 8269575a97d6..62799dd37f55 100644
--- a/core/modules/field/field.views.inc
+++ b/core/modules/field/field.views.inc
@@ -177,8 +177,7 @@ function field_views_field_default_views_data(FieldInterface $field) {
     );
   }
 
-  // Override Node to Content.
-  $group_name = ($entity_info['label'] == t('Node')) ? t('Content') : $entity_info['label'];
+  $group_name = $entity_info['label'];
   // Get the list of bundles the field appears in.
   $bundles_names = $field->getBundles();
   // Build the list of additional fields to add to queries.
diff --git a/core/modules/file/file.views.inc b/core/modules/file/file.views.inc
index 501ce7cae71d..6ae04af259e2 100644
--- a/core/modules/file/file.views.inc
+++ b/core/modules/file/file.views.inc
@@ -490,11 +490,10 @@ function file_field_views_data_views_data_alter(array &$data, FieldInterface $fi
   $pseudo_field_name = 'reverse_' . $field['field_name'] . '_' . $entity_type;
 
   list($label,) = field_views_field_label($entity_type, $field['field_name']);
-  $entity_label = ($entity_info['label'] == t('Node')) ? t('Content') : $entity_info['label'];
 
   $data['file_managed'][$pseudo_field_name]['relationship'] = array(
-    'title' => t('@entity using @field', array('@entity' => $entity_label, '@field' => $label)),
-    'help' => t('Relate each @entity with a @field set to the file.', array('@entity' => $entity_label, '@field' => $label)),
+    'title' => t('@entity using @field', array('@entity' => $entity_info['label'], '@field' => $label)),
+    'help' => t('Relate each @entity with a @field set to the file.', array('@entity' => $entity_info['label'], '@field' => $label)),
     'id' => 'entity_reverse',
     'field_name' => $field['field_name'],
     'entity_type' => $field['entity_type'],
diff --git a/core/modules/image/image.views.inc b/core/modules/image/image.views.inc
index 356f140ce17e..3cba1213a70a 100644
--- a/core/modules/image/image.views.inc
+++ b/core/modules/image/image.views.inc
@@ -44,11 +44,10 @@ function image_field_views_data_views_data_alter(array &$data, FieldInterface $f
   $pseudo_field_name = 'reverse_' . $field['field_name'] . '_' . $entity_type;
 
   list($label,) = field_views_field_label($entity_type, $field['field_name']);
-  $entity_label = ($entity_info['label'] == t('Node')) ? t('Content') : $entity_info['label'];
 
   $data['file_managed'][$pseudo_field_name]['relationship'] = array(
-    'title' => t('@entity using @field', array('@entity' => $entity_label, '@field' => $label)),
-    'help' => t('Relate each @entity with a @field set to the image.', array('@entity' => $entity_label, '@field' => $label)),
+    'title' => t('@entity using @field', array('@entity' => $entity_info['label'], '@field' => $label)),
+    'help' => t('Relate each @entity with a @field set to the image.', array('@entity' => $entity_info['label'], '@field' => $label)),
     'id' => 'entity_reverse',
     'field_name' => $field['field_name'],
     'entity_type' => $field['entity_type'],
diff --git a/core/modules/taxonomy/taxonomy.views.inc b/core/modules/taxonomy/taxonomy.views.inc
index 4e9f27cdd8d8..e7583099a6e2 100644
--- a/core/modules/taxonomy/taxonomy.views.inc
+++ b/core/modules/taxonomy/taxonomy.views.inc
@@ -440,11 +440,10 @@ function taxonomy_field_views_data_views_data_alter(array &$data, FieldInterface
   $pseudo_field_name = 'reverse_' . $field['field_name'] . '_' . $entity_type;
 
   list($label,) = field_views_field_label($entity_type, $field['field_name']);
-  $entity_label = ($entity_info['label'] == t('Node')) ? t('Content') : $entity_info['label'];
 
   $data['taxonomy_term_data'][$pseudo_field_name]['relationship'] = array(
-    'title' => t('@entity using @field', array('@entity' => $entity_label, '@field' => $label)),
-    'help' => t('Relate each @entity with a @field set to the term.', array('@entity' => $entity_label, '@field' => $label)),
+    'title' => t('@entity using @field', array('@entity' => $entity_info['label'], '@field' => $label)),
+    'help' => t('Relate each @entity with a @field set to the term.', array('@entity' => $entity_info['label'], '@field' => $label)),
     'id' => 'entity_reverse',
     'field_name' => $field['field_name'],
     'entity_type' => $field['entity_type'],
-- 
GitLab