Skip to content

Translate "useCallback" hook reference #591

New issue

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

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

Already on GitHub? # to your account

Merged
merged 8 commits into from
Jun 16, 2023

Conversation

seckie
Copy link
Contributor

@seckie seckie commented May 21, 2023

#573 に引き続いて2つ目の翻訳です。

@seckie seckie changed the title Translate useCallback on "Reference" pages Translate "useCallback" on Reference pages May 21, 2023
@seckie seckie changed the title Translate "useCallback" on Reference pages Translate "useCallback" hook reference May 21, 2023
@github-actions
Copy link

github-actions bot commented May 21, 2023

Size changes

📦 Next.js Bundle Analysis for react-dev

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@smikitky
Copy link
Member

ありがとうございます。次回以降 #452 で先に宣言していただけると助かります。

@smikitky
Copy link
Member

smikitky commented May 22, 2023

Markdown パースや textlint 絡みの問題があるので、**強調** のマークアップが句点を含まないようにしていただけると助かります。そして句点の後の半角スペースを削除してください。

う。** あ ではなく う**。あ です。

@seckie
Copy link
Contributor Author

seckie commented May 22, 2023

@smikitky
早速のご確認とコメントありがとうございます。
0454fdd で修正しました。

ありがとうございます。次回以降 #452 で先に宣言していただけると助かります。

次回以降、先に #452 で宣言するようにします 🙇

@smikitky smikitky added 🚫 in intial review 初期レビューの真っ最中 and removed 🚫 in intial review 初期レビューの真っ最中 labels May 22, 2023
@smikitky
Copy link
Member

すみません、偶然今エフェクト関係の記事を翻訳していて痛感したのですが、dependency/dependencies について訳語の統一が必要だなと思っています。

https://github.com/reactjs/ja.react.dev/wiki/%E8%A8%B3%E8%AA%9E%E3%81%AE%E7%B5%B1%E4%B8%80

一旦、こちらに書いた方針で見直しをお願いできないでしょうか。

useEffect リファレンスの翻訳をしていた時はこの辺をよく考えておらず、「オブジェクトの不要な依存関係を削除する」みたいな、今見返したら何を言っているのかピンと来ない翻訳を自分がしてしまっているのですが、こういうのも「オブジェクト型の不要な依存値を削除する」と具体的に言った方が良い気がしています。(そちらは #585 と併せてこちらで修正します)

@smikitky
Copy link
Member

@koba04 dependencies の訳語について Wiki に書いた方針で良いでしょうか。useEffect リファレンスでも既にある程度は(半ば無意識的に)上記方針通りで訳してはいるのですが、もう少し明示的に統一したいと思います。

この方も言っていますが、個人的には dependency injection も「依存値注入」「依存物注入」「依存オブジェクト注入」と翻訳されるべきだったと思っています…)

@seckie
Copy link
Contributor Author

seckie commented May 23, 2023

https://github.com/reactjs/ja.react.dev/wiki/%E8%A8%B3%E8%AA%9E%E3%81%AE%E7%B5%B1%E4%B8%80

一旦、こちらに書いた方針で見直しをお願いできないでしょうか。

@smikitky 上記の方針に従って修正しました。 13a06b5 ご確認お願いします。

@smikitky smikitky requested review from smikitky, koba04 and potato4d May 30, 2023 02:49
@smikitky smikitky self-assigned this May 30, 2023
Copy link
Member

@smikitky smikitky left a comment

Choose a reason for hiding this comment

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

遅くなりましたが確認しました。明らかな誤訳みたいなのは少ないのですが、少しでも読みやすくするための suggestion の量が多めです。確認をよろしくお願いします。

なお新ドキュメントから「副作用」は「エフェクト」とすることにしました (#585)。

Co-authored-by: Soichiro Miki <smiki-tky@umin.ac.jp>
Copy link
Contributor Author

@seckie seckie left a comment

Choose a reason for hiding this comment

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

@smikitky ありがとうございます。たくさんの suggestion、お手数をおかけしました。


If you're already familiar with [`useMemo`,](/reference/react/useMemo) you might find it helpful to think of `useCallback` as this:
* **`useCallback` は*関数自体*をキャッシュします**。`useMemo`とは異なり、あなたが提供する関数を呼び出しません。代わりに、あなたが提供した関数をキャッシュして、`productId` または `referrer` が変更されない限り、`handleSubmit` *自体*が変更されないようにします。これにより、`ShippingForm` を不必要に再レンダーすることなく、`handleSubmit` 関数を下位に渡すことができます。ユーザーがフォームを送信するまであなたのコードは実行されません。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

999a17d こちらで対応しました。

Co-authored-by: Naoki Sekiguchi <likealunatic@gmail.com>
Copy link
Member

@smikitky smikitky left a comment

Choose a reason for hiding this comment

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

提案はそのままコミットしておきました。ありがとうございました!
2 人のレビューが必要ですのでこのままお待ち頂ければ幸いです。

Copy link
Member

@koba04 koba04 left a comment

Choose a reason for hiding this comment

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

👍 ありがとうございます!

@koba04 koba04 merged commit 0dce3ee into reactjs:main Jun 16, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants