useState の "Storing information from previous renders" 節の訳の改善#813
Merged
smikitky merged 2 commits intoreactjs:mainfrom Dec 19, 2024
Merged
useState の "Storing information from previous renders" 節の訳の改善#813smikitky merged 2 commits intoreactjs:mainfrom
smikitky merged 2 commits intoreactjs:mainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Size changesDetails📦 Next.js Bundle Analysis for react-devThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
smikitky
approved these changes
Dec 19, 2024
Member
|
ゼロから書くなら「条件分岐」と書くと思うので、「節」は機械翻訳で出てきたのをスルーしたのかもしれません。ありがとうございました。 |
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.
英語原文
これを逐語的に
setfunction while rendering)prevCount !== countset関数の呼び出しsetPrevCount(count)inside of the condition.prevCount !== countの if 文の then 節のように分割して訳しました。
元の訳文だと、"must" のニュアンスが抜け落ちてしまっていて、節と節のつながりも少し分かりづらい気がしたので、感覚で言い回し見直した次第です。
のどれが must の訳としてふさわしいか分からない…
ついでに、「条件節」を「条件文」になおしました。
「条件節」という用語は、英文法だと "if A, B" のうち A の部分を指すので、 今回必要な B を指す condition の訳語としては「条件文」がふさわしいと考えたためです。
(then 節と呼ぶのが個人的には好きですが、JS だと then と書かないので、この文書内ではふさわしくなさそう…)
一応、同ページ含め各種フックのページで、 B のことを原文で condition と呼び、日本語では「条件文」と訳している箇所を見つけたので、それに揃えてみました。
https://github.com/reactjs/react.dev/blob/e2bba41bf0f4913b7faaeff4920ec4eb98207a66/src/content/reference/react/useState.md?plain=1#L53
ja.react.dev/src/content/reference/react/useState.md
Line 53 in a5ff96b
検索結果:
https://github.com/search?q=repo%3Areactjs%2Fja.react.dev%20%E6%9D%A1%E4%BB%B6%E6%96%87&type=code