-
Notifications
You must be signed in to change notification settings - Fork 113
Translation docs/static-query into Japanese #64
Conversation
uetchy
left a comment
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.
ありがとうございます👍
docs/docs/static-query.md
Outdated
| @@ -1,21 +1,21 @@ | |||
| --- | |||
| title: Querying Data in Components using StaticQuery | |||
| title: StaticQueryを使用したコンポーネントのデータクエリー | |||
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.
コンポーネントの中でデータを取得する話なので、データを取得のような訳のほうが適切かもしれません。
docs/docs/static-query.md
Outdated
| --- | ||
|
|
||
| Gatsby v2 introduces `StaticQuery`, a new API that allows components to retrieve data via a GraphQL query. | ||
| Gatsby v2 では、`StaticQuery` という GraphQL クエリーを介してコンポーネントがデータを取得できる新しい 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.
| Gatsby v2 では、`StaticQuery` という GraphQL クエリーを介してコンポーネントがデータを取得できる新しい API が導入されました。 | |
| Gatsby v2 では、`StaticQuery` という GraphQL クエリーを介して、コンポーネントがデータを取得できる新しい API が導入されました。 |
docs/docs/static-query.md
Outdated
| <EggheadEmbed | ||
| lessonLink="https://egghead.io/lessons/gatsby-load-data-using-graphql-queries-directly-in-a-gatsby-v2-component-with-staticquery" | ||
| lessonTitle="Load Data using GraphQL Queries Directly in a Gatsby v2 Component with StaticQuery" | ||
| lessonTitle="StaticQuery を備えた Gatsby v2 コンポーネントで GraphQL クエリを用いたダイレクトなデータのロード" |
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.
外部リンクに翻訳版が無い場合は「(英語版)」と注記をつけるに留めて原文を残しておきましょう。
docs/docs/static-query.md
Outdated
| ### useStaticQuery | ||
|
|
||
| There's also a React hooks version of StaticQuery: check out the documentation on [`useStaticQuery`](/docs/use-static-query/) | ||
| StaticQuery には React フック(hook)バージョンもあります。詳しくは、[`useStaticQuery`](/docs/use-static-query/) をご覧ください。 |
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.
| StaticQuery には React フック(hook)バージョンもあります。詳しくは、[`useStaticQuery`](/docs/use-static-query/) をご覧ください。 | |
| StaticQuery には React Hooks のバージョンもあります。詳しくは、[`useStaticQuery`](/docs/use-static-query/) をご覧ください。 |
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.
レビューありがとうございます。
React Hooksの表記については、「Hooks」、「フック」、「フック(hook)」など様々な表記がインターネット上にあったのですが、公式のReact Hooksの説明から引用した形でした。(とはいえ、タイトルはカタカナ、説明の最初にカッコ書きされているので今思えば微妙でしたが・・・)
フックの導入 – React
やはり、かっこよさやよみやすさの観点からも「React Hooks」かなと思うので、そちらで行きます。
ありがとうございます
docs/docs/static-query.md
Outdated
| ### 型チェック | ||
|
|
||
| With the above pattern, you lose the ability to typecheck with PropTypes. To regain typechecking while achieving the same result, you can change the component to: | ||
| 上記のパターンを使用すると、PropTypes で型チェックする機能が失われます。同じ結果を得ながら、型チェックを行うには、コンポーネントを次のように変更します。 |
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.
| 上記のパターンを使用すると、PropTypes で型チェックする機能が失われます。同じ結果を得ながら、型チェックを行うには、コンポーネントを次のように変更します。 | |
| 上記のパターンを使用すると、PropTypes で型チェックする機能が失われます。同じ結果を得ながら型チェックを行うには、コンポーネントを次のように変更します。 |
docs/docs/static-query.md
Outdated
| ## StaticQuery とページクエリーの違い | ||
|
|
||
| StaticQuery can do most of the things that page query can, including fragments. The main differences are: | ||
| StaticQuery は、フラグメントを含む、ページクエリーが行えることのほとんどを行えます。主な違いは次のとおりです。 |
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.
| StaticQuery は、フラグメントを含む、ページクエリーが行えることのほとんどを行えます。主な違いは次のとおりです。 | |
| StaticQuery は(フラグメントを含む)ページクエリーが行えることのほとんどを行えます。主な違いは次のとおりです。 |
docs/docs/static-query.md
Outdated
| - page queries can accept variables (via `pageContext`) but can only be added to _page_ components | ||
| - StaticQuery does not accept variables (hence the name "static"), but can be used in _any_ component, including pages | ||
| - StaticQuery does not work with raw React.createElement calls; please use JSX, e.g. `<StaticQuery />` | ||
| - ページクエリーは(`pageContext` を介して)変数を受け入れることができますが、追加できるのは*ページ*コンポーネントだけです。 |
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.
斜体は日本語だと分かりづらいので**を使って太字にしましょう。
|
@uetchy |
uetchy
left a comment
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.
貢献ありがとうございます🚀
hirotaka
left a comment
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.
ありがとうございます!訳文は読みやすく問題ないです。
一つだけコメントさせていただいたのでご対応よろしくお願いいたします。
hirotaka
left a comment
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.
LGTM 👍
docs/static-queryの翻訳です。レビューよろしくお願いします 🙇
原文ページ
Querying Data in Components using StaticQuery