Skip to content
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

Translate faq-functions #111

Merged
merged 15 commits into from Feb 15, 2019
Merged

Translate faq-functions #111

merged 15 commits into from Feb 15, 2019

Conversation

ossan-engineer
Copy link
Contributor

This PR is part of Issue #4.
This translation is based on the Crowdin repository.

@ossan-engineer ossan-engineer changed the title [WIP] Translate faq-functions Translate faq-functions Feb 12, 2019
@ossan-engineer
Copy link
Contributor Author

翻訳完了しましたので、レビューをお願いいたします:pray:

@smikitky smikitky self-requested a review February 12, 2019 02:59
@smikitky smikitky added the 🚫 in intial review 初期レビューの真っ最中 label Feb 12, 2019
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.

スペース絡みのスタイル違反がかなりありそうです。最新のmasterにリベースしてからtestlintをかけ直すと検出できますので、問題を修正していただいていいでしょうか。

content/docs/faq-functions.md Outdated Show resolved Hide resolved
content/docs/faq-functions.md Outdated Show resolved Hide resolved
content/docs/faq-functions.md Outdated Show resolved Hide resolved
content/docs/faq-functions.md Outdated Show resolved Hide resolved
content/docs/faq-functions.md Outdated Show resolved Hide resolved
content/docs/faq-functions.md Outdated Show resolved Hide resolved
content/docs/faq-functions.md Outdated Show resolved Hide resolved
content/docs/faq-functions.md Outdated Show resolved Hide resolved
@smikitky smikitky removed the 🚫 in intial review 初期レビューの真っ最中 label Feb 12, 2019
@ossan-engineer
Copy link
Contributor Author

@smikitky ありがとうございます!最新の textlint を含め、諸々反映しましたのでご確認ください:pray:

Copy link
Contributor

@sasurau4 sasurau4 left a comment

Choose a reason for hiding this comment

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

👏 翻訳お疲れ様です
よりよくなりそうな箇所がいくつかあったので、コメントしました 🙏


With React, typically you only need to bind the methods you *pass* to other components. For example, `<button onClick={this.handleClick}>` passes `this.handleClick` so you want to bind it. However, it is unnecessary to bind the `render` method or the lifecycle methods: we don't pass them to other components.
React では、典型的にはコンポーネントに *渡す* メソッドのみをバインドする必要があります。たとえば、`<button onClick={this.handleClick}>` というコードは、`this.handleClick` を渡しているので、バインドする必要があります。しかし、レンダーやライフサイクルメソッドをバインドする必要はありません。それらは他のコンポーネントに渡すことがないからです。
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO: 典型的だと直訳っぽいので、「一般的に」の方が自然かと
それとonlyがかかってるところが違う気がします
「React では、一般的に他のコンポーネントに 渡す メソッドしかバインドする必要はありません。」とかいかがでしょうか?


