# Code maintenance OP-20545 - Enforce US English spelling

Project: OpenProject
Status: tested
URL: https://community.openproject.org/work_packages/OP-20545

## OPEN POINTS

_No work packages_

## Subtasks

_No work packages_

## Details

| Attribute | Value |
| --- | --- |
| Assignee |  |
| Accountable |  |
| Designer |  |
| Developers | Alexander Coles |
| Requires doc change | Yes |
| Date |  |
| Priority | Medium |
| Target versions | 18.0.0 |
| Sprint |  |
| Backlog bucket |  |
| Module | Frontend components and Primer design system |
| Accessibility | No |
| List |  |

## Estimates and progress

| Attribute | Value |
| --- | --- |
| Work |  |
| Remaining work |  |

## Description

### Context

The documentation style guide asks for US English ("Write in US English with US grammar."), but the codebase mixes British and US spellings: "artefact" and "artifact", "behaviour" and "behavior", "colour" and "color", "organisation" and "organization". This includes user-facing English strings such as the PMflex "Artefact export" labels. The `typos` spellchecker added in <mention class="mention" data-id="OP-20508" data-type="work_package" data-text="#OP-20508">#OP-20508</mention> accepts both variants, so the mix keeps growing.

### Goal

  - Set `locale = "en-us"` in `typos.toml` so `typos` reports British spellings.
  - Convert British spellings in comments, documentation (release notes included), spec descriptions, local variables, private methods and English locale values (keys unchanged; locale changes in their own commit).
  - Allow-list public names that `typos` now flags (constants, public methods, i18n keys, stored option keys, CSS classes, file names, docs URL slugs) with a `follow-up` note, as in <mention class="mention" data-id="OP-20508" data-type="work_package" data-text="#OP-20508">#OP-20508</mention>.
  - Allow-list names fixed by outside specs or libraries without a follow-up: `aria-labelledby` and axe-core.
  - `typos` reports no findings on the branch.

### Out-of-scope

  - Renaming public identifiers, i18n keys, files or docs URLs, e.g. `ArtefactExport`, `AuthorisationService`, `labelled_tabular_form_for`, `server_flavour`. These are follow-up work packages.
  - Translated locales (Crowdin).

### Hints for QA

  - **PMflex artifact export:** in Administration → Work packages → Types → PDF export and in the work package PDF export dialog, labels read "artifact" instead of "artefact". Behavior unchanged.
  - **Project creation wizard:** the artifact name and success messages read "artifact".
  - **Other changed English strings:** spot-check the header logo upload help ("color"), high-contrast mode caption ("color mode"), saved views "Mark this view as favorite", Text transform actions ("organize"), LDAP group sync ("synchronize"). Wording should be identical apart from the spelling.
  - **Translations:** the changed source strings show as updated in Crowdin; existing translations should still display.
