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 js-environment-requirements #9

Merged
merged 5 commits into from Feb 1, 2019

Conversation

saitolume
Copy link
Contributor

This PR is a part of #4

I have translated js-environment-requirements to Japanese referring to crowdin.

@smikitky smikitky self-requested a review February 1, 2019 05:48
@saitolume
Copy link
Contributor Author

saitolume commented Feb 1, 2019

@smikitky I'm sorry for forgetting to add reviewers.

layout: docs
category: Reference
permalink: docs/javascript-environment-requirements.html
---

React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set). If you support older browsers and devices which may not yet provide these natively (e.g. IE < 11) or which have non-compliant implementations (e.g. IE 11), consider including a global polyfill in your bundled application, such as [core-js](https://github.com/zloirock/core-js) or [babel-polyfill](https://babeljs.io/docs/usage/polyfill/).
React 16 はコレクション型 [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) および [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) に依存しています。(例えば IE 11 以前など)これらのプロパティをネイティブに提供しない、または非準拠の実装をしている古いブラウザやデバイスをサポートする場合は、[core-js](https://github.com/zloirock/core-js) もしくは [babel-polyfill](https://babeljs.io/docs/en/babel-polyfill/) などにより、グローバル環境のポリフィルをバンドルしたアプリケーションに含めることを検討してください。
Copy link
Member

Choose a reason for hiding this comment

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

  • 一応原文に準拠して「Map/Setがそもそも存在しないIE 11未満など」と「標準非準拠な挙動をするIE 11など」とを分けていただけると幸いです。
  • 「これらのプロパティをネイティブに提供しない」とありますが原文中に「プロパティ」の語はないので、「これら」にするか「これらの機能」で良いと思います。(まあグローバルオブジェクトのプロパティという意味では間違いではないのかもしれませんが)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

レビューありがとうございます!
ご指摘いただいた通りに修正させていただいきます。

@potato4d
Copy link
Member

potato4d commented Feb 1, 2019

@saitoeku3
今 master に TextLint が導入されたので、お手数ですが rebase もしくは merge をお願いしてもよろしいでしょうか 🙏

@saitolume
Copy link
Contributor Author

@potato4d 了解です👌

@tesseralis tesseralis mentioned this pull request Feb 1, 2019
90 tasks
@saitolume
Copy link
Contributor Author

修正しました!

layout: docs
category: Reference
permalink: docs/javascript-environment-requirements.html
---

React 16 depends on the collection types [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) and [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set). If you support older browsers and devices which may not yet provide these natively (e.g. IE &lt; 11) or which have non-compliant implementations (e.g. IE 11), consider including a global polyfill in your bundled application, such as [core-js](https://github.com/zloirock/core-js) or [babel-polyfill](https://babeljs.io/docs/usage/polyfill/).
React 16 はコレクション型 [Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) および [Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) に依存しています。これらの機能をネイティブに提供しない(IE 11 未満など)、または標準非準拠な挙動をする(IE 11 など)古いブラウザやデバイスをサポートする場合は、[core-js](https://github.com/zloirock/core-js) もしくは [babel-polyfill](https://babeljs.io/docs/en/babel-polyfill/) などにより、グローバル環境のポリフィルをバンドルしたアプリケーションに含めることを検討してください。
Copy link
Contributor

Choose a reason for hiding this comment

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

[core-js](https://github.com/zloirock/core-js) や [babel-polyfill](https://babeljs.io/docs/en/babel-polyfill/) などのような
が良いと思います。

Choose a reason for hiding this comment

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

MDNのURLも ja-JP 版にしても良さそう?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Jessidhia レビューありがとうございます!私もURLを変更しても良いと思います。 @smikitky さんはどう思われますか?

Copy link
Member

Choose a reason for hiding this comment

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

これはまとめて後で置換するのが間違いがないので、URL系はとりあえずこのままでお願いします

Copy link
Contributor Author

Choose a reason for hiding this comment

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

了解です👌


A polyfilled environment for React 16 using core-js to support older browsers might look like:
古いブラウザをサポートするために、core-js を利用して React 16 向けにポリフィルした環境は次のようになります。
Copy link
Contributor

Choose a reason for hiding this comment

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

古いブラウザをサポートするため、core-js を利用してポリフィルを含めた React 16 向けの環境は次のようになります。
のような訳が良いと思います。

React also depends on `requestAnimationFrame` (even in test environments).
You can use the [raf](https://www.npmjs.com/package/raf) package to shim `requestAnimationFrame`:
React は(テスト環境であっても)`requestAnimationFrame` に依存します。
`requestAnimationFrame` を再現するには [raf](https://www.npmjs.com/package/raf) を使用することができます。
Copy link
Contributor

Choose a reason for hiding this comment

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

ここの shim という単語は「差異をうめる」のようなニュアンスだと思うので、次の訳が良いのではと思います。

`requestAnimationFrame` の役割を補うために [raf](https://www.npmjs.com/package/raf) を使用します。

Copy link
Member

Choose a reason for hiding this comment

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

@takanorip その方がよさそうですね。このコメントボックスの上側にある「+-」のアイコンを押すと直接更新案を提案できるようなので使ってみるといいかもしれません

Copy link
Contributor

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.

@takanorip 沢山レビューしていただいて非常に感謝しています!私自身悩んでた部分なので修正させていただきますね。

@saitolume
Copy link
Contributor Author

皆さんからのフィードバックをもとに修正しました!ご確認お願いします

@smikitky smikitky merged commit af30978 into reactjs:master Feb 1, 2019
@smikitky
Copy link
Member

smikitky commented Feb 1, 2019

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

@saitolume
Copy link
Contributor Author

こちらこそありがとうございました😊

@saitolume saitolume deleted the js-environment-requirements branch February 1, 2019 15:11
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

5 participants