diff -u b/core/modules/layout_builder/src/Controller/ChooseBlockController.php b/core/modules/layout_builder/src/Controller/ChooseBlockController.php --- b/core/modules/layout_builder/src/Controller/ChooseBlockController.php +++ b/core/modules/layout_builder/src/Controller/ChooseBlockController.php @@ -101,7 +101,9 @@ $build['add_block'] = [ '#type' => 'link', '#url' => $url, - '#title' => $this->t('Create new content'), + '#title' => $this->t('Create @entity_type', [ + '@entity_type' => $this->entityTypeManager->getDefinition('block_content')->getSingularLabel(), + ]), '#attributes' => $this->getAjaxAttributes(), ]; $build['add_block']['#attributes']['class'][] = 'inline-block-create-button'; diff -u b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php --- b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockPrivateFilesTest.php @@ -192,8 +192,8 @@ $page = $this->getSession()->getPage(); $page->clickLink('Add Block'); $assert_session->assertWaitOnAjaxRequest(); - $this->assertNotEmpty($assert_session->waitForLink('Create new content')); - $this->clickLink('Create new content'); + $this->assertNotEmpty($assert_session->waitForLink('Create custom block')); + $this->clickLink('Create custom block'); $assert_session->assertWaitOnAjaxRequest(); $assert_session->fieldValueEquals('Title', ''); $page->findField('Title')->setValue($title); diff -u b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php --- b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php @@ -462,7 +462,7 @@ $page->clickLink('Add Block'); $assert_session->assertWaitOnAjaxRequest(); // Confirm that with no block content types the link does not appear. - $assert_session->linkNotExists('Create new content'); + $assert_session->linkNotExists('Create custom block'); $this->createBlockContentType('basic', 'Basic block'); @@ -470,10 +470,10 @@ // Add a basic block with the body field set. $page->clickLink('Add Block'); $assert_session->assertWaitOnAjaxRequest(); - // Confirm with only 1 type the "Create new content" link goes directly to block - // add form. + // Confirm with only 1 type the "Create custom block" link goes directly t + // block add form. $assert_session->linkNotExists('Basic block'); - $this->clickLink('Create new content'); + $this->clickLink('Create custom block'); $assert_session->assertWaitOnAjaxRequest(); $assert_session->fieldExists('Title'); @@ -482,11 +482,12 @@ $this->drupalGet($layout_default_path); // Add a basic block with the body field set. $page->clickLink('Add Block'); - // Confirm more than 1 type exists "Create new content" shows a list block types. + // Confirm that, when more than 1 type exists, "Create custom block" shows a + // list of block types. $assert_session->assertWaitOnAjaxRequest(); $assert_session->linkNotExists('Basic block'); $assert_session->linkNotExists('Advanced block'); - $this->clickLink('Create new content'); + $this->clickLink('Create custom block'); $assert_session->assertWaitOnAjaxRequest(); $assert_session->fieldNotExists('Title'); $assert_session->linkExists('Basic block'); diff -u b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php --- b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php +++ b/core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTestBase.php @@ -140,8 +140,8 @@ $page = $this->getSession()->getPage(); $page->clickLink('Add Block'); $assert_session->assertWaitOnAjaxRequest(); - $this->assertNotEmpty($assert_session->waitForLink('Create new content')); - $this->clickLink('Create new content'); + $this->assertNotEmpty($assert_session->waitForLink('Create custom block')); + $this->clickLink('Create custom block'); $assert_session->assertWaitOnAjaxRequest(); $textarea = $assert_session->waitForElement('css', '[name="settings[block_form][body][0][value]"]'); $this->assertNotEmpty($textarea);