[This post by Yehuda Katz](http://yehudakatz.com/2011/08/11/understanding-javascript-function-invocation-and-this/) explains what binding is, and how functions work in JavaScript, in detail.
[Yefuda Kats によるこの記事](http://yehudakatz.com/2011/08/11/understanding-javascript-function-invocation-and-this/) で、バインドとは何か、また JavaScript における関数の動作について詳細に説明されています。
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO: Thisは英語として成り立たせるための単語っぽいので訳さない方が自然な日本語になりそうです
1案ですが、以下を提案しておきます。
「Yefuda Kats の記事はバインドとは何か、また JavaScript における関数の動作について詳細に説明してくれています」


If you have an event handler such as `onClick` or `onScroll` and want to prevent the callback from being fired too quickly, then you can limit the rate at which callback is executed. This can be done by using:
`onClick` `onScroll` のようなイベントハンドラがあって、それがあまりに高速に呼び出されるのを防ぎたい場合、コールバックが実行される頻度を制御するこができます。これは以下の方法で可能です:
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO: 高速に呼び出されるだと、なぜ速度の話?ってなりそうなので、「連続して呼び出されるのを」ではいかがでしょう?

Copy link
Member

@smikitky smikitky Feb 13, 2019

Choose a reason for hiding this comment

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

「頻繁に」でもいいかも(横槍すみません)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sasurau4 @smikitky ご意見ありがとうございます!確かに「速度」ではなく「頻度」が問題であり、さらにその程度が「過剰」であることが条件となっているため、より強調した「高頻度で」という表現にしたいと思います:pray:


Debouncing ensures that a function will not be executed until after a certain amount of time has passed since it was last called. This can be useful when you have to perform some expensive calculation in response to an event that might dispatch rapidly (eg scroll or keyboard events). The example below debounces text input with a 250ms delay.
デバウンスは、関数が最後に呼ばれてから一定時間経過するまで実行されないようにします。これは、高速に発生するイベント(例:スクロールやキーボードイベントなど)に応じた高コストな計算処理が必要なときに役立ちます。下記の例は、250 ミリ秒の遅延でテキスト入力をデバウンスします。
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO: 案ですが「高速 」-> 「連続して」

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sasurau4 先程の訳と足並みを揃えて「高頻度で」としてみます。


[`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) is a way of queuing a function to be executed in the browser at the optimal time for rendering performance. A function that is queued with `requestAnimationFrame` will fire in the next frame. The browser will work hard to ensure that there are 60 frames per second (60 fps). However, if the browser is unable to it will naturally *limit* the amount of frames in a second. For example, a device might only be able to handle 30 fps and so you will only get 30 frames in that second. Using `requestAnimationFrame` for throttling is a useful technique in that it prevents you from doing more than 60 updates in a second. If you are doing 100 updates in a second this creates additional work for the browser that the user will not see anyway.
[`requestAnimationFrame`](https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame) は描画パフォーマンスが最適化されるタイミングでブラウザで実行される関数をキューに入れる方法です。`requerstAnimationFrame` でキューに入れられている関数は、次のフレームで実行されます。ブラウザは、毎秒 60 フレーム (60fps) を保証するために懸命に働きます。しかし、それができなかった場合には、自然に 1 秒間のフレーム数が *制限* されます。たとえば、デバイスが 30 fps しか処理できなければ、1 秒間に 30 フレームしか取得できません。`requestAnimationFrame` スロットルを使うことで、1 秒間に 60 回以上になる更新を防ぐことができます。1 秒間に 100 回の更新をする場合、ユーザーには確認できない追加作業をブラウザが作成することになります。
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO: ブラウザが一生懸命働きますだとちょっと微笑ましい感じがするので、「ブラウザは、毎秒** 60 フレーム (60fps) を確保するように努めます」はいかがでしょう?

content/docs/faq-functions.md Outdated Show resolved Hide resolved
@ossan-engineer
Copy link
Contributor Author

@sasurau4 @smikitky 諸々修正しましたので、お手すきでご確認お願いいたします:pray:

Copy link
Contributor

@sasurau4 sasurau4 left a comment

Choose a reason for hiding this comment

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

お疲れ様でした 🙏
他のApprove権限持つ方のレビューをお待ち下さい〜

@ossan-engineer
Copy link
Contributor Author

@sasurau4 @smikitky 了解です!レビューありがとうございました:pray:

@tesseralis tesseralis mentioned this pull request Feb 14, 2019
90 tasks
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.

@ossan-engineer 細かい点ですが、コメントしたので確認お願いします!🙏

content/docs/faq-functions.md Outdated Show resolved Hide resolved
content/docs/faq-functions.md Outdated Show resolved Hide resolved
Co-Authored-By: ossan-engineer <bodega1123@gmail.com>
@ossan-engineer
Copy link
Contributor Author

@koba04 ご指摘ありがとうございます!特に異論はないので、頂いた suggestions を適用させて頂きました:pray:

@koba04 koba04 merged commit 397b93d into reactjs:master Feb 15, 2019
@koba04
Copy link
Member

koba04 commented Feb 15, 2019

@ossan-engineer mergeしました! 🚀🚀🚀 ありがとうございます! 🎉🎉🎉

@ossan-engineer
Copy link
Contributor Author

@koba04 こちらこそありがとうございます!また機会がありましたらよろしくお願いいたします!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants