diff --git a/core/modules/action/tests/src/Functional/BulkFormTest.php b/core/modules/action/tests/src/Functional/BulkFormTest.php index c3a3bc1fcc74bd6eec0c385a0119520b588dd0eb..7d32b94711263f179f2435d5c76b89d6e42ac1e6 100644 --- a/core/modules/action/tests/src/Functional/BulkFormTest.php +++ b/core/modules/action/tests/src/Functional/BulkFormTest.php @@ -68,7 +68,7 @@ public function testBulkForm() { // Set all nodes to sticky and check that. $edit += array('action' => 'node_make_sticky_action'); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); foreach ($nodes as $node) { $changed_node = $node_storage->load($node->id()); @@ -82,7 +82,7 @@ public function testBulkForm() { $this->assertTrue($node->isPublished(), 'The node is published.'); $edit = array('node_bulk_form[0]' => TRUE, 'action' => 'node_unpublish_action'); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); $this->assertText('Unpublish content was applied to 1 item.'); @@ -123,7 +123,7 @@ public function testBulkForm() { // Check the default title. $this->drupalGet('test_bulk_form'); $result = $this->xpath('//label[@for="edit-action"]'); - $this->assertEqual('With selection', $result[0]->getText()); + $this->assertEqual('Action', $result[0]->getText()); // Setup up a different bulk form title. $view = Views::getView('test_bulk_form'); @@ -142,7 +142,7 @@ public function testBulkForm() { $edit["node_bulk_form[$i]"] = TRUE; } $edit += array('action' => 'node_delete_action'); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); // Make sure we don't show an action message while we are still on the // confirmation page. $errors = $this->xpath('//div[contains(@class, "messages--status")]'); diff --git a/core/modules/node/src/Tests/Views/BulkFormAccessTest.php b/core/modules/node/src/Tests/Views/BulkFormAccessTest.php index 050068b25425b93cd8175319f52f5b9289289837..a9f9ba93de7a27a6104653759ad24980e90b5df7 100644 --- a/core/modules/node/src/Tests/Views/BulkFormAccessTest.php +++ b/core/modules/node/src/Tests/Views/BulkFormAccessTest.php @@ -87,7 +87,7 @@ public function testNodeEditAccess() { 'node_bulk_form[0]' => TRUE, 'action' => 'node_unpublish_action', ); - $this->drupalPostForm('test-node-bulk-form', $edit, t('Apply')); + $this->drupalPostForm('test-node-bulk-form', $edit, t('Apply to selected items')); $this->assertRaw(SafeMarkup::format('No access to execute %action on the @entity_type_label %entity_label.', [ '%action' => 'Unpublish content', '@entity_type_label' => 'Content', @@ -115,7 +115,7 @@ public function testNodeEditAccess() { 'node_bulk_form[0]' => TRUE, 'action' => 'node_unpublish_action', ); - $this->drupalPostForm('test-node-bulk-form', $edit, t('Apply')); + $this->drupalPostForm('test-node-bulk-form', $edit, t('Apply to selected items')); // Re-load the node and check the status. $node = Node::load($node->id()); $this->assertTrue($node->isPublished(), 'The node is still published.'); @@ -160,7 +160,7 @@ public function testNodeDeleteAccess() { 'node_bulk_form[1]' => TRUE, 'action' => 'node_delete_action', ); - $this->drupalPostForm('test-node-bulk-form', $edit, t('Apply')); + $this->drupalPostForm('test-node-bulk-form', $edit, t('Apply to selected items')); $this->drupalPostForm(NULL, array(), t('Delete')); // Ensure the private node still exists. $private_node = Node::load($private_node->id()); diff --git a/core/modules/node/src/Tests/Views/BulkFormTest.php b/core/modules/node/src/Tests/Views/BulkFormTest.php index b2e3ae4f6b5601b674577f13e490d90cfea2b5f3..677c9d83a1b65107905676819a06ba5bfd2d033f 100644 --- a/core/modules/node/src/Tests/Views/BulkFormTest.php +++ b/core/modules/node/src/Tests/Views/BulkFormTest.php @@ -105,7 +105,7 @@ public function testBulkForm() { 'node_bulk_form[0]' => TRUE, 'action' => 'node_unpublish_action', ); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); $node = $this->loadNode($node->id()); $this->assertFalse($node->isPublished(), 'Node has been unpublished'); $this->assertTrue($node->getTranslation('en-gb')->isPublished(), 'Node translation has not been unpublished'); @@ -116,7 +116,7 @@ public function testBulkForm() { 'node_bulk_form[0]' => TRUE, 'action' => 'node_publish_action', ); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); $node = $this->loadNode($node->id()); $this->assertTrue($node->isPublished(), 'Node has been published again'); @@ -128,7 +128,7 @@ public function testBulkForm() { 'node_bulk_form[0]' => TRUE, 'action' => 'node_make_sticky_action', ); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); $node = $this->loadNode($node->id()); $this->assertTrue($node->isSticky(), 'Node has been made sticky'); $this->assertFalse($node->getTranslation('en-gb')->isSticky(), 'Node translation has not been made sticky'); @@ -139,7 +139,7 @@ public function testBulkForm() { 'node_bulk_form[0]' => TRUE, 'action' => 'node_make_unsticky_action', ); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); $node = $this->loadNode($node->id()); $this->assertFalse($node->isSticky(), 'Node is not sticky anymore'); @@ -151,7 +151,7 @@ public function testBulkForm() { 'node_bulk_form[0]' => TRUE, 'action' => 'node_promote_action', ); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); $node = $this->loadNode($node->id()); $this->assertTrue($node->isPromoted(), 'Node has been promoted to the front page'); $this->assertFalse($node->getTranslation('en-gb')->isPromoted(), 'Node translation has not been promoted to the front page'); @@ -162,7 +162,7 @@ public function testBulkForm() { 'node_bulk_form[0]' => TRUE, 'action' => 'node_unpromote_action', ); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); $node = $this->loadNode($node->id()); $this->assertFalse($node->isPromoted(), 'Node has been demoted'); @@ -185,7 +185,7 @@ public function testBulkForm() { 'node_bulk_form[9]' => FALSE, // Node 5, British English, untranslated. 'action' => 'node_unpublish_action', ); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); $node = $this->loadNode(1); $this->assertFalse($node->getTranslation('en')->isPublished(), '1: English translation has been unpublished'); $this->assertFalse($node->getTranslation('en-gb')->isPublished(), '1: British English translation has been unpublished'); @@ -226,7 +226,7 @@ public function testBulkDeletion() { 'node_bulk_form[9]' => FALSE, // Node 5, British English, untranslated. 'action' => 'node_delete_action', ); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); $label = $this->loadNode(1)->label(); $this->assertText("$label (Original translation) - The following content translations will be deleted:"); diff --git a/core/modules/system/src/Plugin/views/field/BulkForm.php b/core/modules/system/src/Plugin/views/field/BulkForm.php index d5842bc2cb4744787db71abf6775918d27b3e4bb..f0f83a4318405826931ad88ff4b1aead99e09c7c 100644 --- a/core/modules/system/src/Plugin/views/field/BulkForm.php +++ b/core/modules/system/src/Plugin/views/field/BulkForm.php @@ -162,7 +162,7 @@ protected function getView() { */ protected function defineOptions() { $options = parent::defineOptions(); - $options['action_title'] = array('default' => $this->t('With selection')); + $options['action_title'] = array('default' => $this->t('Action')); $options['include_exclude'] = array( 'default' => 'exclude', ); @@ -271,7 +271,7 @@ public function viewsForm(&$form, FormStateInterface $form_state) { } // Replace the form submit button label. - $form['actions']['submit']['#value'] = $this->t('Apply'); + $form['actions']['submit']['#value'] = $this->t('Apply to selected items'); // Ensure a consistent container for filters/operations in the view header. $form['header'] = array( diff --git a/core/modules/tracker/src/Tests/TrackerTest.php b/core/modules/tracker/src/Tests/TrackerTest.php index fa533c105870974e1f899379c3906bccad9e6268..a927e891c7f22f063a77edd8aa648a839f68c7c2 100644 --- a/core/modules/tracker/src/Tests/TrackerTest.php +++ b/core/modules/tracker/src/Tests/TrackerTest.php @@ -412,7 +412,7 @@ function testTrackerAdminUnpublish() { 'action' => 'node_unpublish_action', 'node_bulk_form[0]' => $node->id(), ); - $this->drupalPostForm('admin/content', $edit, t('Apply')); + $this->drupalPostForm('admin/content', $edit, t('Apply to selected items')); $this->drupalGet('activity'); $this->assertText(t('No content available.'), 'A node is displayed on the tracker listing pages.'); diff --git a/core/modules/user/src/Tests/UserAdminTest.php b/core/modules/user/src/Tests/UserAdminTest.php index 6569ad2940c7c0da0ac09be5fcb4d6c081fcbdd9..60fd56b445a8bde22facedc38b08f1ba07c8cafb 100644 --- a/core/modules/user/src/Tests/UserAdminTest.php +++ b/core/modules/user/src/Tests/UserAdminTest.php @@ -100,7 +100,7 @@ function testUserAdmin() { $config ->set('notify.status_blocked', TRUE) ->save(); - $this->drupalPostForm('admin/people', $edit, t('Apply'), array( + $this->drupalPostForm('admin/people', $edit, t('Apply to selected items'), array( // Sort the table by username so that we know reliably which user will be // targeted with the blocking action. 'query' => array('order' => 'name', 'sort' => 'asc') @@ -121,7 +121,7 @@ function testUserAdmin() { $editunblock = array(); $editunblock['action'] = 'user_unblock_user_action'; $editunblock['user_bulk_form[4]'] = TRUE; - $this->drupalPostForm('admin/people', $editunblock, t('Apply'), array( + $this->drupalPostForm('admin/people', $editunblock, t('Apply to selected items'), array( // Sort the table by username so that we know reliably which user will be // targeted with the blocking action. 'query' => array('order' => 'name', 'sort' => 'asc') diff --git a/core/modules/user/src/Tests/UserCancelTest.php b/core/modules/user/src/Tests/UserCancelTest.php index fe2151610a86600637c1b40fe89974e0d74b9253..4ce4d915458a3353b2c8acf050fc31c8b3469862 100644 --- a/core/modules/user/src/Tests/UserCancelTest.php +++ b/core/modules/user/src/Tests/UserCancelTest.php @@ -124,7 +124,7 @@ function testUserCancelUid1() { 'action' => 'user_cancel_user_action', 'user_bulk_form[0]' => TRUE, ); - $this->drupalPostForm('admin/people', $edit, t('Apply')); + $this->drupalPostForm('admin/people', $edit, t('Apply to selected items')); // Verify that uid 1's account was not cancelled. $user_storage->resetCache(array(1)); @@ -567,7 +567,7 @@ function testMassUserCancelByAdmin() { for ($i = 0; $i <= 4; $i++) { $edit['user_bulk_form[' . $i . ']'] = TRUE; } - $this->drupalPostForm('admin/people', $edit, t('Apply')); + $this->drupalPostForm('admin/people', $edit, t('Apply to selected items')); $this->assertText(t('Are you sure you want to cancel these user accounts?'), 'Confirmation form to cancel accounts displayed.'); $this->assertText(t('When cancelling these accounts'), 'Allows to select account cancellation method.'); $this->assertText(t('Require email confirmation to cancel account'), 'Allows to send confirmation mail.'); diff --git a/core/modules/user/src/Tests/Views/BulkFormAccessTest.php b/core/modules/user/src/Tests/Views/BulkFormAccessTest.php index 47d283331be83755d0f5e191460eca32ca62a391..3aa5f93f4e2fee3b35d74e68b7e3698bdd5acb1f 100644 --- a/core/modules/user/src/Tests/Views/BulkFormAccessTest.php +++ b/core/modules/user/src/Tests/Views/BulkFormAccessTest.php @@ -50,7 +50,7 @@ public function testUserEditAccess() { 'user_bulk_form[' . ($no_edit_user->id() - 1) . ']' => TRUE, 'action' => 'user_block_user_action', ); - $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply')); + $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply to selected items')); $this->assertResponse(200); $this->assertRaw(SafeMarkup::format('No access to execute %action on the @entity_type_label %entity_label.', [ @@ -71,7 +71,7 @@ public function testUserEditAccess() { 'user_bulk_form[' . ($normal_user->id() - 1) . ']' => TRUE, 'action' => 'user_block_user_action', ); - $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply')); + $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply to selected items')); $normal_user = User::load($normal_user->id()); $this->assertTrue($normal_user->isBlocked(), 'The user is blocked.'); @@ -83,7 +83,7 @@ public function testUserEditAccess() { 'user_bulk_form[' . ($normal_user->id() - 1) . ']' => TRUE, 'action' => 'user_unblock_user_action', ); - $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply')); + $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply to selected items')); // Re-load the normal user and ensure it is still blocked. $normal_user = User::load($normal_user->id()); @@ -114,7 +114,7 @@ public function testUserDeleteAccess() { 'user_bulk_form[' . ($account2->id() - 1) . ']' => TRUE, 'action' => 'user_cancel_user_action', ); - $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply')); + $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply to selected items')); $edit = array( 'user_cancel_method' => 'user_cancel_delete', ); diff --git a/core/modules/user/src/Tests/Views/BulkFormTest.php b/core/modules/user/src/Tests/Views/BulkFormTest.php index c617c174e51bf6f8d16d75cade5020a1cdc01d23..00bdc821b013cc3180537ba3608868af5e436133 100644 --- a/core/modules/user/src/Tests/Views/BulkFormTest.php +++ b/core/modules/user/src/Tests/Views/BulkFormTest.php @@ -46,7 +46,7 @@ public function testBulkForm() { $edit = array( 'action' => 'user_block_user_action', ); - $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply')); + $this->drupalPostForm('test-user-bulk-form', $edit, t('Apply to selected items')); $this->assertText(t('No users selected.')); // Assign a role to a user. @@ -60,7 +60,7 @@ public function testBulkForm() { 'user_bulk_form[1]' => TRUE, 'action' => 'user_add_role_action.' . $role, ); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); // Re-load the user and check their roles. $user_storage->resetCache(array($account->id())); $account = $user_storage->load($account->id()); @@ -70,7 +70,7 @@ public function testBulkForm() { 'user_bulk_form[1]' => TRUE, 'action' => 'user_remove_role_action.' . $role, ); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); // Re-load the user and check their roles. $user_storage->resetCache(array($account->id())); $account = $user_storage->load($account->id()); @@ -83,7 +83,7 @@ public function testBulkForm() { 'user_bulk_form[1]' => TRUE, 'action' => 'user_block_user_action', ); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); // Re-load the user and check their status. $user_storage->resetCache(array($account->id())); $account = $user_storage->load($account->id()); @@ -104,7 +104,7 @@ public function testBulkForm() { 'user_bulk_form[0]' => TRUE, 'action' => 'user_block_user_action', ); - $this->drupalPostForm(NULL, $edit, t('Apply')); + $this->drupalPostForm(NULL, $edit, t('Apply to selected items')); $anonymous_account = $user_storage->load(0); $this->assertTrue($anonymous_account->isBlocked(), 'Ensure the anonymous user got blocked.');