Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Standardize spelling to American English in documentation #9804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
auvipy merged 3 commits into encode:main from p-r-a-v-i-n:standardize-american-english
Oct 27, 2025

Conversation

@p-r-a-v-i-n
Copy link
Contributor

@p-r-a-v-i-n p-r-a-v-i-n commented Oct 21, 2025

According to DRF language-style the documentation should follow the american english style.

But I have found some British style words or inconsistent spellings like behaviour, customise, initialise, e-mail, Sub-classes in the docs. In this PR I have modified them to DRF style.

I have touched 26 files. and I can understand this is relatively large change. I'm not sure whether DRF team will like my approach or not. but if anything is there I'm happy to adjust.

Note: highlight.pack.js were intentionally not modified.

Copy link
Collaborator

@browniebroke browniebroke left a comment

Choose a reason for hiding this comment

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

Can we configure codespell in any way to catch this in the future? We're already using it as pre-commit hook

Copy link
Contributor Author

Thanks for review and suggestion @browniebroke !

Can we configure codespell in any way to catch this in the future?

That would be great if we configured. I have done small research and i found codespell project directly addresses the British-to-American spelling standardization . The maintainers merged a change to include a dedicated en_GB_to_en_US dictionary (related to codespell-project/codespell/pull/1480). This dictionary is specifically designed to flag common British spellings (like the ones I corrected: initialise, behaviour, etc.) as typos.
for maximum coverage we can also use this regex i found in the discussion.

@p-r-a-v-i-n p-r-a-v-i-n force-pushed the standardize-american-english branch from f4e1eaf to f2f5d86 Compare October 24, 2025 05:05
Copy link
Contributor Author

I tried locally
by adding args: ["--builtin", "clear,rare,en-GB_to_en-US"] in codespell section.

- repo: https://github.com/codespell-project/codespell
 # Configuration for codespell is in .codespellrc
 rev: v2.4.1
 hooks:
 - id: codespell
 args: ["--builtin", "clear,rare,en-GB_to_en-US"]
 exclude: locale|kickstarter-announcement.md|coreapi-0.1.1.js
 additional_dependencies:
 # python doesn't come with a toml parser prior to 3.11
 - "tomli; python_version < '3.11'"

I got following results:
codespell_error

I would love to work on the configuring codespell hook. Can i raise Seperate PR ? if yes, then which file to be ignored for now?

Copy link
Collaborator

Can i raise Seperate PR ? if yes, then which file to be ignored for now?

Yes, sure. Fine by me

p-r-a-v-i-n reacted with heart emoji

@browniebroke browniebroke changed the title (削除) Standardize spelling to American English (削除ここまで) (追記) Standardize spelling to American English in documentation (追記ここまで) Oct 24, 2025
Copy link
Contributor Author

I got following results: codespell_error

@browniebroke If you go through the image, It detect other words too which i haven't detect in the PR. So Should i update those too ? So It will be in one go.
Also I want to mention that spelling errors were ignored in python code by codespell .
It detect those spelling errors only in the "comments" of python files and ".md" files.

Copy link
Collaborator

It detect other words too which i haven't detect in the PR. So Should i update those too ? So It will be in one go.

If you want to, sure. Thinking about it again. Would be nice to update codespell config so it's all done in one go as well... This all feels very much related. Fixing the problem and setting us up for no further changes. Same spirit as updating tests as your fix a bug.

Also I want to mention that spelling errors were ignored in python code. It detect those spelling errors only in the "comments" of python files and ".md" files.

👍🏻 Noted

...tency
changes:
- Activates the `en-GB_to_en-US` built-in dictionary to flag British spellings
- Created codespell-ignore-words.txt file to ignore specific words
- include `code` and `names` for comprehensive typo checking in technical contexts.
- changed the 'lets' to 'let's'.
Copy link
Collaborator

@browniebroke browniebroke left a comment

Choose a reason for hiding this comment

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

Nice work!

p-r-a-v-i-n reacted with heart emoji
@auvipy auvipy merged commit ade172e into encode:main Oct 27, 2025
7 checks passed
@p-r-a-v-i-n p-r-a-v-i-n deleted the standardize-american-english branch October 28, 2025 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@browniebroke browniebroke browniebroke approved these changes

@auvipy auvipy auvipy approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /