Skip to content

Use American spelling throughout - #7180

Merged
roed314 merged 3 commits into
LMFDB:mainfrom
roed-math:american-spelling
Aug 7, 2026
Merged

Use American spelling throughout#7180
roed314 merged 3 commits into
LMFDB:mainfrom
roed-math:american-spelling

Conversation

@roed-math

Copy link
Copy Markdown
Contributor

LMFDB uses American spelling, but British forms had accumulated in comments, docstrings, page text, and a few identifiers. This sweeps them up.

Two commits, so the second can be dropped on its own if you would rather not touch identifiers:

1. Prose (58 lines, 38 files) — comments, docstrings, and user-facing text: behaviour, centre/centred, colour, favourite, fibre, judgement, labelled/labelling, amongst, whilst, acknowledgements, and the -ise family (initialise, normalise, renormalise, factorise, recognise, prioritise, optimise, standardise, desynchronise).

Two of these were also wrong on the facts:

  • The CONTRIBUTORS.yaml header points readers at /acknowledgement, but the route is /acknowledgment (lmfdb/app.py:443).
  • Abstract groups was the only section of roughly twenty-five offering "Source and acknowledgements". Every other one already said "acknowledgments".

One rewrite rather than a straight swap: tensor_products_navigate.html said "may take a while to load whilst the zeros are computed", where "while ... while" would have read badly, so it is now "as the zeros are computed".

2. Identifiers (27 lines, 8 files) — every name here has all of its references inside one file, or for favourite_list one view and its template, so each rename moves the definition and its uses together:

draw_spectrum.py centre_ratio, y_centrecenter_ratio, y_center
WebEllipticCurve.py EC_R_plot's colour parameter → color
web_newform.py factorisation loop variable → factorization
galois_reps.py renormalise_coefficientsrenormalize_coefficients
search_wrapper.py query_cancelled_errorquery_canceled_error
hecke_algebras favourite_listfavorite_list (view + template)
test_st.py test_favouritestest_favorites

query_cancelled_error is worth a look: it handles psycopg's QueryCanceledError, which spells it with one l, so the handler and the exception it catches now agree.

Deliberately left alone

  • signtocolour, which lmfdb/utils/__init__.py exports in __all__ and five modules import. Renaming it is an API change rather than a spelling fix, so it and the locals built on it (signcolour, thiscolour, colourplus, colourminus, test_signtocolour) are left for a separate decision.
  • grey, a valid matplotlib color name and already the spelling the plotting code uses (abvar/fq/isog_class.py, hypergm/web_family.py, local_fields/main.py, and a grey attribute in utils/color.py).
  • Proper names: the "Catalogue of Lattices" (also a knowl id, lattice.catalogue_of_lattices), and the International Centre ... / Centre De Recherches Mathematiques institution names in workshops.html.
  • Not ours: maths.* URLs and e-mail addresses, the sympow readme quoted in symL/sympowlmfdb.py, and the vendored snap.svg-min.js / jquery.markitup.js.
  • Correct in American English anyway: cancellation, characteristic, totally, analogue, and labellist (which is a label list, not a labelling).

How the list was built

Three independent passes over every tracked text file, so a gap in one is caught by another: an explicit British-to-American word list; a suffix sweep (-ise, -our, -tre, -lled, -ogue, -yse) over every distinct word, which is what caught test_favourites, a plural the word list missed; and a substring sweep for British stems buried inside identifiers, which caught favourite_list and query_cancelled_error. Each hit was checked by hand before being changed.

Checks

pyflakes clean on all 34 changed Python files, all 8 changed templates parse, CONTRIBUTORS.yaml still loads (123 documents), and no reference to any renamed identifier remains.

🤖 Generated with Claude Code

roed314 and others added 2 commits August 6, 2026 14:49
LMFDB uses American spelling, but a number of British forms had
accumulated: behaviour, centre/centred, colour, favourite, fibre,
judgement, labelled/labelling, amongst, whilst, acknowledgements, and
the -ise family (initialise, normalise, renormalise, factorise,
recognise, prioritise, optimise, standardise, desynchronise).

Two of these were also wrong on the facts.  The CONTRIBUTORS.yaml header
pointed at /acknowledgement, but the route is /acknowledgment (app.py).
And abstract groups was the only section of roughly twenty-five offering
"Source and acknowledgements"; every other one already said
"acknowledgments".

Prose only: no identifier is renamed here.  Left alone deliberately are
"grey" (a valid matplotlib color name, and the spelling the plotting code
already uses), the "Catalogue of Lattices" (a proper name, and a knowl
id), the Centre... institution names in workshops.html, maths.* URLs and
e-mail addresses, the sympow readme quoted in symL, and the vendored
snap.svg/markitup JavaScript.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Follow-on to the prose pass, kept separate so it can be dropped on its
own.  Every name here has all of its references inside a single file (or,
for favourite_list, one view and its template), so each rename is the
definition and its uses together:

  draw_spectrum.py        centre_ratio, y_centre -> center_ratio, y_center
  WebEllipticCurve.py     EC_R_plot's colour parameter -> color
  web_newform.py          factorisation loop variable -> factorization
  galois_reps.py          renormalise_coefficients -> renormalize_coefficients
  search_wrapper.py       query_cancelled_error -> query_canceled_error
  hecke_algebras          favourite_list -> favorite_list (view + template)
  test_st.py              test_favourites -> test_favorites

query_cancelled_error is worth a look: it handles psycopg's
QueryCanceledError, which spells it with one l, so the handler and the
exception now agree.

Not renamed: signtocolour, which lmfdb/utils/__init__.py exports in
__all__ and five modules import.  Renaming it is an API change rather
than a spelling fix, so it and the locals built on it (signcolour,
thiscolour, colourplus, colourminus, test_signtocolour) are left for a
separate decision.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@roed314

roed314 commented Aug 6, 2026

Copy link
Copy Markdown
Member

I had GPT review; it found no blockers. It noted that if there are any external scripts calling the renamed functions they would break; I don't think that's an issue for us with these functions.

@jenpaulhus

jenpaulhus commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Are tests running on this PR? I don't see them running but also don't see the button with the usual method to force them to run.

Otherwise the PR LGTM.

@roed314

roed314 commented Aug 6, 2026

Copy link
Copy Markdown
Member

There's a major Github outage; no tests are running anywhere as of a few hours ago.

@jenpaulhus

Copy link
Copy Markdown
Contributor

Got it! Once the tests pass this looks like it can be merged.

GitHub Actions was disabled during a recent outage; this empty commit
kicks the checks back into running.
@roed314
roed314 merged commit bd10f7c into LMFDB:main Aug 7, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants