diff --git a/core/modules/block/block.module b/core/modules/block/block.module index 2d40d78..75d7b22 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -22,21 +22,21 @@ function block_help($route_name, RouteMatchInterface $route_match) { $block_content = \Drupal::moduleHandler()->moduleExists('block_content') ? \Drupal::url('help.page', array('name' => 'block_content')) : '#'; $output = ''; $output .= '

' . t('About') . '

'; - $output .= '

' . t('The Block module allows you to place blocks in regions of your installed themes, and configure block settings. For more information, see the online documentation for the Block module.', array('!blocks-documentation' => 'https://www.drupal.org/documentation/modules/block/')) . '

'; + $output .= '

' . t('The Block module allows you to place blocks in regions of your installed themes, and configure block settings. For more information, see the online documentation for the Block module.', array('@blocks-documentation' => 'https://www.drupal.org/documentation/modules/block/')) . '

'; $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Placing and moving blocks') . '
'; - $output .= '
' . t('You can place a new block by clicking on its title in the Place blocks list on the Block layout page and choosing a region to place it in. Once a block is placed, it can be moved to a different region by dragging or using the drop-down Region list, and then clicking Save blocks.', array('!blocks' => \Drupal::url('block.admin_display'))) . '
'; + $output .= '
' . t('You can place a new block by clicking on its title in the Place blocks list on the Block layout page and choosing a region to place it in. Once a block is placed, it can be moved to a different region by dragging or using the drop-down Region list, and then clicking Save blocks.', array('@blocks' => \Drupal::url('block.admin_display'))) . '
'; $output .= '
' . t('Toggling between different themes') . '
'; $output .= '
' . t('Blocks are placed and configured specifically for each theme. The Block layout page opens with the default theme, but you can toggle to other installed themes.') . '
'; $output .= '
' . t('Demonstrating block regions for a theme') . '
'; - $output .= '
' . t('You can see where the regions are for the current theme by clicking the Demonstrate block regions link on the Block layout page. Regions are specific to each theme.', array('!blocks' => \Drupal::url('block.admin_display'))) . '
'; + $output .= '
' . t('You can see where the regions are for the current theme by clicking the Demonstrate block regions link on the Block layout page. Regions are specific to each theme.', array('@blocks' => \Drupal::url('block.admin_display'))) . '
'; $output .= '
' . t('Configuring block settings') . '
'; - $output .= '
' . t('To change the settings of an individual block click on the Configure link on the Block layout page. The available options vary depending on the module that provides the block. For all blocks you can change the block title and toggle whether to display it.', array('!blocks' => Drupal::url('block.admin_display'))) . '
'; + $output .= '
' . t('To change the settings of an individual block click on the Configure link on the Block layout page. The available options vary depending on the module that provides the block. For all blocks you can change the block title and toggle whether to display it.', array('@blocks' => Drupal::url('block.admin_display'))) . '
'; $output .= '
' . t('Controlling visibility') . '
'; $output .= '
' . t('You can control the visibility of a block by restricting it to specific pages, content types, and/or roles by setting the appropriate options under Visibility settings of the block configuration.') . '
'; $output .= '
' . t('Adding custom blocks') . '
'; - $output .= '
' . t('You can add custom blocks, if the Custom Block module is installed. For more information, see the Custom Block help page.', array('!blockcontent-help' => $block_content)) . '
'; + $output .= '
' . t('You can add custom blocks, if the Custom Block module is installed. For more information, see the Custom Block help page.', array('@blockcontent-help' => $block_content)) . '
'; $output .= '
'; return $output; } diff --git a/core/modules/block_content/block_content.module b/core/modules/block_content/block_content.module index 04a1e6c..bc61ed5 100644 --- a/core/modules/block_content/block_content.module +++ b/core/modules/block_content/block_content.module @@ -18,22 +18,22 @@ function block_content_help($route_name, RouteMatchInterface $route_match) { $field_ui = \Drupal::moduleHandler()->moduleExists('field_ui') ? \Drupal::url('help.page', array('name' => 'field_ui')) : '#'; $output = ''; $output .= '

' . t('About') . '

'; - $output .= '

' . t('The Custom Block module allows you to create custom block types and content-containing blocks, and provides a Custom block library listing all of them. Custom block types have fields; see the Field module help for more information. Once created, custom blocks can be placed in regions just like blocks provided by other modules; see the Block module help page for details. For more information, see the online documentation for the Custom Block module.', array('!block-library' => \Drupal::url('entity.block_content.collection'), '!block-content' => \Drupal::url('entity.block_content.collection'), '!field-help' => \Drupal::url('help.page', array('name' => 'field')), '!blocks' => \Drupal::url('help.page', array('name' => 'block')), '!online-help' => 'https://www.drupal.org/documentation/modules/block_content')) . '

'; + $output .= '

