summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Pott2018-03-20 23:00:39 (GMT)
committerAlex Pott2018-03-20 23:00:39 (GMT)
commit27c80649f1fd619f030646fec65d1b65fb5911f1 (patch)
tree750170a2c708fac1bf0c78399d534d8050fd118f
parentd45dc9d26a3c9a6cd4638deea906d7e167389eec (diff)
Issue #2942588 by mohit1604, chr.fritsch, tstoeckler, bojanz, joshi.rohit100, hchonov: EntityListBuilder::render() should use the entity type plural label in the empty text
-rw-r--r--core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php2
-rw-r--r--core/lib/Drupal/Core/Entity/EntityListBuilder.php2
-rw-r--r--core/modules/action/tests/src/Functional/ActionListTest.php2
-rw-r--r--core/modules/block_content/tests/src/Functional/BlockContentListTest.php2
-rw-r--r--core/modules/config/tests/src/Functional/ConfigEntityListTest.php2
-rw-r--r--core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php6
-rw-r--r--core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php2
-rw-r--r--core/modules/workflows/tests/src/Functional/WorkflowUiTest.php4
8 files changed, 11 insertions, 11 deletions
diff --git a/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php b/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php
index f6bf463..d70aee8 100644
--- a/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php
+++ b/core/lib/Drupal/Core/Config/Entity/DraggableListBuilder.php
@@ -107,7 +107,7 @@ abstract class DraggableListBuilder extends ConfigEntityListBuilder implements F
$form[$this->entitiesKey] = [
'#type' => 'table',
'#header' => $this->buildHeader(),
- '#empty' => t('There is no @label yet.', ['@label' => $this->entityType->getLabel()]),
+ '#empty' => t('There are no @label yet.', ['@label' => $this->entityType->getPluralLabel()]),
'#tabledrag' => [
[
'action' => 'order',
diff --git a/core/lib/Drupal/Core/Entity/EntityListBuilder.php b/core/lib/Drupal/Core/Entity/EntityListBuilder.php
index 7191fae..91f4d21 100644
--- a/core/lib/Drupal/Core/Entity/EntityListBuilder.php
+++ b/core/lib/Drupal/Core/Entity/EntityListBuilder.php
@@ -223,7 +223,7 @@ class EntityListBuilder extends EntityHandlerBase implements EntityListBuilderIn
'#header' => $this->buildHeader(),
'#title' => $this->getTitle(),
'#rows' => [],
- '#empty' => $this->t('There is no @label yet.', ['@label' => $this->entityType->getLabel()]),
+ '#empty' => $this->t('There are no @label yet.', ['@label' => $this->entityType->getPluralLabel()]),
'#cache' => [
'contexts' => $this->entityType->getListCacheContexts(),
'tags' => $this->entityType->getListCacheTags(),
diff --git a/core/modules/action/tests/src/Functional/ActionListTest.php b/core/modules/action/tests/src/Functional/ActionListTest.php
index 309160f..fc67986 100644
--- a/core/modules/action/tests/src/Functional/ActionListTest.php
+++ b/core/modules/action/tests/src/Functional/ActionListTest.php
@@ -31,7 +31,7 @@ class ActionListTest extends BrowserTestBase {
$actions = $storage->loadMultiple();
$storage->delete($actions);
$this->drupalGet('/admin/config/system/actions');
- $this->assertRaw('There is no Action yet.');
+ $this->assertRaw('There are no actions yet.');
}
}
diff --git a/core/modules/block_content/tests/src/Functional/BlockContentListTest.php b/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
index aba60c3..9a26f1c 100644
--- a/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
+++ b/core/modules/block_content/tests/src/Functional/BlockContentListTest.php
@@ -103,7 +103,7 @@ class BlockContentListTest extends BlockContentTestBase {
$this->assertNoFieldByXpath('//td', $new_label, 'No label found for deleted custom block.');
// Confirm that the empty text is displayed.
- $this->assertText(t('There is no Custom block yet.'));
+ $this->assertText(t('There are no custom blocks yet.'));
}
}
diff --git a/core/modules/config/tests/src/Functional/ConfigEntityListTest.php b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php
index ae9be13..b92629d 100644
--- a/core/modules/config/tests/src/Functional/ConfigEntityListTest.php
+++ b/core/modules/config/tests/src/Functional/ConfigEntityListTest.php
@@ -243,7 +243,7 @@ class ConfigEntityListTest extends BrowserTestBase {
$this->assertNoFieldByXpath('//td', 'dotted.default', "No machine name found for deleted 'Default' entity.");
// Confirm that the empty text is displayed.
- $this->assertText('There is no Test configuration yet.');
+ $this->assertText('There are no test configuration entities yet.');
}
/**
diff --git a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php
index eeaf793..ce9050e 100644
--- a/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php
+++ b/core/modules/responsive_image/tests/src/Functional/ResponsiveImageAdminUITest.php
@@ -35,7 +35,7 @@ class ResponsiveImageAdminUITest extends BrowserTestBase {
public function testResponsiveImageAdmin() {
// We start without any default styles.
$this->drupalGet('admin/config/media/responsive-image-style');
- $this->assertText('There is no Responsive image style yet.');
+ $this->assertText('There are no responsive image styles yet.');
// Add a responsive image style.
$this->drupalGet('admin/config/media/responsive-image-style/add');
@@ -54,7 +54,7 @@ class ResponsiveImageAdminUITest extends BrowserTestBase {
// Check if the new group is created.
$this->assertResponse(200);
$this->drupalGet('admin/config/media/responsive-image-style');
- $this->assertNoText('There is no Responsive image style yet.');
+ $this->assertNoText('There are no responsive image styles yet.');
$this->assertText('Style One');
$this->assertText('style_one');
@@ -137,7 +137,7 @@ class ResponsiveImageAdminUITest extends BrowserTestBase {
$this->drupalGet('admin/config/media/responsive-image-style/style_one/delete');
$this->drupalPostForm(NULL, [], t('Delete'));
$this->drupalGet('admin/config/media/responsive-image-style');
- $this->assertText('There is no Responsive image style yet.');
+ $this->assertText('There are no responsive image styles yet.');
}
}
diff --git a/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php b/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php
index 197386e..01c61ac 100644
--- a/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php
+++ b/core/modules/workflows/tests/src/Functional/WorkflowUiNoTypeTest.php
@@ -49,7 +49,7 @@ class WorkflowUiNoTypeTest extends BrowserTestBase {
$this->drupalGet('admin/config/workflow/workflows');
$this->assertSession()->pageTextNotContains('There are no workflow types available. In order to create workflows you need to install a module that provides a workflow type. For example, the Content Moderation module provides a workflow type that enables workflows for content entities.');
$this->assertSession()->linkExists('Add workflow');
- $this->assertSession()->pageTextContains('There is no Workflow yet.');
+ $this->assertSession()->pageTextContains('There are no workflows yet.');
}
}
diff --git a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
index b15b240..d349220 100644
--- a/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
+++ b/core/modules/workflows/tests/src/Functional/WorkflowUiTest.php
@@ -109,7 +109,7 @@ class WorkflowUiTest extends BrowserTestBase {
$this->assertSession()->linkByHrefExists('admin/config/workflow/workflows');
$this->clickLink('Workflows');
$this->assertSession()->pageTextContains('Workflows');
- $this->assertSession()->pageTextContains('There is no Workflow yet.');
+ $this->assertSession()->pageTextContains('There are no workflows yet.');
$this->clickLink('Add workflow');
$this->submitForm(['label' => 'Test', 'id' => 'test', 'workflow_type' => 'workflow_type_test'], 'Save');
$this->assertSession()->pageTextContains('Created the Test Workflow.');
@@ -253,7 +253,7 @@ class WorkflowUiTest extends BrowserTestBase {
$this->assertSession()->pageTextContains('Are you sure you want to delete Test?');
$this->submitForm([], 'Delete');
$this->assertSession()->pageTextContains('Workflow Test deleted.');
- $this->assertSession()->pageTextContains('There is no Workflow yet.');
+ $this->assertSession()->pageTextContains('There are no workflows yet.');
$this->assertNull($workflow_storage->loadUnchanged('test'), 'The test workflow has been deleted');
// Ensure that workflow types with default configuration are initialized