Problem/Motivation

Fix spelling errors for words specific to migrate.

abantu - A Zulu word in the D6 fixture.
aptain - test string
destinationproperty - used in ~22 process plugin tests
vocabfixed, vocablocalized, and vocabtranslate - Vocabulary names in the D7 fixture
whakamataku - A Māori word used in a source plugin test.
fieldright - field migration for testing
wambooli, wamboolipastafazoul - concat example
imageapi, imagefield, imagelink, imagemagick, nodeapi, nodeapi, optionwidgets, selectlist, userreference - Drupal 6 fixture

localizable - this is a word but appears in dictionary.txt.

Proposed resolution

Disable cspell for all but destinationproperty, which can be changed to 'destination_property'.

Decide what to do about localizable.

Remaining tasks

Patch, review, commit.

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

quietone created an issue. See original summary.

quietone’s picture

Status: Active » Needs review
FileSize
6.47 KB

Seems straightforward. Let's see what the testbot says.

quietone’s picture

Title: Fix vocabfixed, vocablocalized and vocabtranslate spellling » Fix some migrate related terms
Issue summary: View changes
FileSize
48.24 KB

Well, that was a learning experience. I had forgotten that some Migrate tests were excluded in .cspell.json. So most of patch in #2 isn't needed.

Starting over and fixing several words used only by migrate so haven't made an interdiff.

Status: Needs review » Needs work

The last submitted patch, 3: 3160031-3.patch, failed testing. View results

quietone’s picture

Status: Needs work » Needs review
FileSize
202 bytes
47.91 KB

haha on me. I added a typo in a yml file.

quietone’s picture

Title: Fix some migrate related terms » Fix spelling errors for migrate related terms
jungle’s picture

Status: Needs review » Needs work

Thanks @quietone for filing this.

+++ b/core/misc/cspell/dictionary.txt
@@ -2063,7 +2056,6 @@ webtest
-whakamataku

Two whakamataku occurrences found in core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php

$ grep -ir "whakamataku" core
core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php:        'value' => 's:19:"Ko whakamataku heke";',
core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php:        'site_slogan' => 'Ko whakamataku heke',
jameszhang023’s picture

Assigned: Unassigned » jameszhang023

Working on this.

jameszhang023’s picture

Assigned: jameszhang023 » Unassigned
Status: Needs work » Needs review
FileSize
48.51 KB
613 bytes

Done, review please, thanks.

quietone’s picture

@jungle, your welcome.

#7. That was on oversight, I thought I have fixed those lines. Fixed now.

@jameszhang023, thanks for the patch. It is my understanding that use cspell:ignore at the top of a file is the least favored option, although I can't find that discussion right now.

Here is the patch I made, based on #5.

quietone’s picture

Oh bother, I uploaded that patch twice. Cancelled test for one of them.

jungle’s picture

Thanks @jameszhang023 and @quietone for the quick update.

+++ b/core/modules/migrate_drupal/tests/src/Kernel/Plugin/migrate/source/d6/VariableTranslationTest.php
@@ -4,6 +4,8 @@
+// cspell:ignore whakamataku
+

FYI, this way was accepted by @alexpott in #3155463: Fix spelling error in Drupal\filter\Plugin\migrate\process\FilterID::getSourceFilterType(), See the commit e99d322064c67c12cfcdf9af5f43c9f0a8a89e92_16_16

But both #9 and #10 are good for me. Review in details after CI run finishes.

quietone’s picture

@jungle, thanks for the link. I never went back and looked at that issue until now.

quietone’s picture

I think we can add 'aptain' to the list of words to fix in this patch. It is only in core/modules/migrate/tests/src/Unit/process/SubstrTest.php

jungle’s picture

Status: Needs review » Needs work

Re #14, Nice one, let's do it? It's still in scope here, to me. Thanks!

quietone’s picture

Issue summary: View changes
Status: Needs work » Needs review
FileSize
8.67 KB
44.59 KB

Added 'aptain' to the list of spelling fixes.