' . t('The Custom Block module allows you to create custom block types and content-containing blocks, and provides a Custom block library listing all of them. Custom block types have fields; see the Field module help for more information. Once created, custom blocks can be placed in regions just like blocks provided by other modules; see the Block module help page for details. For more information, see the online documentation for the Custom Block module.', array('@block-library' => \Drupal::url('entity.block_content.collection'), '@block-content' => \Drupal::url('entity.block_content.collection'), '@field-help' => \Drupal::url('help.page', array('name' => 'field')), '@blocks' => \Drupal::url('help.page', array('name' => 'block')), '@online-help' => 'https://www.drupal.org/documentation/modules/block_content')) . '

'; $output .= '

' . t('Uses') . '

'; $output .= '
'; $output .= '
' . t('Creating and managing custom block types') . '
'; - $output .= '
' . t('Users with the Administer blocks permission can create and edit custom block types with fields and display settings, from the Custom block types page in the Custom block library. For more information about managing fields and display settings, see the Field UI module help.', array('!types' => \Drupal::url('entity.block_content_type.collection'), '!field-ui' => $field_ui)) . '
'; + $output .= '
' . t('Users with the Administer blocks permission can create and edit custom block types with fields and display settings, from the Custom block types page in the Custom block library. For more information about managing fields and display settings, see the Field UI module help.', array('@types' => \Drupal::url('entity.block_content_type.collection'), '@field-ui' => $field_ui)) . '
'; $output .= '
' . t('Creating custom blocks') . '
'; - $output .= '
' . t('Users with the Administer blocks permission can create, edit, and delete custom blocks of each custom block type you have defined, from the Custom block library page. Custom blocks are shown in the Place blocks list on the Block layout page; see the Block module help for more information about placing blocks.', array('!blocks' => \Drupal::url('block.admin_display'), '!block-library' => \Drupal::url('entity.block_content.collection'), '!block_help' => \Drupal::url('help.page', array('name' => 'block')))) . '
'; + $output .= '
' . t('Users with the Administer blocks permission can create, edit, and delete custom blocks of each custom block type you have defined, from the Custom block library page. Custom blocks are shown in the Place blocks list on the Block layout page; see the Block module help for more information about placing blocks.', array('@blocks' => \Drupal::url('block.admin_display'), '@block-library' => \Drupal::url('entity.block_content.collection'), '@block_help' => \Drupal::url('help.page', array('name' => 'block')))) . '
'; $output .= '
'; return $output; case 'entity.block_content.collection': - $output = '

' . t('Blocks in the block library belong to block types, each with its own fields and display settings. After creating a block, place it in a region from the Block layout page.', array('!types' => \Drupal::url('entity.block_content_type.collection'), '!blocks' => \Drupal::url('block.admin_display'))) . '

'; + $output = '

' . t('Blocks in the block library belong to block types, each with its own fields and display settings. After creating a block, place it in a region from the Block layout page.', array('@types' => \Drupal::url('entity.block_content_type.collection'), '@blocks' => \Drupal::url('block.admin_display'))) . '

'; return $output; case 'entity.block_content_type.collection': - $output = '

' . t('Each block type has its own fields and display settings. Create blocks of each type on the Block library page.', array('!block-library' => \Drupal::url('entity.block_content.collection'))) . '

'; + $output = '

' . t('Each block type has its own fields and display settings. Create blocks of each type on the Block library page.', array('@block-library' => \Drupal::url('entity.block_content.collection'))) . '

