Skip to content

[OP-20545] Enforce US English spelling - #26247

Merged
myabc merged 11 commits into
devfrom
code-maintenance/op-20545-us-english
Oct 23, 2026
Merged

myabc merged 11 commits into
devfrom
code-maintenance/op-20545-us-english

Conversation

@myabc

@myabc myabc commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

Ticket

https://community.openproject.org/wp/OP-20545

What are you trying to accomplish?

Follows #26140. Sets locale = "en-us" in typos.toml, so typos now reports British spellings, and converts the existing ones. The documentation style guide already asks for US English, but the codebase mixed both ("artefact"/"artifact", "behaviour"/"behavior", "colour"/"color", "organisation"/"organization"), including user-facing strings such as the PMflex "Artefact export" labels.

typos reports no findings on the branch.

What approach did you choose and why?

  • Same rule as [OP-20508] Spell-check code with typos and fix existing typos #26140: converts only what cannot change behavior: comments, docs (release notes included), spec descriptions, local variables, private methods and English locale values (keys unchanged; locale changes in their own commit).
  • Allow-lists public names that typos now flags (constants, public methods, i18n keys, stored option keys, CSS classes, file names, docs URL slugs), each with a follow-up note in typos.toml.
  • Allow-lists names fixed by outside specs or libraries without a follow-up: aria-labelledby, axe-core, the Rails marshalling_format_version option.
  • Leaves shipped migrations and the Nextcloud XML payload untouched, and keeps "Centre of Excellence in PM²" (a proper name) and "Aluminium (0.4)" (matches the release notes screenshot).
  • Converts the BIM seed texts: their translations are looked up by key, so Crowdin translations still match.
  • Fixes by hand what typos skips: five docs anchors (it ignores URLs) and two regex literals in a spec.
  • One commit per area (config, core app, frontend, docs, modules, core specs, English locale). Feature specs that assert changed UI text sit in the locale commit, so each commit keeps its specs passing.

Follow-ups

Public names allow-listed with a follow-up note, to rename in separate work packages:

  • PMflex artefact export: Artefact* constants and classes, *_artefact* methods, i18n keys and routes, the "artefact" PDF export template id stored in type settings, and the artefact file names.
  • Enterprise and banners: EnterpriseToken.trialling?, trialling_features/triallingFeatures, BannersService#trialling, getEnterPriseEditionUrl.
  • Frontend and forms: AuthorisationService, labelled_tabular_form_for/labelled_tabular_form_with, the op-header-project-select--no-favourites CSS class, the APIv3 resource signalled method.
  • Stored data and keys: server_flavour (LLM connection options), the favoured i18n key, BIM seed keys (group__bim_modellers, modelling_*).
  • Specs and reporting: set_favoured page object helper, labour_query? reporting table method.

AI involvement

Directed – I specified the requirements and AI implemented most of it; I validated via testing rather than a full line-by-line review.

Merge checklist

  • Added/updated tests
  • Added/updated documentation in Lookbook (patterns, previews, etc)
  • Tested major browsers (Chrome, Firefox, Edge, ...)

@github-actions github-actions Bot added the ai: Directed 🪄 A human specified the requirements and AI implemented most of it; They validated via testing. label Oct 22, 2026
@myabc
myabc force-pushed the code-maintenance/op-20545-us-english branch from eab493a to e45a34a Compare October 22, 2026 15:29
@myabc
myabc marked this pull request as ready for review October 22, 2026 15:29
@github-actions

Copy link
Copy Markdown

Caution

The provided work package version does not match the core version

Details:

Please make sure that:

  • The work package version OR your pull request target branch is correct

@github-actions

Copy link
Copy Markdown
1 Warning
⚠️ @opf/dream-team Files in app/components/op_primer were modified:

  • app/components/op_primer/border_box_table_component.rb

Please review these changes to ensure they align with the design system guidelines.

Generated by 🚫 Danger

@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/work_packages/table/queries/id_filter_spec.rb[1:1]
🤖 Ask Copilot to investigate

Copy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer.

