diff --git a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php index 0cc6b58e6936ff1fc7e1ab0685c1d393b81db8ea..8b9afe20145acd188ca0b125fd22894e41448150 100644 --- a/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php +++ b/core/modules/ckeditor/src/Plugin/CKEditorPlugin/Language.php @@ -81,12 +81,13 @@ public function getConfig(Editor $editor) { * {@inheritdoc} */ public function getButtons() { + $label = $this->t('Language'); return [ 'Language' => [ - 'label' => $this->t('Language'), + 'label' => $label, 'image_alternative' => [ '#type' => 'inline_template', - '#template' => '<a href="#" class="cke-icon-only" role="button" title="' . $this->t('Language') . '" aria-label="' . $this->t('Language') . '"><span class="cke_button_icon cke_button__language_icon">' . $this->t('Language') . '</span></a>', + '#template' => '<a href="#" class="cke-icon-only" role="button" title="' . $label . '" aria-label="' . $label . '"><span class="cke_button_icon cke_button__language_icon">' . $label . '</span></a>', ], ], ]; diff --git a/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php b/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php index 7e2e2e9a676f8217e374e75fb57d0f1eea7ea58b..eaf344cb75eb26c07d71813019232b0f94148480 100644 --- a/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php +++ b/core/modules/system/tests/src/Functional/Database/SelectTableSortDefaultTest.php @@ -90,7 +90,7 @@ public function testTableSortDefaultSort() { // Verify that the header links are built properly. $assert->linkByHrefExists('database_test/tablesort_default_sort'); - $assert->responseMatches('/\<a.*title\=\"' . t('sort by Username') . '\".*\>/'); + $assert->responseMatches('/\<a.*title\=\"sort by Username\".*\>/'); } } diff --git a/core/modules/user/tests/src/Functional/UserBlocksTest.php b/core/modules/user/tests/src/Functional/UserBlocksTest.php index 453afa6029f084d688d2b43f34e82f7c601a519d..450f53e879b912007c5a0ac4a3593a1022a8fe4d 100644 --- a/core/modules/user/tests/src/Functional/UserBlocksTest.php +++ b/core/modules/user/tests/src/Functional/UserBlocksTest.php @@ -88,7 +88,7 @@ public function testUserLoginBlock() { $this->assertEqual('MISS', $this->drupalGetHeader(DynamicPageCacheSubscriber::HEADER)); $this->drupalPostForm(NULL, $edit, t('Log in')); $this->assertNoText(t('User login'), 'Logged in.'); - $this->assertPattern('!<title.*?' . t('Compose tips') . '.*?</title>!', 'Still on the same page after login for allowed page'); + $this->assertPattern('!<title.*?Compose tips.*?</title>!', 'Still on the same page after login for allowed page'); // Log out again and repeat with a non-403 page including query arguments. $this->drupalLogout(); @@ -96,7 +96,7 @@ public function testUserLoginBlock() { $this->assertEqual('HIT', $this->drupalGetHeader(DynamicPageCacheSubscriber::HEADER)); $this->drupalPostForm(NULL, $edit, t('Log in')); $this->assertNoText(t('User login'), 'Logged in.'); - $this->assertPattern('!<title.*?' . t('Compose tips') . '.*?</title>!', 'Still on the same page after login for allowed page'); + $this->assertPattern('!<title.*?Compose tips.*?</title>!', 'Still on the same page after login for allowed page'); $this->assertStringContainsString('/filter/tips?foo=bar', $this->getUrl(), 'Correct query arguments are displayed after login'); // Repeat with different query arguments. @@ -105,7 +105,7 @@ public function testUserLoginBlock() { $this->assertEqual('HIT', $this->drupalGetHeader(DynamicPageCacheSubscriber::HEADER)); $this->drupalPostForm(NULL, $edit, t('Log in')); $this->assertNoText(t('User login'), 'Logged in.'); - $this->assertPattern('!<title.*?' . t('Compose tips') . '.*?</title>!', 'Still on the same page after login for allowed page'); + $this->assertPattern('!<title.*?Compose tips.*?</title>!', 'Still on the same page after login for allowed page'); $this->assertStringContainsString('/filter/tips?foo=baz', $this->getUrl(), 'Correct query arguments are displayed after login'); // Check that the user login block is not vulnerable to information diff --git a/core/modules/user/tests/src/Functional/Views/UserChangedTest.php b/core/modules/user/tests/src/Functional/Views/UserChangedTest.php index d22d2b4710f748f08cc67466f28fe4b80ec81254..465056bde25e58179da26046e122ed7d6049b054 100644 --- a/core/modules/user/tests/src/Functional/Views/UserChangedTest.php +++ b/core/modules/user/tests/src/Functional/Views/UserChangedTest.php @@ -49,7 +49,7 @@ public function testChangedField() { $this->drupalGet($path, $options); - $this->assertText(t('Updated date') . ': ' . date('Y-m-d', REQUEST_TIME)); + $this->assertText('Updated date: ' . date('Y-m-d', REQUEST_TIME)); } } diff --git a/core/phpcs.xml.dist b/core/phpcs.xml.dist index c24658e53d96e2b7186b5c240b94cbf11736e359..0c796d95ebfbca10f29b6b2bcb736a4de21e32ef 100644 --- a/core/phpcs.xml.dist +++ b/core/phpcs.xml.dist @@ -122,7 +122,6 @@ <rule ref="Drupal.Semantics.FunctionAlias"/> <rule ref="Drupal.Semantics.FunctionT"> <exclude name="Drupal.Semantics.FunctionT.NotLiteralString"/> - <exclude name="Drupal.Semantics.FunctionT.ConcatString"/> </rule> <rule ref="Drupal.Semantics.FunctionWatchdog"/> <rule ref="Drupal.Semantics.InstallHooks"/>