'; return $output; } diff --git a/core/modules/block_content/src/Controller/BlockContentController.php b/core/modules/block_content/src/Controller/BlockContentController.php index f712367..fc71070 100644 --- a/core/modules/block_content/src/Controller/BlockContentController.php +++ b/core/modules/block_content/src/Controller/BlockContentController.php @@ -86,8 +86,8 @@ public function add(Request $request) { } if (count($types) === 0) { return array( - '#markup' => $this->t('You have not created any block types yet. Go to the block type creation page to add a new block type.', [ - '!url' => Url::fromRoute('block_content.type_add')->toString(), + '#markup' => $this->t('You have not created any block types yet. Go to the block type creation page to add a new block type.', [ + '@url' => Url::fromRoute('block_content.type_add')->toString(), ]), ); } diff --git a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php index b4596f1..22d3680 100644 --- a/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php +++ b/core/modules/block_content/src/Plugin/Block/BlockContentBlock.php @@ -156,9 +156,9 @@ public function build() { } else { return array( - '#markup' => $this->t('Block with uuid %uuid does not exist. Add custom block.', array( + '#markup' => $this->t('Block with uuid %uuid does not exist. Add custom block.', array( '%uuid' => $this->getDerivativeId(), - '!url' => $this->urlGenerator->generate('block_content.add_page') + '@url' => $this->urlGenerator->generate('block_content.add_page') )), '#access' => $this->account->hasPermission('administer blocks') ); diff --git a/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php b/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php index 0e25190..9ee05ec 100644 --- a/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php +++ b/core/modules/block_content/src/Plugin/views/area/ListingEmpty.php @@ -78,7 +78,7 @@ public function render($empty = FALSE) { /** @var \Drupal\Core\Access\AccessResultInterface|\Drupal\Core\Cache\CacheableDependencyInterface $access_result */ $access_result = $this->accessManager->checkNamedRoute('block_content.add_page', array(), $this->currentUser, TRUE); $element = array( - '#markup' => $this->t('Add a custom block.', array('!url' => Url::fromRoute('block_content.add_page')->toString())), + '#markup' => $this->t('Add a custom block.', array('@url' => Url::fromRoute('block_content.add_page')->toString())), '#access' => $access_result->isAllowed(), '#cache' => [ 'contexts' => $access_result->getCacheContexts(), diff --git a/core/modules/block_content/src/Tests/BlockContentCreationTest.php b/core/modules/block_content/src/Tests/BlockContentCreationTest.php index 6bf250c..84f8e7f 100644 --- a/core/modules/block_content/src/Tests/BlockContentCreationTest.php +++ b/core/modules/block_content/src/Tests/BlockContentCreationTest.php @@ -48,8 +48,8 @@ public function testBlockContentCreation() { $this->drupalPostForm('block/add/basic', $edit, t('Save')); // Check that the Basic block has been created. - $this->assertRaw(format_string('!block %name has been created.', array( - '!block' => 'basic', + $this->assertRaw(format_string('@block %name has been created.', array( + '@block' => 'basic', '%name' => $edit['info[0][value]'] )), 'Basic block created.'); @@ -95,8 +95,8 @@ public function testBlockContentCreationMultipleViewModes() { $this->drupalPostForm('block/add/basic', $edit, t('Save')); // Check that the Basic block has been created. - $this->assertRaw(format_string('!block %name has been created.', array( - '!block' => 'basic', + $this->assertRaw(format_string('@block %name has been created.', array( + '@block' => 'basic', '%name' => $edit['info[0][value]'] )), 'Basic block created.'); @@ -144,8 +144,8 @@ public function testDefaultBlockContentCreation() { $this->drupalPostForm('block/add', $edit, t('Save')); // Check that the block has been created and that it is a basic block. - $this->assertRaw(format_string('!block %name has been created.', array( - '!block' => 'basic', + $this->assertRaw(format_string('@block %name has been created.', array( + '@block' => 'basic', '%name' => $edit['info[0][value]'], )), 'Basic block created.'); diff --git a/core/modules/block_content/src/Tests/BlockContentRevisionsTest.php b/core/modules/block_content/src/Tests/BlockContentRevisionsTest.php index 8da9c54..15e7a10 100644 --- a/core/modules/block_content/src/Tests/BlockContentRevisionsTest.php +++ b/core/modules/block_content/src/Tests/BlockContentRevisionsTest.php @@ -69,8 +69,8 @@ public function testRevisions() { // Confirm the correct revision text appears. $loaded = entity_revision_load('block_content', $revision_id); // Verify revision log is the same. - $this->assertEqual($loaded->getRevisionLog(), $logs[$delta], format_string('Correct log message found for revision !revision', array( - '!revision' => $loaded->getRevisionId(), + $this->assertEqual($loaded->getRevisionLog(), $logs[$delta], format_string('Correct log message found for revision @revision', array( + '@revision' => $loaded->getRevisionId(), ))); } diff --git a/core/modules/block_content/src/Tests/BlockContentTypeTest.php b/core/modules/block_content/src/Tests/BlockContentTypeTest.php index 20dc1a2..422f59c 100644 --- a/core/modules/block_content/src/Tests/BlockContentTypeTest.php +++ b/core/modules/block_content/src/Tests/BlockContentTypeTest.php @@ -52,8 +52,8 @@ public function testBlockContentTypeCreation() { // Test the page with no block-types. $this->drupalGet('block/add'); $this->assertResponse(200); - $this->assertRaw(t('You have not created any block types yet. Go to the block type creation page to add a new block type.', [ - '!url' => Url::fromRoute('block_content.type_add')->toString(), + $this->assertRaw(t('You have not created any block types yet. Go to the block type creation page to add a new block type.', [ + '@url' => Url::fromRoute('block_content.type_add')->toString(), ])); // Now create an initial block-type. $this->createBlockContentType('basic', TRUE); diff --git a/core/modules/block_content/src/Tests/PageEditTest.php b/core/modules/block_content/src/Tests/PageEditTest.php index fdd1743..e2ce38f 100644 --- a/core/modules/block_content/src/Tests/PageEditTest.php +++ b/core/modules/block_content/src/Tests/PageEditTest.php @@ -64,7 +64,7 @@ public function testPageEdit() { // Test deleting the block. $this->drupalGet("block/" . $revised_block->id()); $this->clickLink(t('Delete')); - $this->assertText(format_string('Are you sure you want to delete the custom block !label?', array('!label' => $revised_block->label()))); + $this->assertText(format_string('Are you sure you want to delete the custom block @label?', array('@label' => $revised_block->label()))); } }