Repository navigation
docs: align reference section headings across the four languages and fix mismatched examples - #2235
Open
Archibald1948 wants to merge 11 commits into
Open
Archibald1948 wants to merge 11 commits into
Archibald1948 wants to merge 11 commits into
Conversation
Seven pages titled the error section `#### Errors` while the other 35 pages use `#### Throws`. `Throws` is what docs/CLAUDE.md maps the Korean, Japanese and Chinese headings to, and what every page added this year uses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
The English page titled the section `## Reference`, which only the `*Async` pages use, while the Korean, Japanese and Chinese versions of this page all use Usage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
Two pages used 예외; the other 40 Korean pages and docs/CLAUDE.md use 에러. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
Two pages used 例外; the other 40 Japanese pages and docs/CLAUDE.md use エラー. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
Five pages used 使い方 or インターフェース; the other 531 Japanese pages and docs/CLAUDE.md use 使用法. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
Four pages used 抛出错误 or 抛出; the other 38 Chinese pages and docs/CLAUDE.md use 错误. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
The page used 参考, which only the `*Async` pages use, while the English, Korean and Japanese versions of this page all use Usage. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
The Korean pages for Map and Set `forEach` called the parameter `callbackfn`, while the implementation and the other three languages call it `callback`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
The Korean and Chinese pages passed `{ UserId: 1, ... }`, a key that is
already PascalCase, so the example no longer showed a conversion. The
English and Japanese pages pass `{ userId: 1, ... }`.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
…ature The signature at the top assigned to `snakeCased`, left over from `toSnakeCaseKeys`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
`iteratee` is optional and defaults to identity. The `###` heading on the same page, the three translations and the sibling `flatMapDepth` page all write `iteratee?`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Reference pages that drifted apart between the four languages. I compared every
page's section headings and every code block across
docs/reference,docs/compat/referenceand theirko,ja,zh_hanstranslations, and fixedthe cases where one language disagreed with the other three. The naming comes
from the translation table in
docs/CLAUDE.md(Usage = 사용법 / 使用法 / 用法, Throws = 에러 / エラー / 错误).
Nothing here changes the documented behavior; the examples themselves still run
exactly as documented.
Section headings (22 files)
#### Errors#### Throws(the other 35 pages, and every page added this year)## Referenceonat## Usage(all three translations of the page)#### 예외#### 에러(the other 40 pages)#### 例外#### エラー(the other 40 pages)## 使い方,## インターフェース## 使用法(the other 531 pages)#### 抛出错误,#### 抛出#### 错误(the other 38 pages)## 参考oncompact## 用法(all three other languages of the page)## Referencestays on the*AsyncandlimitAsyncpages, where all fourlanguages agree on it.
Examples and signatures (7 files)
forEach(Map, Set), Korean: the parameter was calledcallbackfn; theimplementation and the other three languages call it
callback.toPascalCaseKeys, Korean and Chinese: the example meant to show thatcamelCase keys are converted, but passed
{ UserId: 1, FIRST_NAME: 'JinHo', LAST: 'Yeom' }—a key that is already PascalCase — so it demonstrated nothing. English and
Japanese pass
{ userId: 1, ... }.toKebabCaseKeys, Chinese: the signature at the top assigned tosnakeCased, left over fromtoSnakeCaseKeys.flatMap,flatMapDeep(compat): the signature at the top wroteiteratee, whileiterateeis optional and defaults to identity. The###heading on the same page, the three translations and the sibling
flatMapDepthpage all writeiteratee?.How I checked
Three throwaway scripts, not part of this PR:
compared each statement with its
// Returns:comment — 1,327 statements,0 mismatches, so the examples' documented results are all still correct.
literals and comments. After this PR the only remaining differences are the
deliberately localized strings in
isRegExp.After this PR the only remaining differences are the
## Examplessectionsbelow.
yarn format:checkpasses andyarn lintreports no new errors.Left out
Ten array pages (
countBy,flatMap,flatMapDeep,groupBy,keyBy,maxBy,minBy,takeWhile,takeRightWhile,uniqBy) have an## Examplessection in English that none of the three translations have, and
debounce,memoizeandunzipWithhave one in Japanese only. Those need the sectionswritten, not moved, so I left them for a follow-up — happy to take it on if you
would like it.
🤖 Generated with Claude Code
https://claude.ai/code/session_0129BhQdChg7wJry7bWvRHHm