-
Notifications
You must be signed in to change notification settings - Fork 181
Translate reference-test-renderer #11
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
Conversation
- Describe the `<em>` styling issue - Fix command script
Co-Authored-By: kik4 <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
幾つか変更をお願いしたい点がありますのでご確認お願いします。
|
||
Essentially, this package makes it easy to grab a snapshot of the platform view hierarchy (similar to a DOM tree) rendered by a React DOM or React Native component without using a browser or [jsdom](https://github.com/tmpvar/jsdom). | ||
基本的には、このパッケージはプラットフォームにおいて、(DOM ツリーと同様の)ビューの階層構造のスナップショットの取得を容易にするものです。ビューの階層構造は、ブラウザや [jsdom](https://github.com/tmpvar/jsdom) を利用せずに React DOM もしくは React Native コンポーネントからレンダリングされます。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
基本的には、このパッケージはプラットフォームにおいて、(DOM ツリーと同様の)ビューの階層構造のスナップショットの取得を容易にするものです。ビューの階層構造は、ブラウザや [jsdom](https://github.com/tmpvar/jsdom) を利用せずに React DOM もしくは React Native コンポーネントからレンダリングされます。 | |
本質的ににこのパッケージは、ブラウザや [jsdom](https://github.com/tmpvar/jsdom) を利用しなくても、React DOM や React Native コンポーネントがレンダーする(DOM ツリーに似た)ビューの階層構造のスナップショットを容易に取得できるようにするためのものです。 |
こちらも文を分けてしまうと逆に意図が間違って伝わると思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
こちらのSuggestion のみ誤字(本質的ににこ...)がありましたのでコミット分けさせていただきました 🙇
translate docs/cdn-links
レビューありがとうございます!スタイルのミス / 訳語の選び方のミス / 訳漏れ等多く申し訳ないです。 |
Co-Authored-By: queq1890 <[email protected]>
1個だけsuggestionがそのままになっているっぽいので確認をお願いします。あと他にも翻訳を確認したい人がいるようですのでマージまで少し時間を置くかもしれませんがご了承ください。 |
LGTM, let me wait for other potential reviewers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for translating!
翻訳お疲れ様です。:+1:
細かいところの指摘をしました。IMOつけたところもあるので、コメント歓迎です 👍
|
||
### `testRenderer.getInstance()` | ||
|
||
```javascript | ||
testRenderer.getInstance() | ||
``` | ||
|
||
Return the instance corresponding to the root element, if available. This will not work if the root element is a function component because they don't have instances. | ||
存在する場合、ルート要素と対応したインスタンスを返します。関数コンポーネントはインスタンスを持たないため、ルート要素が関数コンポーネントの場合、このメソッドはうまく動作しません。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 存在する場合 -> 可能な場合の方が分かりやすいかと思います
もっといえば、「Class Componentの場合」にするのが一番近い気はするんですがさすがに意訳すぎるかもしれません
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「可能な場合」の方が条件が曖昧になる気がします。「ルート要素に対応したインスタンスがある場合はそれを返します」でもよいと思います
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「可能な場合」の訳でも「存在する場合」の訳でも、読み手からすると具体的にどんな場合なのかを想像しにくいかもしれませんね。 条件の説明と、何を返すかの説明がはっきりしている「ルート要素に対応したインスタンスがある場合はそれを返します」が良いと思うのですが、いかがでしょうか?
|
||
### `testInstance.find()` | ||
|
||
```javascript | ||
testInstance.find(test) | ||
``` | ||
|
||
Find a single descendant test instance for which `test(testInstance)` returns `true`. If `test(testInstance)` does not return `true` for exactly one test instance, it will throw an error. | ||
`test(testInstance)` が `true` を返す単一の子テストインスタンスを検索します。もし `test(testInstance)` に対して `true` を返すテストインスタンスの数がちょうど 1 でない場合は、エラーがスローされます。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
− IMO: 「エラーがスローされます」より「エラーが発生します」の方が分かりやすいと思います。ただ、日本語的には後者なんですが、エンジニアなら前者のほうが直感的かも知れないです。他の人の意見が欲しいです。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
これはもうスローでいいと思います、「エラーが発生」だと原文にある情報が失われてしまうと思います
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここは原文の throw an error
を残すためにスローのままキープさせていただきます 👍
@sasurau4 ありがとうございます。 差分サジェスト機能を使うとレビューをされた側がクリックするだけでそれをアクセプトするコミットを作れるのでおすすめです。https://qiita.com/ykhirao/items/5a854bb2548763a2196b |
@sasurau4 レビューありがとうございます!取り急ぎ、IMO ついていないご指摘箇所の修正をさせていただきます。 (Masterからのrebaseも) |
Co-Authored-By: queq1890 <[email protected]>
ありがとうございました! |
こちらこそありがとうございました 🙏 |
ありがとうございました! 👍 |
Related Issue : #4
I've made a translation for
reference-test-renderer.md
@smikitky レビューをお願いいたします 🙇