I prefer to use cspell:ignore at the top of the file so changed files to use that.

jungle’s picture

Title: Fix spelling errors for migrate related terms » Fix 9 spelling errors for migrate related terms
Status: Needs review » Reviewed & tested by the community
  1. $ yarn spellcheck:core
    yarn run v1.22.4
    $ cspell "**/*" "../composer/**/*" "../composer.json"
    CSpell: Files checked: 14630, Issues found: 0 in 0 files
    ✨  Done in 243.27s.
    

    Spelling check passed

  2. +++ b/core/misc/cspell/dictionary.txt
    @@ -1,5 +1,4 @@
    -abantu
    
    @@ -61,7 +60,6 @@ api's
    -aptain
    
    @@ -448,7 +446,6 @@ descripcion
    -destinationproperty
    
    @@ -1156,7 +1153,6 @@ nocdata
    -nodeapi
    
    @@ -1554,7 +1550,6 @@ sebe
    -selectlist
    
    @@ -2031,10 +2026,7 @@ viewports
    -vocabfixed
    -vocablocalized
    ...
    -vocabtranslate
    
    @@ -2063,7 +2055,6 @@ webtest
    -whakamataku
    

    9 words removed in total, great! Adding the number 9 to the title.

  3. +++ b/core/misc/cspell/dictionary.txt
    @@ -448,7 +446,6 @@ descripcion
    -destinationproperty
    
    +++ b/core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php
    @@ -37,7 +37,7 @@ protected function setUp(): void {
    -    $transformed_value = $this->plugin->transform([0, '', []], $this->migrateExecutable, $this->row, 'destinationproperty');
    +    $transformed_value = $this->plugin->transform([0, '', []], $this->migrateExecutable, $this->row, 'destination_property');
    

    Code changes are related to destinationproperty/destination_property mainly, and all destinationproperty/destination_property relevant changes made are in tests.

  4. In addition, @quietone is one of the migrate subsystem maintainers, I am confident to set this to RTBC.

Thanks!

quietone’s picture

Status: Reviewed & tested by the community » Needs work

I found a few more

-fieldright
-imageapi
-imagefield
-imagelink
-imagemagick
-localizable

I have a patch but need to review it. Will do so before the end of the day.

quietone’s picture

Title: Fix 9 spelling errors for migrate related terms » Fix 20 spelling errors for migrate related terms
Issue summary: View changes
Status: Needs work » Needs review
FileSize
11.54 KB
59.18 KB

Updated the IS with the new words that are fixed here.

Found out that 'localizable' is in dictionary.txt and yet it is a word according to on-line dictionaries such a wiktionary.

I'd like to think that is all the migrate specific words in dictionary.txt. I am not planning on checking again or adding more to this issue.

longwave’s picture

Status: Needs review » Needs work

Great work!

  1. +++ b/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceSettings.php
    @@ -6,6 +6,8 @@
    +# cspell:ignore imagefield
    

    I think we always use // instead of # for comments in PHP.

  2. +++ b/core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/FieldFileTest.php
    @@ -9,6 +9,8 @@
    +// cspell:ignore wambooli
    

    Can we just use a different, valid word here? It doesn't seem to be actually tested.

  3. +++ b/core/modules/migrate/src/Plugin/migrate/process/Concat.php
    @@ -7,6 +7,8 @@
    +// cspell: ignore wambooli wamboolipastafazoul
    

    This only appears in comments so I think we could just reword to use something else.

  4. +++ b/core/modules/migrate/tests/src/Unit/process/SubstrTest.php
    @@ -5,6 +5,8 @@
    +// cspell:ignore aptain
    

    As this only appears once I think it is cleaner to use cSpell:disable-next-line on the line before.

jungle’s picture

@quietone++

In addition to #20.1

2 coding standards messages

/var/lib/drupalci/workspace/jenkins-drupal_patches-54220/source/core/modules/field/src/Plugin/migrate/process/d6/FieldInstanceSettings.php ✗ 1 more
line 9	Perl-style comments are not allowed; use "// Comment" instead
/var/lib/drupalci/workspace/jenkins-drupal_patches-54220/source/core/modules/file/src/Plugin/migrate/field/d6/FileField.php ✗ 1 more
9	Perl-style comments are not allowed; use "// Comment" instead
quietone’s picture

Status: Needs work » Needs review
FileSize
2.71 KB
60.31 KB

Thanks for the reviews.

20.1 Fixed. It was a copy/paste error.
20.2 Changed to 'Bar'
20.3 Changed to 'Rosa' and 'Parks'.
20.4 I respectfully disagree. I did try that and, for me, it just added noise to the test data. When writing or reading a test I would rather not have the distraction.

#21.1 is the same as 20.1

quietone’s picture

Missed a coding standard error

jungle’s picture

Status: Needs review » Needs work
$ yarn spellcheck:core
yarn run v1.22.4
$ cspell "**/*" "../composer/**/*" "../composer.json"
/Users/jungle/www/non-map/9.1.x/core/modules/views/src/Plugin/views/query/Sql.php:341:46 - Unknown word (nodereference)
/Users/jungle/www/non-map/9.1.x/core/modules/views/src/Plugin/views/query/Sql.php:342:20 - Unknown word (nodereference)
CSpell: Files checked: 14630, Issues found: 2 in 1 files
   * An example of a relationship would be a <strong>nodereference table.
   * If you have a nodereference named 'book_parent' which links to a
   * parent node, you could set up a relationship 'node_book_parent'
   * to 'node'. Then, anything that links to 'node' can link to
   * 'node_book_parent' instead, thus allowing all properties of
   * both nodes to be available in the query.

nodereference -> node reference? Meanwhile, those lines are wrapped too early.

It's a bit out of scope here, if so, not sure we should remove upserting from the dictionary here, no usages of upserting.

quietone’s picture

Title: Fix 20 spelling errors for migrate related terms » Fix 18 spelling errors for migrate specific terms
Issue summary: View changes
Status: Needs work » Needs review
FileSize
5.03 KB
59.7 KB

I ran spellcheck on core and looking back at my history I see it did report the instances in Views and I completely missed it. Embarrassing.

Since I am limiting this to words only in migrate I am pulling out the nodereference changes.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me now, nice to be chipping away at these.

jungle’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll
quietone’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
FileSize
724 bytes
59.7 KB

Rerolled.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 28: 3160031-28.patch, failed testing. View results

longwave’s picture

Status: Needs work » Reviewed & tested by the community

Random fail in CKEditorIntegrationTest

alexpott’s picture

Title: Fix 18 spelling errors for migrate specific terms » [backport] Fix 18 spelling errors for migrate specific terms
Version: 9.1.x-dev » 9.0.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 427c7ee and pushed to 9.1.x. Thanks!

  • alexpott committed 427c7ee on 9.1.x
    Issue #3160031 by quietone, jungle, longwave, jameszhang023: Fix 18...
alexpott’s picture

Status: Fixed » Reviewed & tested by the community
FileSize
42.26 KB

Here's a backport of #28 without all the cspell stuff.

alexpott’s picture

Version: 9.0.x-dev » 8.9.x-dev

Committed c2c26f8 and pushed to 9.0.x. Thanks!

Now to get this into 8.9.x.

  • alexpott committed c2c26f8 on 9.0.x
    Issue #3160031 by quietone, alexpott, jungle, longwave, jameszhang023:...
alexpott’s picture

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 96a0e62 and pushed to 8.9.x. Thanks!

Backported to 8.9.x as these are only test and docs changes and keeping the tests aligned helps as moving forward.

  • alexpott committed 96a0e62 on 8.9.x
    Issue #3160031 by quietone, alexpott, jungle, longwave, jameszhang023:...
jungle’s picture

Title: [backport] Fix 18 spelling errors for migrate specific terms » Fix 18 spelling errors for migrate specific terms

@alexpott, thanks for committing! Changing the title back.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.