diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php index 71e37f6..89f4822 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayPath.php @@ -35,13 +35,13 @@ public function testPathUI() { // Add a new page display and check the appearing text. $this->drupalPost(NULL, array(), 'Add Page'); $this->assertText(t('No path is set'), 'The right text appears if no path was set.'); - $this->assertNoLink(t('view @display', array('@display' => 'page')), 'No view page link found on the page.'); + $this->assertNoLink(t('View @display', array('@display' => 'page')), 'No view page link found on the page.'); // Save a path and make sure the summary appears as expected. $random_path = $this->randomName(); $this->drupalPost("admin/structure/views/nojs/display/test_view/page_1/path", array('path' => $random_path), t('Apply')); $this->assertText('/' . $random_path, 'The custom path appears in the summary.'); - $this->assertLink(t('view @display', array('@display' => 'Page')), 0, 'view page link found on the page.'); + $this->assertLink(t('View @display', array('@display' => 'Page')), 0, 'view page link found on the page.'); } /** @@ -50,7 +50,7 @@ public function testPathUI() { public function testDeleteWithNoPath() { $this->drupalGet('admin/structure/views/view/test_view'); $this->drupalPost(NULL, array(), t('Add Page')); - $this->drupalPost(NULL, array(), t('delete Page')); + $this->drupalPost(NULL, array(), t('Delete Page')); $this->drupalPost(NULL, array(), t('Save')); $this->assertRaw(t('The view %view has been saved.', array('%view' => 'Test view'))); } diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php index 3c22792..472ea04 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/DisplayTest.php @@ -63,14 +63,14 @@ public function testRemoveDisplay() { $path_prefix = 'admin/structure/views/view/' . $view['id'] .'/edit'; $this->drupalGet($path_prefix . '/default'); - $this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete', 'delete Page', 'Make sure there is no delete button on the default display.'); + $this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete', 'Delete Page', 'Make sure there is no delete button on the default display.'); $this->drupalGet($path_prefix . '/page_1'); - $this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete', 'delete Page', 'Make sure there is a delete button on the page display.'); + $this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete', 'Delete Page', 'Make sure there is a delete button on the page display.'); // Delete the page, so we can test the undo process. - $this->drupalPost($path_prefix . '/page_1', array(), 'delete Page'); - $this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete', 'undo delete of Page', 'Make sure there a undo button on the page display after deleting.'); + $this->drupalPost($path_prefix . '/page_1', array(), 'Delete Page'); + $this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete', 'Undo delete of Page', 'Make sure there a undo button on the page display after deleting.'); $element = $this->xpath('//a[contains(@href, :href) and contains(@class, :class)]', array(':href' => $path_prefix . '/page_1', ':class' => 'views-display-deleted-link')); $this->assertTrue(!empty($element), 'Make sure the display link is marked as to be deleted.'); @@ -78,12 +78,12 @@ public function testRemoveDisplay() { $this->assertTrue(!empty($element), 'Make sure the display link is marked as to be deleted.'); // Undo the deleting of the display. - $this->drupalPost($path_prefix . '/page_1', array(), 'undo delete of Page'); - $this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete', 'undo delete of Page', 'Make sure there is no undo button on the page display after reverting.'); - $this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete', 'delete Page', 'Make sure there is a delete button on the page display after the reverting.'); + $this->drupalPost($path_prefix . '/page_1', array(), 'Undo delete of Page'); + $this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-undo-delete', 'Undo delete of Page', 'Make sure there is no undo button on the page display after reverting.'); + $this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-delete', 'Delete Page', 'Make sure there is a delete button on the page display after the reverting.'); // Now delete again and save the view. - $this->drupalPost($path_prefix . '/page_1', array(), 'delete Page'); + $this->drupalPost($path_prefix . '/page_1', array(), 'Delete Page'); $this->drupalPost(NULL, array(), t('Save')); $this->assertNoLinkByHref($path_prefix . '/page_1', 'Make sure there is no display tab for the deleted display.'); @@ -120,7 +120,7 @@ public function testReorderDisplay() { $view = $this->randomView($view); $path_prefix = 'admin/structure/views/view/' . $view['id'] .'/edit'; - $this->clickLink(t('reorder displays')); + $this->clickLink(t('Reorder displays')); $this->assertTrue($this->xpath('//tr[@id="display-row-default"]'), 'Make sure the default display appears on the reorder listing'); $this->assertTrue($this->xpath('//tr[@id="display-row-page_1"]'), 'Make sure the page display appears on the reorder listing'); $this->assertTrue($this->xpath('//tr[@id="display-row-block_1"]'), 'Make sure the block display appears on the reorder listing'); @@ -157,7 +157,7 @@ public function testCloneDisplay() { $path_prefix = 'admin/structure/views/view/' . $view['id'] .'/edit'; $this->drupalGet($path_prefix); - $this->drupalPost(NULL, array(), 'clone Page'); + $this->drupalPost(NULL, array(), 'Clone Page'); $this->assertLinkByHref($path_prefix . '/page_2', 0, 'Make sure after cloning the new display appears in the UI'); $this->assertUrl($path_prefix . '/page_2', array(), 'The user got redirected to the new display.'); @@ -168,7 +168,7 @@ public function testCloneDisplay() { $this->drupalPost("admin/structure/views/nojs/display/{$view['id']}/page_2/css_class", array('override[dropdown]' => 'page_2', 'css_class' => $random_css), t('Apply')); // Clone as a different display type. - $this->drupalPost(NULL, array(), 'clone as Block'); + $this->drupalPost(NULL, array(), 'Clone as Block'); $this->assertLinkByHref($path_prefix . '/block_1', 0, 'Make sure after cloning the new display appears in the UI'); $this->assertUrl($path_prefix . '/block_1', array(), 'The user got redirected to the new display.'); $this->assertText(t('Block settings')); @@ -201,12 +201,12 @@ public function testDisableDisplay() { $this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-disable', '', 'Make sure the disable button is visible.'); $this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-enable', '', 'Make sure the enable button is not visible.'); - $this->drupalPost(NULL, array(), 'disable Page'); + $this->drupalPost(NULL, array(), 'Disable Page'); $this->assertTrue($this->xpath('//div[contains(@class, :class)]', array(':class' => 'views-display-disabled')), 'Make sure the disabled display css class appears once the display is marked as such.'); $this->assertNoFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-disable', '', 'Make sure the disable button is not visible.'); $this->assertFieldById('edit-displays-settings-settings-content-tab-content-details-top-actions-enable', '', 'Make sure the enable button is visible.'); - $this->drupalPost(NULL, array(), 'enable Page'); + $this->drupalPost(NULL, array(), 'Enable Page'); $this->assertFalse($this->xpath('//div[contains(@class, :class)]', array(':class' => 'views-display-disabled')), 'Make sure the disabled display css class does not appears once the display is enabled again.'); } diff --git a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php index ff34a3d..cc45d99 100644 --- a/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php +++ b/core/modules/views_ui/lib/Drupal/views_ui/ViewEditFormController.php @@ -350,7 +350,7 @@ public function getDisplayDetails($view, $display) { if (!$is_enabled) { $build['top']['actions']['enable'] = array( '#type' => 'submit', - '#value' => t('enable @display_title', array('@display_title' => $display_title)), + '#value' => t('Enable @display_title', array('@display_title' => $display_title)), '#limit_validation_errors' => array(), '#submit' => array(array($this, 'submitDisplayEnable'), array($this, 'submitDelayDestination')), '#prefix' => '