From aac629ad2e57cca08b127c1496ef6e371a288a46 Mon Sep 17 00:00:00 2001 From: Dave Long <dave@longwaveconsulting.com> Date: Sun, 15 Jan 2023 18:36:22 +0000 Subject: [PATCH] Issue #3219472 by quietone, xjm, Abhishek_Singh, karishmaamin, smustgrave, longwave: Fix spelling for words used once, beginning with 'e' -> 'i', inclusive --- core/lib/Drupal/Component/Utility/Unicode.php | 2 +- .../lib/Drupal/Core/Cache/DatabaseBackend.php | 2 +- .../Core/Database/StatementInterface.php | 2 +- .../Drupal/Core/Render/BubbleableMetadata.php | 4 +-- core/misc/cspell/dictionary.txt | 30 +++---------------- core/modules/block/migrations/d7_block.yml | 1 + .../ContentTranslationLinkTagTest.php | 2 +- .../jsonapi/src/Normalizer/NormalizerBase.php | 7 +++-- .../src/Functional/StatisticsTestBase.php | 2 +- .../tests/src/Functional/Form/FormTest.php | 1 + .../src/Functional/Mail/HtmlToTextTest.php | 8 ++--- .../Render/HtmlResponseAttachmentsTest.php | 3 +- .../tests/src/Kernel/TermKernelTest.php | 2 +- .../tests/src/Functional/UserPictureTest.php | 2 +- .../tests/src/Kernel/Plugin/CacheTest.php | 2 +- .../src/Kernel/Plugin/ViewsBlockTest.php | 2 +- .../Core/Config/ConfigOverrideTest.php | 4 +-- .../KernelTests/Core/Entity/EntityApiTest.php | 2 +- .../Core/Plugin/InspectionTest.php | 2 +- .../Core/Test/EnvironmentCleanerTest.php | 2 +- .../Tests/Component/Utility/BytesTest.php | 1 + .../AuthenticationManagerTest.php | 2 +- .../Drupal/Tests/Core/File/FileSystemTest.php | 1 + .../Drupal/Tests/Core/Image/ImageTest.php | 2 +- 24 files changed, 36 insertions(+), 52 deletions(-) diff --git a/core/lib/Drupal/Component/Utility/Unicode.php b/core/lib/Drupal/Component/Utility/Unicode.php index 543eb321c5cd..3d2e8942eb5a 100644 --- a/core/lib/Drupal/Component/Utility/Unicode.php +++ b/core/lib/Drupal/Component/Utility/Unicode.php @@ -142,7 +142,7 @@ public static function check() { } /** - * Decodes UTF byte-order mark (BOM) into the encoding's name. + * Decodes UTF byte-order mark (BOM) to the encoding name. * * @param string $data * The data possibly containing a BOM. This can be the entire contents of diff --git a/core/lib/Drupal/Core/Cache/DatabaseBackend.php b/core/lib/Drupal/Core/Cache/DatabaseBackend.php index 879ffae6691b..23f78117f38d 100644 --- a/core/lib/Drupal/Core/Cache/DatabaseBackend.php +++ b/core/lib/Drupal/Core/Cache/DatabaseBackend.php @@ -153,7 +153,7 @@ protected function prepareItem($cache, $allow_invalid) { // Check expire time. $cache->valid = $cache->expire == Cache::PERMANENT || $cache->expire >= REQUEST_TIME; - // Check if invalidateTags() has been called with any of the items's tags. + // Check if invalidateTags() has been called with any of the item's tags. if (!$this->checksumProvider->isValid($cache->checksum, $cache->tags)) { $cache->valid = FALSE; } diff --git a/core/lib/Drupal/Core/Database/StatementInterface.php b/core/lib/Drupal/Core/Database/StatementInterface.php index cc9f4ed08d8c..370afc1e8b94 100644 --- a/core/lib/Drupal/Core/Database/StatementInterface.php +++ b/core/lib/Drupal/Core/Database/StatementInterface.php @@ -205,7 +205,7 @@ public function fetchAllKeyed($key_index = 0, $value_index = 1); * @param $key * The name of the field on which to index the array. * @param $fetch - * The fetchmode to use. If set to \PDO::FETCH_ASSOC, \PDO::FETCH_NUM, or + * The fetch mode to use. If set to \PDO::FETCH_ASSOC, \PDO::FETCH_NUM, or * \PDO::FETCH_BOTH the returned value with be an array of arrays. For any * other value it will be an array of objects. By default, the fetch mode * set for the query will be used. diff --git a/core/lib/Drupal/Core/Render/BubbleableMetadata.php b/core/lib/Drupal/Core/Render/BubbleableMetadata.php index 5001b1ba9c9b..0d6eae4001d2 100644 --- a/core/lib/Drupal/Core/Render/BubbleableMetadata.php +++ b/core/lib/Drupal/Core/Render/BubbleableMetadata.php @@ -146,8 +146,8 @@ public function addCacheableDependency($other_object) { */ public static function mergeAttachments(array $a, array $b) { // If both #attached arrays contain drupalSettings, then merge them - // correctly; adding the same settings multiple times needs to behave - // idempotently. + // correctly; adding the same settings multiple times needs to be + // idempotent. if (!empty($a['drupalSettings']) && !empty($b['drupalSettings'])) { $drupalSettings = NestedArray::mergeDeepArray([$a['drupalSettings'], $b['drupalSettings']], TRUE); // No need for re-merging them. diff --git a/core/misc/cspell/dictionary.txt b/core/misc/cspell/dictionary.txt index 6a37f15b84be..16f6112fddd2 100644 --- a/core/misc/cspell/dictionary.txt +++ b/core/misc/cspell/dictionary.txt @@ -286,7 +286,6 @@ daycount dblog dbtng dburl -ddev dealerdirect deckard deconstructor @@ -395,7 +394,6 @@ editables editdrupalimage editunblock eerste -egroe egulias eins elbonia @@ -452,8 +450,6 @@ favstar fcgi februar feededit -fetchmode -fffffg fichiers fieldable fieldapi @@ -474,10 +470,8 @@ filestorage filesystems filetransfer filevalidationerror -filterprovider filtertypes findwith -firstcolumn fixnull flickr flipfit @@ -492,21 +486,17 @@ fontsizer fooalert foobarbaz foobargorilla -foobars foofoo foos -formatless formattable formvalidation fouc fourcol -fourthcolumn fozzie fqcn fraîche frombracket frontpage -fsdf fudgy fulldata fulldate @@ -519,18 +509,13 @@ funic furchtbar gabilondo gato -getcode -getfile gethttpclient getlist -getmachine getview gids -giggabyte gloop gnumeric goldfinger -gonner googleapis gotit grandgrandchild @@ -555,7 +540,6 @@ hbox heartz heke heroless -herpderp herro heure heures @@ -572,11 +556,9 @@ hookname horizontalrule hosters hostnames -hreflangs hrefs htkey htmlcorrector -htmlto httpheader httpkernel httponly @@ -589,7 +571,6 @@ iconwrap idconflict idekey idempotency -idempotently iframes iframeupload ignoretag @@ -598,14 +579,12 @@ imagecreatefrom imagefields imagetest imagetextalternative -inator indexname ingoa inited inno inputtypes insidekeyword -inspectable instaclick instantiator interactable @@ -758,7 +737,7 @@ metapackage metapackages metatag metatags -meφω +meΦΩ miaus middlewares mikey @@ -1136,7 +1115,6 @@ scriptable scrollbars searchdirs sebe -secondcolumn seld selectbox serviceform @@ -1351,7 +1329,6 @@ themers themey theseer theseparator -thirdcolumn threadentry threadingrendererentry threecol @@ -1615,7 +1592,8 @@ zwei zwjhek zxvf zzgroup +Èxample +Ãœber Ã¥wesome -èxample über -È…chÈ +È„chÈ diff --git a/core/modules/block/migrations/d7_block.yml b/core/modules/block/migrations/d7_block.yml index ad7fa7f94190..c6b8dffbca31 100644 --- a/core/modules/block/migrations/d7_block.yml +++ b/core/modules/block/migrations/d7_block.yml @@ -1,3 +1,4 @@ +# cspell: ignore firstcolumn secondcolumn thirdcolumn fourthcolumn id: d7_block label: Blocks # This configuration migration depends on the d7_custom_block content migration. diff --git a/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php b/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php index 1d25cc06cf30..5e3a71768394 100644 --- a/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php +++ b/core/modules/content_translation/tests/src/Functional/ContentTranslationLinkTagTest.php @@ -124,7 +124,7 @@ function ($langcode) use ($url_base, $languageManager) { $entity_canonical = '/entity_test_mul/manage/' . $entity->id(); $this->config('system.site')->set('page.front', $entity_canonical)->save(); - // Tests hreflangs when using entities as a front page. + // Tests hreflang when using entities as a front page. foreach ($urls as $langcode => $url) { $this->drupalGet($url); foreach ($entity->getTranslationLanguages() as $language) { diff --git a/core/modules/jsonapi/src/Normalizer/NormalizerBase.php b/core/modules/jsonapi/src/Normalizer/NormalizerBase.php index 37f639bdb748..e3769b8ba740 100644 --- a/core/modules/jsonapi/src/Normalizer/NormalizerBase.php +++ b/core/modules/jsonapi/src/Normalizer/NormalizerBase.php @@ -62,9 +62,10 @@ protected static function rasterizeValueRecursive($value) { */ protected function checkFormat($format = NULL) { // The parent implementation allows format-specific normalizers to be used - // for formatless normalization. The JSON:API module wants to be cautious. - // Hence it only allows its normalizers to be used for the JSON:API format, - // to avoid JSON:API-specific normalizations showing up in the REST API. + // for normalization without a format. The JSON:API module wants to be + // cautious. Hence it only allows its normalizers to be used for the + // JSON:API format, to avoid JSON:API-specific normalizations showing up in + // the REST API. return $format === $this->format; } diff --git a/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php b/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php index e2e3f464028b..5f1e10da6932 100644 --- a/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php +++ b/core/modules/statistics/tests/src/Functional/StatisticsTestBase.php @@ -17,7 +17,7 @@ abstract class StatisticsTestBase extends BrowserTestBase { protected static $modules = ['node', 'block', 'ban', 'statistics']; /** - * User with permissions to ban IP's. + * User with permissions to ban IPs. * * @var \Drupal\user\UserInterface */ diff --git a/core/modules/system/tests/src/Functional/Form/FormTest.php b/core/modules/system/tests/src/Functional/Form/FormTest.php index 3e07093f18cd..b572859bb32d 100644 --- a/core/modules/system/tests/src/Functional/Form/FormTest.php +++ b/core/modules/system/tests/src/Functional/Form/FormTest.php @@ -717,6 +717,7 @@ public function testColorValidation() { } // Tests invalid values are rejected. + // cspell:ignore fffffg $values = ['#0008', '#1234', '#fffffg', '#abcdef22', '17', '#uaa']; foreach ($values as $input) { $edit = [ diff --git a/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php b/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php index 920feaeb083f..7ba8372255bf 100644 --- a/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php +++ b/core/modules/system/tests/src/Functional/Mail/HtmlToTextTest.php @@ -194,7 +194,7 @@ public function testDrupalHtmlToTextArgs() { /** * Tests that whitespace is collapsed. */ - public function testDrupalHtmltoTextCollapsesWhitespace() { + public function testDrupalHtmlToTextCollapsesWhitespace() { $input = "<p>Drupal Drupal\n\nDrupal<pre>Drupal Drupal\n\nDrupal</pre>Drupal Drupal\n\nDrupal</p>"; // @todo The whitespace should be collapsed. $collapsed = "Drupal Drupal\n\nDrupalDrupal Drupal\n\nDrupalDrupal Drupal\n\nDrupal\n\n"; @@ -352,7 +352,7 @@ public function testVeryLongLineWrap() { * @see \Drupal\Core\Mail\MailFormatHelper::wrapMail() */ public function testRemoveTrailingWhitespace() { - $text = "Hi there! \nHerp Derp"; + $text = "Hi there! \nEarth"; $mail_lines = explode("\n", MailFormatHelper::wrapMail($text)); $this->assertNotEquals(" ", substr($mail_lines[0], -1), 'Trailing whitespace removed.'); } @@ -366,11 +366,11 @@ public function testRemoveTrailingWhitespace() { * @see \Drupal\Core\Mail\MailFormatHelper::wrapMail() */ public function testUsenetSignature() { - $text = "Hi there!\n-- \nHerp Derp"; + $text = "Hi there!\n-- \nEarth"; $mail_lines = explode("\n", MailFormatHelper::wrapMail($text)); $this->assertEquals("-- ", $mail_lines[1], 'Trailing whitespace not removed for dash-dash-space signatures.'); - $text = "Hi there!\n-- \nHerp Derp"; + $text = "Hi there!\n-- \nEarth"; $mail_lines = explode("\n", MailFormatHelper::wrapMail($text)); $this->assertEquals("--", $mail_lines[1], 'Trailing whitespace removed for incorrect dash-dash-space signatures.'); } diff --git a/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php b/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php index b95d17eadd87..9e8e86600c57 100644 --- a/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php +++ b/core/modules/system/tests/src/Functional/Render/HtmlResponseAttachmentsTest.php @@ -69,7 +69,8 @@ public function testAttachments() { ]; $this->assertEquals($expected_link_headers, $this->getSession()->getResponseHeaders()['Link']); - // Check that duplicate alternate URLs with different hreflangs are allowed. + // Check that duplicate alternate URLs with different hreflang attributes + // are allowed. $this->assertSession()->elementsCount('xpath', '//head/link[@rel="alternate"][@href="/foo/bar"]', 2); } diff --git a/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php b/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php index 29e43b72bf56..5717ec762fd4 100644 --- a/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php +++ b/core/modules/taxonomy/tests/src/Kernel/TermKernelTest.php @@ -155,7 +155,7 @@ public function testTermPreview() { // Create a unsaved term. $term = $entity_manager->getStorage('taxonomy_term')->create([ 'vid' => $vocabulary->id(), - 'name' => 'Inator', + 'name' => 'Foo', ]); // Confirm we can get the view of unsaved term. diff --git a/core/modules/user/tests/src/Functional/UserPictureTest.php b/core/modules/user/tests/src/Functional/UserPictureTest.php index c3ac3399a2a7..6d8fb5c1072c 100644 --- a/core/modules/user/tests/src/Functional/UserPictureTest.php +++ b/core/modules/user/tests/src/Functional/UserPictureTest.php @@ -119,7 +119,7 @@ public function testPictureOnNodeComment() { $image_style_id = $this->config('core.entity_view_display.user.user.compact')->get('content.user_picture.settings.image_style'); $style = ImageStyle::load($image_style_id); - $image_url = \Drupal::service('file_url_generator')->transformRelative($style->buildUrl($file->getfileUri())); + $image_url = \Drupal::service('file_url_generator')->transformRelative($style->buildUrl($file->getFileUri())); $alt_text = 'Profile picture for user ' . $this->webUser->getAccountName(); // Verify that the image is displayed on the node page. diff --git a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php index 7bab5e5c5069..36495b734e63 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/CacheTest.php @@ -366,7 +366,7 @@ public function testCacheContextIntegration() { // Update the entry in the DB to ensure that result caching works. \Drupal::database()->update('views_test_data') ->condition('name', 'George') - ->fields(['name' => 'egroeG']) + ->fields(['name' => 'notGeorge']) ->execute(); $view = Views::getView('test_cache'); diff --git a/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php b/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php index d653413eea10..32dcfc6656b0 100644 --- a/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php +++ b/core/modules/views/tests/src/Kernel/Plugin/ViewsBlockTest.php @@ -40,7 +40,7 @@ protected function setUp($import_test_views = TRUE): void { /** * Tests that ViewsBlock::getMachineNameSuggestion() produces the right value. * - * @see \Drupal\views\Plugin\Block::getmachineNameSuggestion() + * @see \Drupal\views\Plugin\Block::getMachineNameSuggestion() */ public function testMachineNameSuggestion() { $plugin_definition = [ diff --git a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php index ad2f013f7ca3..6c11d41c8ddc 100644 --- a/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php +++ b/core/tests/Drupal/KernelTests/Core/Config/ConfigOverrideTest.php @@ -41,7 +41,7 @@ public function testConfOverride() { // contain these values. $overrides['config_test.system']['foo'] = 'overridden'; $overrides['config_test.system']['baz'] = 'injected'; - $overrides['config_test.system']['404'] = 'derp'; + $overrides['config_test.system']['404'] = 'something'; $GLOBALS['config'] = $overrides; $this->installConfig(['config_test']); @@ -96,7 +96,7 @@ public function testConfOverride() { $sync = $this->container->get('config.storage.sync'); $expected_new_data = [ 'foo' => 'barbar', - '404' => 'herpderp', + '404' => 'try again', ]; $sync->write('config_test.system', $expected_new_data); diff --git a/core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php b/core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php index e1f3497cba5d..af596e697413 100644 --- a/core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php +++ b/core/tests/Drupal/KernelTests/Core/Entity/EntityApiTest.php @@ -211,7 +211,7 @@ public function testEntityStorageExceptionHandling() { $this->fail('Entity presave EntityStorageException thrown but not caught.'); } catch (EntityStorageException $e) { - $this->assertEquals(1, $e->getcode(), 'Entity presave EntityStorageException caught.'); + $this->assertEquals(1, $e->getCode(), 'Entity presave EntityStorageException caught.'); } $entity = EntityTest::create(['name' => 'test2']); diff --git a/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php b/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php index 3011a3fcc861..827b25086c50 100644 --- a/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php +++ b/core/tests/Drupal/KernelTests/Core/Plugin/InspectionTest.php @@ -3,7 +3,7 @@ namespace Drupal\KernelTests\Core\Plugin; /** - * Tests that plugins implementing PluginInspectionInterface are inspectable. + * Tests that plugins implementing PluginInspectionInterface can be inspected. * * @group Plugin */ diff --git a/core/tests/Drupal/KernelTests/Core/Test/EnvironmentCleanerTest.php b/core/tests/Drupal/KernelTests/Core/Test/EnvironmentCleanerTest.php index 86de3b3b5a8a..a4baff08ef97 100644 --- a/core/tests/Drupal/KernelTests/Core/Test/EnvironmentCleanerTest.php +++ b/core/tests/Drupal/KernelTests/Core/Test/EnvironmentCleanerTest.php @@ -22,7 +22,7 @@ public function testDoCleanTemporaryDirectories() { 'sites' => [ 'simpletest' => [ 'delete_dir' => [ - 'delete.me' => 'I am a gonner.', + 'delete.me' => 'I am gone.', ], 'delete_me.too' => 'delete this file.', ], diff --git a/core/tests/Drupal/Tests/Component/Utility/BytesTest.php b/core/tests/Drupal/Tests/Component/Utility/BytesTest.php index f8e31cce9dda..4d8150a342da 100644 --- a/core/tests/Drupal/Tests/Component/Utility/BytesTest.php +++ b/core/tests/Drupal/Tests/Component/Utility/BytesTest.php @@ -79,6 +79,7 @@ public function providerTestToNumber(): array { ['23476892 bytes', 23476892.0], // 76 MB. ['76MRandomStringThatShouldBeIgnoredByParseSize.', 79691776.0], + // cspell:ignore giggabyte // 76.24 GB (with typo). ['76.24 Giggabyte', 81862076662.0], ['1.5', 2.0], diff --git a/core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php b/core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php index d580d8204e34..6e0ac7c924a3 100644 --- a/core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Authentication/AuthenticationManagerTest.php @@ -49,7 +49,7 @@ public function testDefaultFilter($applies, $has_route, $auth_option, $provider_ /** * @covers ::applyFilter */ - public function testApplyFilterWithFilterprovider() { + public function testApplyFilterWithFilterProvider() { $auth_provider = $this->createMock('Drupal\Tests\Core\Authentication\TestAuthenticationProviderInterface'); $auth_provider->expects($this->once()) ->method('appliesToRoutedRequest') diff --git a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php index aa4ec558a8a1..33cca87b388e 100644 --- a/core/tests/Drupal/Tests/Core/File/FileSystemTest.php +++ b/core/tests/Drupal/Tests/Core/File/FileSystemTest.php @@ -166,6 +166,7 @@ protected function assertFilePermissions(int $expected_mode, string $uri, string */ public function testInvalidUTF8() { vfsStream::setup('dir'); + // cspell:disable-next-line $filename = "a\xFFsdf\x80€" . '.txt'; $this->expectException(FileException::class); $this->expectExceptionMessage("Invalid filename '$filename'"); diff --git a/core/tests/Drupal/Tests/Core/Image/ImageTest.php b/core/tests/Drupal/Tests/Core/Image/ImageTest.php index 4f892fa3a063..ece030d5195c 100644 --- a/core/tests/Drupal/Tests/Core/Image/ImageTest.php +++ b/core/tests/Drupal/Tests/Core/Image/ImageTest.php @@ -279,7 +279,7 @@ public function testChmodFails() { */ public function testParseFileFails() { $toolkit = $this->getToolkitMock(); - $image = new Image($toolkit, 'magic-foobars.png'); + $image = new Image($toolkit, 'magic-foobar.png'); $this->assertFalse($image->isValid()); $this->assertFalse($image->save()); -- GitLab