Problem/Motivation

Discovered at #2972224: Add .cspell.json to automate spellchecking in Drupal core, and pointed by @xjm in https://www.drupal.org/project/drupal/issues/3122088#comment-13628724

+++ b/core/.cspell.json
@@ -0,0 +1,1288 @@
+      "autcomplete",

Proposed resolution

@xjm: "autocomplete".

As title and see the change record https://www.drupal.org/node/3122084 for how to work with cspell.

Remaining tasks

Pick out all applicable words from #2972224: Add .cspell.json to automate spellchecking in Drupal core and fix them.

User interface changes

API changes

Data model changes

Release notes snippet

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jungle created an issue. See original summary.

sja112’s picture

Assigned: Unassigned » sja112
sja112’s picture

Assigned: sja112 » Unassigned
Status: Active » Needs review
FileSize
981 bytes

Status: Needs review » Needs work

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

sja112’s picture

Status: Needs work » Needs review

The test is failing because of changed spelling.

Testing Drupal\Tests\dblog\Functional\DbLogViewsTest
.F..........                                                      12 / 12 (100%)

Time: 3.4 minutes, Memory: 4.00 MB

There was 1 failure:

1) Drupal\Tests\dblog\Functional\DbLogViewsTest::testDbLog
DBLog event was recorded: [delete user]
Failed asserting that a boolean is not empty.

Should this test be fixed along with this issue? Because this seems to be out of scope to me.

We should open another issue to fix this.

mohrerao’s picture

Assigned: Unassigned » mohrerao
Status: Needs review » Needs work
mohrerao’s picture

Assigned: mohrerao » Unassigned
longwave’s picture

Status: Needs work » Reviewed & tested by the community

Failure seems unrelated and I can't reproduce locally. Otherwise the patch looks good so marking RTBC and triggering a retest; the bot will set it back to needs work if it does fail again.

Sivaji_Ganesh_Jojodae’s picture

Issue tags: +Quickfix

Quickfix. Looks good to commit. +1 for RTBC.

Edit: The patch needs backport to 8.x.

xjm’s picture

Status: Reviewed & tested by the community » Needs work

Now that #2972224: Add .cspell.json to automate spellchecking in Drupal core is in, we can make sure this spelling error never happens again by removing the entry from Drupal's dictionrary, so let's update the patch to include that. Thanks!

jungle’s picture

Status: Needs work » Reviewed & tested by the community
FileSize
1.24 KB
292 bytes

Removed autcomplete from the dictionary. Setting back to RTBC as this is a tiny change.

xjm’s picture

Title: Fix "autocomplete" relevant typos in core » Fix "autcomplete" typos in core
Issue tags: +Needs followup
  1. 'This looks good to me. I checked the dictionary and there are the following other related words:
    autocompletefocus
    autocompleteresponses
    autocompletesearch
    autocompleteselect
    autocompleting
    [ayrton:maintainer | Tue 06:59:36] $ grep -ri "\bautocompletefocus\b" * | grep -v "vendor" | grep -v "node_modules"
    core/misc/cspell/dictionary.txt:autocompletefocus
    core/misc/autocomplete.es6.js:   * Handles an autocompletefocus event.
    [ayrton:maintainer | Tue 07:01:34] $ grep -ri "\bautocompleteselect\b" * | grep -v "vendor" | grep -v "node_modules"
    core/misc/cspell/dictionary.txt:autocompleteselect
    core/misc/autocomplete.es6.js:   * Handles an autocompleteselect event.

    Both could probably be two words in the comment.

    Then these two actually have uses in code:

    core/misc/cspell/dictionary.txt:autocompleteresponses
    core/themes/claro/js/autocomplete.js:        $input.on('input autocompletesearch autocompleteresponses', function (event) {
    core/themes/claro/js/autocomplete.es6.js:          $input.on('input autocompletesearch autocompleteresponses', event => {

    So, that's a long-winded saying of "I think we need a followup for auto-complete run on names in JavaScript" which would need review by the frontend framework manager probably to explain. I'm tagging "Needs followup" for that, and reducing the scope of this issue to just the non-JS case.

  2. The change in this patch is allowable because it is a fix to an internal variable name in a test that is not exposed publicly anywhere. If someone were to later use the correct spelling without us fixing this, that could introduce bugs.

  • xjm committed 6c3ba0f on 9.1.x
    Issue #3138788 by jungle, sja112, xjm: Fix "autcomplete" typos in core
    

  • xjm committed b976fd2 on 9.0.x
    Issue #3138788 by jungle, sja112, xjm: Fix "autcomplete" typos in core
    

  • xjm committed ea57e3a on 8.9.x
    Issue #3138788 by jungle, sja112, xjm: Fix "autcomplete" typos in core
    
xjm’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed #12 to 9.1.x. Thanks!

Since 9.0.x and earlier do not have the dictionary, but these are test spelling bugs, we can backport the fixes themselves to 9.0/8.9. Fortunately we have a patch that does just that in #3, so I'm going to try using that patch for backport. Committed #3 to 9.0.x and cherry-picked it to 8.9.x. Thanks everyone!

jungle’s picture

Issue tags: -Needs followup

@xjm, thanks for committing!

Removing the Needs followup tag, as I just added it to the parent issue's Remaining tasks section in IS. It's a bit hard for me to do it myself.

Status: Fixed » Closed (fixed)

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