Problem/Motivation

Drupal uses American English in code and comments. In #2972224: Add .cspell.json to automate spellchecking in Drupal core we identified that there were a number of British English spellings that need correcting. Initial list:

+++ b/core/.cspell.json
Customised
Customises
Initialise
Normalise
Normalises
Optimises
optimised
initialised
normalise
normalised
sanitise
sanitised
behaviour
behaviours
customisation
customising
favourite
serialisation
synchronisation
recognising
colour

Proposed resolution

Pick out all the British English words from that issue and fix them.

Remaining tasks

Do it.

User interface changes

API changes

Data model changes

Release notes snippet

Comments

longwave created an issue. See original summary.

dww’s picture

dww’s picture

Issue summary: View changes

Moving the list from the parent into here, since all of those are an example of this scope.

longwave’s picture

Issue summary: View changes

Added a few more, namely

"behaviour",
"behaviours",
"customisation",
"customising",
"favourite",
"serialisation",
"synchronisation",
longwave’s picture

There are also two instances of "colour" that cspell didn't seem to notice

core/tests/Drupal/KernelTests/Core/Entity/EntityQueryTest.php
568:    // have red as a colour AND are triangle shaped.

core/profiles/demo_umami/themes/umami/css/base.css
80:  /* Tweak default link colour to improve contrast for accessibility */
longwave’s picture

Issue summary: View changes
xjm’s picture

Title: Convert British English spellings to American English » Convert British English spellings to American English, for the umpteenth time
xjm’s picture

Issue summary: View changes

Another.

dww’s picture

Issue summary: View changes

Removed the extra formatting and punctuation noise on the todo list...

sja112’s picture

Assigned: Unassigned » sja112

On this.

xjm’s picture

@sja112, also check the whole list in #2972224: Add .cspell.json to automate spellchecking in Drupal core for more.

sja112’s picture

Issue summary: View changes

Added optimised in the list.

sja112’s picture

Version: 9.0.x-dev » 9.1.x-dev
Assigned: sja112 » Unassigned
Status: Active » Needs review
StatusFileSize
new47 KB

Adding patch with the fixes.

sja112’s picture

Assigned: Unassigned » sja112
sja112’s picture

Assigned: sja112 » Unassigned
StatusFileSize
new48.57 KB
new1.57 KB

Fixed failing test case.

longwave’s picture

Status: Needs review » Needs work

Patch looks good so far and covers the cases in the OP.

However, not sure why cspell didn't spot favour, normalising or behaviour, but let's do them too:

core/modules/language/src/Form/LanguageAddForm.php
22:    // @todo Remove in favour of base method.

core/modules/language/src/Form/LanguageEditForm.php
18:    // @todo Remove in favour of base method.

core/modules/rdf/tests/src/Traits/EasyRdf_ParsedUri.php
207:     * Normalizes the path of this URI if it has one. Normalising a path means

composer/Plugin/Scaffold/Plugin.php
106:   * Post package event behaviour.
sja112’s picture

Status: Needs work » Needs review
StatusFileSize
new50.08 KB
new2.19 KB

@longwave,

Changing patch to include the fix for words favour, normalising and behaviour.

Please review.

Thanks.

longwave’s picture

Status: Needs review » Reviewed & tested by the community

Looks great. Happy to mark this as RTBC but if a native US English speaker reads this maybe they can add an extra confirmation!

alexpott’s picture

We can add favour, behaviour and normalising to the flagWords section of the .cspell.json. Again, doing these issues before doing #2972224: Add .cspell.json to automate spellchecking in Drupal core means that we have to somehow remember to do this rather than implementing it here.

alexpott’s picture

BTW even the issue title points out that without #2972224: Add .cspell.json to automate spellchecking in Drupal core this effort is futile.

...for the umpteenth time

We can choose to not have an umpteenth time + 1 issue.

ketikagrover’s picture

Since we are not blocking spell check issues on #2972224: Add .cspell.json to automate spellchecking in Drupal core
Verified the patch, all the changes are included
RTBC +1

alexpott’s picture

Version: 9.1.x-dev » 9.0.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 81e9500 and pushed to 9.1.x. Thanks!
Committed 5a81152 and pushed to 9.0.x. Thanks!
Committed b68907b and pushed to 8.9.x. Thanks!

I fixed the conflict in core/lib/Drupal/Core/Installer/NormalInstallerServiceProvider.php on commit in 9.0.x
I fixed conflicts in core/assets/scaffold/files/default.settings.php and sites/default/default.settings.php in 8.9.x (these files no longer change)\

There were more conflicts for 8.8.x so I didn't bother.

  • alexpott committed 81e9500 on 9.1.x
    Issue #3138718 by sja112, longwave, dww, xjm, alexpott: Convert British...

  • alexpott committed 5a81152 on 9.0.x
    Issue #3138718 by sja112, longwave, dww, xjm, alexpott: Convert British...

  • alexpott committed b68907b on 8.9.x
    Issue #3138718 by sja112, longwave, dww, xjm, alexpott: Convert British...

Status: Fixed » Closed (fixed)

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

jwilson3’s picture

We can choose to not have an umpteenth time + 1 issue.

#3155258: Use American English spelling of "gray" (sorry, but I would appreciate a review on this)

quietone’s picture

Closed #3062460: BrE spelling vs AmE spelling as a duplicate of this.