Skip to content

translate Advanced Guides > Portals - #44

Merged
smikitky merged 19 commits into
reactjs:masterfrom
fsubal:translate/portals
Feb 5, 2019
Merged

translate Advanced Guides > Portals#44
smikitky merged 19 commits into
reactjs:masterfrom
fsubal:translate/portals

Conversation

@fsubal

Copy link
Copy Markdown
Contributor

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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

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

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

Copy link
Copy Markdown
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
Comment threadcontent/docs/portals.md Outdated
// つまり、子要素は一旦どこにも結びつかない DOM ノードへとマウントされるということです。
// もし子コンポーネントがマウント後すぐに DOM ツリーに結びついてほしい ――
// たとえば DOM ノードの大きさを測りたい、子孫要素で `autoFocus` を使いたいなど
// ―― 場合は、 Modal に状態を持たせて子要素が DOM ツリーに入ったときだけ描画されるようにします。

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

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

@smikitky

Copy link
Copy Markdown
Member

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

Comment threadcontent/docs/portals.md
Comment threadcontent/docs/portals.md
Comment threadcontent/docs/portals.md Outdated
Comment threadcontent/docs/portals.md Outdated
Comment threadcontent/docs/portals.md Outdated
@smikitky

Copy link
Copy Markdown
Member

すみません、

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 さん見ていただけませんでしょうか

smikitkyand 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

fsubal commented Feb 2, 2019

Copy link
Copy Markdown
ContributorAuthor

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

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

という風に取りました。

@fsubal

Copy link
Copy Markdown
ContributorAuthor

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

// 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

@koba04koba04 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Comment threadcontent/docs/portals.md Outdated
Comment threadcontent/docs/portals.md Outdated
koba04and 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
Copy Markdown
ContributorAuthor

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

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

@tesseralistesseralis mentioned this pull request Feb 2, 2019
90 tasks
@smikitky

Copy link
Copy Markdown
Member

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

@fsubal

Copy link
Copy Markdown
ContributorAuthor

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

@smikitkysmikitky left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Comment threadcontent/docs/portals.md Outdated
Comment threadcontent/docs/portals.md Outdated
> 補足
>
> 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
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

smikitkyand 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:masterFeb 5, 2019
@smikitky

Copy link
Copy Markdown
Member

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

@fsubal
fsubal deleted the translate/portals branch January 27, 2022 05:38
Sign up for freeto 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.

3 participants

@fsubal@smikitky@koba04