Skip to content

translate Advanced Guides > Portals #44

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 19 commits into from
Feb 5, 2019

Conversation

fsubal
Copy link
Contributor

@fsubal fsubal commented Feb 2, 2019

See #4 (comment)

Advanced Guides > Portals の翻訳です。
自分で不安のある部分はコメントしていきます。

>
> When working with portals, remember that [managing keyboard focus](/docs/accessibility.html#programmatically-managing-focus) becomes very important.
> ポータルを利用する際は、[キーボードのフォーカスの管理](/docs/accessibility.html#programmatically-managing-focus)を行うことが重要になるので、忘れずに行ってください。
Copy link
Contributor Author

Choose a reason for hiding this comment

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

キーボードのフォーカスの管理

ここは Accecibility の翻訳ができた際のタイトルに依存します

Copy link
Member

Choose a reason for hiding this comment

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

原文もあまり気にしていないので翻訳もそこまで気にしないでいいかなーと思っています(甘いかもしれませんが)

@smikitky smikitky self-requested a review February 2, 2019 07:18
// つまり、子要素は一旦どこにも結びつかない DOM ノードへとマウントされるということです。
// もし子コンポーネントがマウント後すぐに DOM ツリーに結びついてほしい ――
// たとえば DOM ノードの大きさを測りたい、子孫要素で `autoFocus` を使いたいなど
// ―― 場合は、 Modal に状態を持たせて子要素が DOM ツリーに入ったときだけ描画されるようにします。
Copy link
Contributor Author

Choose a reason for hiding this comment

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

(、)が多すぎてすごいことになりそうだったのでつい ―― を入れてしまいましたが、他に良い書き方があれば直したい気もします

@smikitky
Copy link
Member

smikitky commented Feb 2, 2019

ありがとうございます。あとでしっかりレビューしますが、とりあえず 第1引数 のようなところの 1 の周囲にも、面倒でも半角スペースをお願いします。

@fsubal fsubal force-pushed the translate/portals branch from 6ee9867 to c0fe009 Compare February 2, 2019 07:42
@smikitky
Copy link
Member

smikitky commented Feb 2, 2019

すみません、

Catching an event bubbling up from a portal in a parent component allows the development of more flexible abstractions that are not inherently reliant on portals. For example, if you render a <Modal /> component, the parent can capture its events regardless of whether it's implemented using portals.

これは難しすぎて英語を見ても何が言いたいのか僕が理解できてないです… @koba04 さん見ていただけませんでしょうか

smikitky and others added 3 commits February 2, 2019 21:16
Co-Authored-By: fsubal <fsubal@users.noreply.github.com>
Co-Authored-By: fsubal <fsubal@users.noreply.github.com>
Co-Authored-By: fsubal <fsubal@users.noreply.github.com>
@fsubal
Copy link
Contributor Author

fsubal commented Feb 2, 2019

最後の文は訳出が難しかったですが、自分の理解としては…

  • ポータルを使うと、 <Modal /> のようなコンポーネント( = "more flexible abstractions" )が簡単に表現できる
  • ポータルを使っているからと言って、その中で起きたことを親が知れないのではないか、みたいな心配をする必要はない
    • なぜならイベントのバブリングは DOM ツリーではなく React ツリーを経由して親に知らされるので
  • だから、ポータルでつくったコンポーネントは、通常のコンポーネントを扱うのと同じ考えで扱えば良い
    • = ポータルに対して "inherently reliant" である必要はない。
    • それは実装の詳細であり、親コンポーネントが理解している必要はない

という風に取りました。

@fsubal
Copy link
Contributor Author

fsubal commented Feb 2, 2019

ちなみに自信のなさでいうと、私は以下の部分がもっとも自信がないので、ここ突っ込んでもらえるとうれしい気がします…

// The portal element is inserted in the DOM tree after
// the Modal's children are mounted, meaning that children
// will be mounted on a detached DOM node. If a child
// component requires to be attached to the DOM tree
// immediately when mounted, for example to measure a
// DOM node, or uses 'autoFocus' in a descendant, add
// state to Modal and only render the children when Modal
// is inserted in the DOM tree.

@koba04 koba04 self-requested a review February 2, 2019 12:43
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.

最後の文章とコメントの内容について、Suggestionをさせて頂きましたので確認頂けると 🙇

koba04 and others added 2 commits February 2, 2019 22:57
Co-Authored-By: fsubal <fsubal@users.noreply.github.com>
Co-Authored-By: fsubal <fsubal@users.noreply.github.com>
@fsubal
Copy link
Contributor Author

fsubal commented Feb 2, 2019

@smikitky @koba04 ありがとうございます!

内容の変更は一通り反映したので、ハイライト行数がずれたとこなど、その他修正します

@tesseralis tesseralis mentioned this pull request Feb 2, 2019
90 tasks
@smikitky
Copy link
Member

smikitky commented Feb 3, 2019

ありがとうございます。準備ができたら呼んでください、そのときに改めてよく考えて確認します。(Modalのコードをちゃんと読んでませんでした…)

@fsubal
Copy link
Contributor Author

fsubal commented Feb 3, 2019

残りの指摘部分も修正できたのでご確認お願いしますー @smikitky

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.

inherently は reliant を修飾しており、その部分について原文とニュアンスが変わっている気がするのでそこだけ対応をお願いします。あとはもうこのままで大丈夫だと思います!

>
> When working with portals, remember that [managing keyboard focus](/docs/accessibility.html#programmatically-managing-focus) becomes very important.
> ポータルを利用する際は、[キーボードのフォーカスの管理](/docs/accessibility.html#programmatically-managing-focus)を行うことが重要になるので、忘れずに行ってください。
Copy link
Member

Choose a reason for hiding this comment

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

原文もあまり気にしていないので翻訳もそこまで気にしないでいいかなーと思っています(甘いかもしれませんが)

smikitky and others added 3 commits February 4, 2019 13:54
Co-Authored-By: fsubal <fsubal@users.noreply.github.com>
Co-Authored-By: fsubal <fsubal@users.noreply.github.com>
@smikitky smikitky merged commit ff5573d into reactjs:master Feb 5, 2019
@smikitky
Copy link
Member

smikitky commented Feb 5, 2019

ありがとうございました!

@fsubal fsubal deleted the translate/portals branch January 27, 2022 05:38
# 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