-
Notifications
You must be signed in to change notification settings - Fork 181
Translate faq-ajax #10
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
content/docs/faq-ajax.md
Outdated
|
||
You can use any AJAX library you like with React. Some popular ones are [Axios](https://github.com/axios/axios), [jQuery AJAX](https://api.jquery.com/jQuery.ajax/), and the browser built-in [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). | ||
任意のAJAXライブラリをReactと共に利用可能です。人気のあるものとしては、[Axios](https://github.com/axios/axios)、[jQuery AJAX](https://api.jquery.com/jQuery.ajax/)、ブラウザ組み込みの [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)などがあります。 |
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.
MDNのリンクは https://developer.mozilla.org/ja/docs/Web/API/Fetch_API にしても良さそう
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.
MDNのリンクはドキュメント中に数十カ所あるので、日本語版にはまとめて置換するほうが効率的かなということで、一応そのままにするという形でお願いしています。
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.
大部分はスペースの置き方などの些細な問題なのですがご確認の上対応をお願いします。
content/docs/faq-ajax.md
Outdated
@@ -1,24 +1,24 @@ | |||
--- | |||
id: faq-ajax | |||
title: AJAX and APIs | |||
title: AJAXとAPI |
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.
title: AJAXとAPI | |
title: AJAX と API |
英字と和文との間に半角スペースをお願いします。 TRANSLATION.md をご一読ください。
content/docs/faq-ajax.md
Outdated
permalink: docs/faq-ajax.html | ||
layout: docs | ||
category: FAQ | ||
--- | ||
|
||
### How can I make an AJAX call? | ||
### AJAXコールするには? |
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.
### AJAXコールするには? | |
### AJAX コールをする方法は? |
content/docs/faq-ajax.md
Outdated
|
||
You can use any AJAX library you like with React. Some popular ones are [Axios](https://github.com/axios/axios), [jQuery AJAX](https://api.jquery.com/jQuery.ajax/), and the browser built-in [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API). | ||
任意のAJAXライブラリをReactと共に利用可能です。人気のあるものとしては、[Axios](https://github.com/axios/axios)、[jQuery AJAX](https://api.jquery.com/jQuery.ajax/)、ブラウザ組み込みの [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)などがあります。 |
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.
任意のAJAXライブラリをReactと共に利用可能です。人気のあるものとしては、[Axios](https://github.com/axios/axios)、[jQuery AJAX](https://api.jquery.com/jQuery.ajax/)、ブラウザ組み込みの [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API)などがあります。 | |
任意の AJAX ライブラリを React と共に利用可能です。人気のあるものとしては、[Axios](https://github.com/axios/axios)、[jQuery AJAX](https://api.jquery.com/jQuery.ajax/)、ブラウザ組み込みの [window.fetch](https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API) などがあります。 |
content/docs/faq-ajax.md
Outdated
|
||
### Where in the component lifecycle should I make an AJAX call? | ||
### コンポーネントのどのライフサイクルでAJAXコールすべきか? |
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.
### コンポーネントのどのライフサイクルでAJAXコールすべきか? | |
### コンポーネントのどのライフサイクルで AJAX コールすべきか? |
content/docs/faq-ajax.md
Outdated
|
||
You should populate data with AJAX calls in the [`componentDidMount`](/docs/react-component.html#mounting) lifecycle method. This is so you can use `setState` to update your component when the data is retrieved. | ||
AJAXコールによるデータ取得は[`componentDidMount`](/docs/react-component.html#mounting)で行うと良いでしょう。データ取得後に `setState` でコンポーネントを更新できるようにするためです。 |
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.
AJAXコールによるデータ取得は[`componentDidMount`](/docs/react-component.html#mounting)で行うと良いでしょう。データ取得後に `setState` でコンポーネントを更新できるようにするためです。 | |
AJAX コールによるデータ取得は [`componentDidMount`](/docs/react-component.html#mounting) のライフサイクルメソッドで行うべきです。データ取得後に `setState` でコンポーネントを更新できるようにするためです。 |
この should は React の思想的に比較的強い should だと思われるので強めにしました
content/docs/faq-ajax.md
Outdated
|
||
### Example: Using AJAX results to set local state | ||
### 例:AJAXの通信結果をローカルstateで利用する |
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.
### 例:AJAXの通信結果をローカルstateで利用する | |
### 例:ローカル state に AJAX の通信結果をセットする |
content/docs/faq-ajax.md
Outdated
|
||
The component below demonstrates how to make an AJAX call in `componentDidMount` to populate local component state. | ||
下記のコンポーネントは、 `componentDidMount` でAJAXコールして得られたデータをローカルコンポーネントのstateに流し込んでいます。 |
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.
下記のコンポーネントは、 `componentDidMount` でAJAXコールして得られたデータをローカルコンポーネントのstateに流し込んでいます。 | |
下記のコンポーネントは、`componentDidMount` で AJAX コールして得られたデータをローカルコンポーネントの state に流し込んでいます。 |
content/docs/faq-ajax.md
Outdated
|
||
The example API returns a JSON object like this: | ||
サンプルAPIが返すJSONオブジェクトはこのようになります: |
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.
サンプルAPIが返すJSONオブジェクトはこのようになります: | |
このサンプル API が返す JSON オブジェクトはこのようなものです: |
ありがとうございます! |
@smikitky レビューありがとうございます!諸々修正しましたのでご確認お願いいたします:pray: |
ありがとうございました! |
This PR is part of Issue #4.