@copilot The following spec(s) are flaky in CI (first seen on PR #26247, linked for reference only):

- `rspec ./spec/features/work_packages/table/queries/id_filter_spec.rb[1:1]`

Treat this as a standalone task, unrelated to PR #26247. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #26247 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @myabc to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @myabc, and request a review from @myabc.
On every commit, set @myabc as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

@judithroth

Copy link
Copy Markdown
Contributor

Hi @myabc ,
from what I see, the failing tests on blocknote-extensions are really due to the translations still missing in Crowdin (https://community.openproject.org/wp/BNE-175). So I think it's okay to ignore them.
On topic of the PR: I'd suggest mentioning that we use en-US also for variable names and comments in documentation (if it isn't there already) and AGENTS.md as well. I didn't know that until you pointed it out recently.

@myabc
myabc requested a review from toy October 22, 2026 17:49

@toy toy left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly minor things, notes and questions

Comment thread docs/development/application-architecture/README.md Outdated
Comment thread docs/release-notes/17-4-0/README.md Outdated
Comment on lines 952 to 965
| Competence | Key Virtues |
| --- | --- |
| Leadership | All |
| Relationships and engagement | Fairness, Friendliness, Generosity, Honesty, Humour, <br> Temperance |
| Self-reflection and-self management | Calmness, Courage, Friendliness, Honesty, Honour, Temperance |
| Relationships and engagement | Fairness, Friendliness, Generosity, Honesty, Humor, <br> Temperance |
| Self-reflection and-self management | Calmness, Courage, Friendliness, Honesty, Honor, Temperance |
| Change and transformation | Calmness, Courage, Friendliness, Generosity |
| Personal communication | Calmness, Friendliness, Generosity, Humour |
| Resourcefulness | Fairness, Friendliness, Generosity, Honesty, Honour |
| Results orientation | Honour, Generosity, Magnanimity, Magnificence |
| Teamwork | Calmness, Courage, Fairness, Friendliness, Generosity, Honour, <br> Magnificence |
| Negotiation | Courage, Fairness, Friendliness, Generosity, Honesty, Honour |
| Personal communication | Calmness, Friendliness, Generosity, Humor |
| Resourcefulness | Fairness, Friendliness, Generosity, Honesty, Honor |
| Results orientation | Honor, Generosity, Magnanimity, Magnificence |
| Teamwork | Calmness, Courage, Fairness, Friendliness, Generosity, Honor, <br> Magnificence |
| Negotiation | Courage, Fairness, Friendliness, Generosity, Honesty, Honor |
| Conflict and crisis management | Calmness, Fairness, Friendliness, Generosity |
| Personal integrity and reliability | Calmness, Courage, Fairness, Friendliness, Honour, Temperance |
| Personal integrity and reliability | Calmness, Courage, Fairness, Friendliness, Honor, Temperance |
| Culture and values management | All virtues |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need markdown linter to at least align tables, I wrote a script for that long ago, maybe can be combined with reviewdog (it has a way with general tools), or maybe there is an existing solution

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread docs/release-notes/17-3-2/README.md Outdated
Comment thread docs/release-notes/17-2-4/README.md Outdated
Comment thread docs/user-guide/projects/project-home/README.md Outdated
Comment thread modules/wikis/app/forms/wikis/admin/url_input_form.rb Outdated
Comment thread script/jira/gen_jira_projects.rb Outdated
@@ -66,7 +66,7 @@

subject(:pdf_strings) do
content = export_pdf.content
# File.binwrite("artefact-test-preview.pdf", content)
# File.binwrite("artifact-test-preview.pdf", content)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like debug leftover @as-op

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will wait for him to reply!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ISO 19650 uses British spelling, so not sure if BIM should also use US spelling or should be an exception

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a @wielinde question.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping US spelling here. The en locale is en-US, and other English variants come through Crowdin. The changed strings are seed text (Modeling, BIM Modelers), not ISO 19650 terms. The :group__bim_modellers reference key is unchanged.

myabc added 2 commits October 23, 2026 20:52
Sets the typos locale to en-us, since the documentation style guide
asks for US English and the dictionary otherwise accepts both
variants. Public names that now get flagged, such as the PMflex
artefact export code, AuthorisationService and server_flavour, are
allow-listed with a follow-up note; names fixed by other specs, such
as aria-labelledby and axe-core, are allow-listed without one.

https://community.openproject.org/wp/OP-20545
Converts British spellings in comments, log and error messages,
development seed data, private methods and locals, such as
honouring_negation and normalised_window. Public names and the PMflex
artefact export code keep their spelling and are allow-listed.

https://community.openproject.org/wp/OP-20545
@myabc
myabc force-pushed the code-maintenance/op-20545-us-english branch from 6095130 to 2672ced Compare October 23, 2026 19:54
myabc added 9 commits October 23, 2026 20:55
Converts British spellings in comments, spec descriptions, test data,
lookbook documentation and module-internal names such as neighbourItem
and recognisedMobilities. Public service methods keep their spelling
and are allow-listed for a follow-up rename.

https://community.openproject.org/wp/OP-20545
Converts British spellings across the docs, release notes included,
and updates the in-page anchors of headings whose spelling changed,
such as PMflex Artifact. Docs directory names stay as they are, since
they are public URLs, and so do quoted names such as the EU Centre of
Excellence in PM².

https://community.openproject.org/wp/OP-20545
Converts British spellings in module code comments, spec descriptions,
private names such as the hourly rate labelled helper, and the BIM
seed texts, whose translations are keyed by path rather than by the
English source. Shipped migrations and external payloads keep their
spelling.

https://community.openproject.org/wp/OP-20545
Converts British spellings in spec descriptions, shared example names,
comments, locals and test data. Specs asserting English UI text that
changes with the locale strings move along with those strings.

https://community.openproject.org/wp/OP-20545
Converts British spellings in English locale values, such as the
PMflex artifact export labels, and updates the feature specs that
assert them. Keys keep their spelling; Crowdin shows the changed
source strings to translators as updated.

https://community.openproject.org/wp/OP-20545
Restores "favourite" in the project home page keywords. The list
carries both spellings on purpose so searches with either one find the
page. Adds a typos ignore pattern for front matter keywords.

https://community.openproject.org/wp/OP-20545
Replaces the remaining "unmarshalling" and "unmarshalled" occurrences,
which typos misses because its dictionary has no entry for either word.

https://community.openproject.org/wp/OP-20545
Drops the trailing non-breaking spaces from the secret key base
paragraphs in the release notes and pads the PullPreview row so the
deployment table stays aligned after the spelling change.

https://community.openproject.org/wp/OP-20545
Replaces my-organization.com, which is a registered domain, with the
reserved example.com domain.

https://community.openproject.org/wp/OP-20545
@myabc
myabc force-pushed the code-maintenance/op-20545-us-english branch from 2672ced to f7931ff Compare October 23, 2026 19:56
@github-actions

Copy link
Copy Markdown

Warning

Flaky specs

  • rspec ./spec/features/projects/lists/filters_spec.rb[1:18:1:1]
🤖 Ask Copilot to investigate

Copy the prompt below into a new comment on this PR to delegate the investigation to GitHub Copilot. It will look into the flakiness and open a separate pull request with you as reviewer.

@copilot The following spec(s) are flaky in CI (first seen on PR #26247, linked for reference only):

- `rspec ./spec/features/projects/lists/filters_spec.rb[1:18:1:1]`

Treat this as a standalone task, unrelated to PR #26247. Create a new branch from origin/dev and open a new pull request targeting dev — do not stack it on PR #26247 or reuse that branch.

Follow the playbook in docs/development/testing/handling-flaky-tests/README.md to find the root cause and fix the underlying race — do not skip, delete, or weaken the spec to make it pass; disabling is a last resort per the playbook, and only with a bug ticket. Verify the fix by running the spec(s) repeatedly (e.g. `script/bulk_run_rspec --run-count 10`).

If you cannot reproduce the flake or are not confident in a fix after reasonable investigation, do not fabricate a change or skip the spec to force CI green. Instead, leave the pull request in draft and document what you tried, the suspected cause, and any leads in its description, then assign @myabc to take over.

Once the fix is verified, title the PR after the spec(s) it fixes, and use the PR description to explain the root cause, how the change resolves it, and the before/after results. Label the PR `flaky-spec`, assign @myabc, and request a review from @myabc.
On every commit, set @myabc as the sole co-author with a `Co-authored-by:` trailer (use their GitHub no-reply email so it links to their account), so it is traceable who dispatched the fix.

@myabc
myabc merged commit 1ebd04c into dev Oct 23, 2026
28 of 30 checks passed
@myabc
myabc deleted the code-maintenance/op-20545-us-english branch October 23, 2026 20:35
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 23, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

ai: Directed 🪄 A human specified the requirements and AI implemented most of it; They validated via testing. documentation maintenance

Development

Successfully merging this pull request may close these issues.

3 participants