Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Conversation

@satomixx
Copy link
Contributor

概要

docs/recipes/sourcing-data を翻訳しました。
レビューよろしくお願いいたします!

チェックリスト

  • 翻訳スタイルガイド に目を通しました。
  • Translation Guide に目を通しました。
  • textlint を使って校正を行いました。
  • 文章全体を最初から読み直して不自然な箇所が無いことを確認しました。
  • Allow edits from maintainers にチェックを入れました。

しばらく待ってもレビューが終わらなかったり、必要なレビュー数に足りない状態が続いた場合は、こちらからメンテナーを探して、@を付けてメンションを飛ばしてください。

補足

Ref: #1

@uetchy uetchy added the status: awaiting review A pull request that is currently awaiting a reviewer's response label Jan 29, 2020
Copy link
Contributor

@uetchy uetchy left a comment

Choose a reason for hiding this comment

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

👍

@Naturalclar @imbsky @hirotaka 見逃しがあるかもしれないので細かいチェックをお願いします

@hirotaka hirotaka added status: awaiting author response A pull request that is awaiting author's response and removed status: awaiting review A pull request that is currently awaiting a reviewer's response labels Feb 4, 2020
@satomixx
Copy link
Contributor Author

@uetchy @Naturalclar @imbsky @hirotaka
頂いたレビューを反映しました!
再度レビューお願いいたします!

@uetchy uetchy added status: awaiting review A pull request that is currently awaiting a reviewer's response and removed status: awaiting author response A pull request that is awaiting author's response labels Feb 10, 2020
Gatsby[GraphQL data layer](/docs/querying-with-graphql/) はデータの塊をモデル化するノードを必要とします。Gatsby データ取得プラグインはクエリ対象のソースノードを追加します。しかし、ソースノードはご自身で作成することも可能です。Gatsby では、GraphQL のデータレイヤーにカスタムデータを追加する為のメソッドが提供されています。

This recipe shows you how to add custom data using `createNode()`.
このレシピでは、 `createNode()` を用いてカスタムデータを追加する方法を紹介します。
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
このレシピでは、 `createNode()` を用いてカスタムデータを追加する方法を紹介します。
このレシピでは、`createNode()` を用いてカスタムデータを追加する方法を紹介します。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

↓こちらで対応しました 🙇
994ff64

2. `gatsby develop` を実行します。

> _Note: After making changes in `gatsby-node.js` you need to re-run `gatsby develop` for the changes to take effect._
> ヒント:`gatsby-node.js` に変更を加えたら、変更を反映させるために、 `gatsby develop` を再度実行する必要があります。
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
> ヒント:`gatsby-node.js` に変更を加えたら、変更を反映させるために、 `gatsby develop` を再度実行する必要があります。
> ヒント:`gatsby-node.js` に変更を加えたら、変更を反映させるために、`gatsby develop` を再度実行する必要があります。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

↓こちらで対応しました 🙇
994ff64

- Search available source plugins in the [Gatsby library](/plugins/?=source)
- Understand source plugins by building one in the [Pixabay source plugin tutorial](/docs/pixabay-source-plugin-tutorial/)
- The createNode function [documentation](/docs/actions/#createNode)
- [チュートリアル パート 5](/tutorial/part-five/#source-plugins) にて、 `gatsby-source-filesystem` を用いた例の概略
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- [チュートリアル パート 5](/tutorial/part-five/#source-plugins) にて、 `gatsby-source-filesystem` を用いた例の概略
- [チュートリアル パート 5](/tutorial/part-five/#source-plugins) にて、`gatsby-source-filesystem` を用いた例の概略

Copy link
Contributor Author

Choose a reason for hiding this comment

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

↓こちらで対応しました 🙇
994ff64

### 手順

1. Install the `gatsby-source-wordpress` plugin by running the following command:
1. 次のコマンドを実行して、 `gatsby-source-wordpress` プラグインをインストール
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. 次のコマンドを実行して、 `gatsby-source-wordpress` プラグインをインストール
1. 次のコマンドを実行して、`gatsby-source-wordpress` プラグインをインストール

Copy link
Contributor Author

Choose a reason for hiding this comment

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

↓こちらで対応しました 🙇
994ff64

```

2. Configure the plugin by modifying the `gatsby-config.js` file such that it includes the following:
2. プラグインの設定の為に、 `gatsby-config.js` に次にコードを追記
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
2. プラグインの設定の為に、 `gatsby-config.js` に次にコードを追記
2. プラグインの設定の為に、`gatsby-config.js` に次にコードを追記

Copy link
Contributor Author

Choose a reason for hiding this comment

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

↓こちらで対応しました 🙇
994ff64

```

4. Create dynamic pages for your WordPress posts by pasting the following sample code in `gatsby-node.js`:
4. `gatsby-node.js` に次のサンプルコードを貼り付けて、 WordPress の投稿の為のページを動的に作成します:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
4. `gatsby-node.js` に次のサンプルコードを貼り付けて、 WordPress の投稿の為のページを動的に作成します:
4. `gatsby-node.js` に次のサンプルコードを貼り付けて、WordPress の投稿の為のページを動的に作成します:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

↓こちらで対応しました 🙇
994ff64

5. `gatsby-develop` を実行して、新しく生成されたページを閲覧しにいきます

6. Open the `GraphiQL IDE` at `localhost:8000/__graphql` and open the Docs or Explorer to observe the queryable fields for `allWordpressPosts`.
6. `localhost:8000/__graphql` `GraphiQL IDE` を表示して、 Docs `allWordpressPosts` に対するクエリーフィールドの監視をするエクスプローラーを開きます。
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
6. `localhost:8000/__graphql``GraphiQL IDE` を表示して、 Docs や `allWordpressPosts` に対するクエリーフィールドの監視をするエクスプローラーを開きます。
6. `localhost:8000/__graphql``GraphiQL IDE` を表示して、Docs や `allWordpressPosts` に対するクエリーフィールドの監視をするエクスプローラーを開きます。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

↓こちらで対応しました 🙇
994ff64

### 手順

1. Log in to Contentful with the CLI and follow the steps. It will help you create an account if you don't have one.
1. まず、 Contentful CLI を使って Contentful にログインしてください。アカウントを持っていない場合にアカウントを作成するのに役立ちます。
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. まず、 Contentful CLI を使って Contentful にログインしてください。アカウントを持っていない場合にアカウントを作成するのに役立ちます。
1. まず、Contentful CLI を使って Contentful にログインしてください。アカウントを持っていない場合にアカウントを作成するのに役立ちます。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

↓こちらで対応しました 🙇
994ff64

```

For example, with a space ID in place: `contentful space seed -s '22fzx88spbp7' -t blog`
例えば、 Space ID は右のように配置します: `contentful space seed -s '22fzx88spbp7' -t blog`
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
例えば、 Space ID は右のように配置します: `contentful space seed -s '22fzx88spbp7' -t blog`
例えば、Space ID は右のように配置します: `contentful space seed -s '22fzx88spbp7' -t blog`

Copy link
Contributor Author

Choose a reason for hiding this comment

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

↓こちらで対応しました 🙇
994ff64

## 外部ソースからデータを読み込み、GraphQL を使わずページを作成する

You don't have to use the GraphQL data layer to include data in pages, [though there are reasons why you should consider GraphQL](/docs/why-gatsby-uses-graphql/). You can use the node `createPages` API to pull unstructured data directly into Gatsby sites rather than through GraphQL and source plugins.
[GraphQL の利用を検討すべき理由はいくつかありますが](/docs/why-gatsby-uses-graphql/)、ページ内にデータを内包させる為に、必ずしも GraphQL データレイヤーを用いる必要はありません。GraphQL とソース プラグインを経由せず、 `createPages` API を利用して、まだ構築されていないデータを直接 Gatsby サイトに読み込むことができます。
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
[GraphQL の利用を検討すべき理由はいくつかありますが](/docs/why-gatsby-uses-graphql/)、ページ内にデータを内包させる為に、必ずしも GraphQL データレイヤーを用いる必要はありません。GraphQL とソース プラグインを経由せず、 `createPages` API を利用して、まだ構築されていないデータを直接 Gatsby サイトに読み込むことができます。
[GraphQL の利用を検討すべき理由はいくつかありますが](/docs/why-gatsby-uses-graphql/)、ページ内にデータを内包させる為に、必ずしも GraphQL データレイヤーを用いる必要はありません。GraphQL とソース プラグインを経由せず、`createPages` API を利用して、まだ構築されていないデータを直接 Gatsby サイトに読み込むことができます。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

↓こちらで対応しました 🙇
994ff64

@smorimoto smorimoto added status: awaiting author response A pull request that is awaiting author's response and removed status: awaiting review A pull request that is currently awaiting a reviewer's response labels Feb 12, 2020
Copy link
Contributor

@Naturalclar Naturalclar left a comment

Choose a reason for hiding this comment

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

@satomixx
読みやすい訳だと思います!
原文が少し更新されているので、Suggestされている部分とConflictの解消をお願いできますでしょうか。

@satomixx satomixx force-pushed the docs/recipes/sourcing-data branch from b5b215e to 994ff64 Compare February 17, 2020 07:52
@satomixx
Copy link
Contributor Author

@Naturalclar conflictの解消と修正を行いました。
再度宜しくお願いいたします!

cc: @uetchy @imbsky @hirotaka

@smorimoto smorimoto added status: awaiting review A pull request that is currently awaiting a reviewer's response and removed status: awaiting author response A pull request that is awaiting author's response labels Feb 17, 2020
Copy link
Contributor

@Naturalclar Naturalclar left a comment

Choose a reason for hiding this comment

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

ありがとうございます! 👍

@Naturalclar Naturalclar added status: awaiting more approval A pull request that is awaiting reviewer #2 to be assigned and removed status: awaiting review A pull request that is currently awaiting a reviewer's response labels Feb 19, 2020
@smorimoto smorimoto merged commit a9fd3da into gatsbyjs:master Feb 19, 2020
@gatsbot
Copy link

gatsbot bot commented Feb 19, 2020

Holy buckets, @satomixx — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. We’ve got Gatsby t-shirts, stickers, hats, scrunchies, and much more. (You can also unlock even more free swag with 5 contributions — wink wink nudge nudge.) See gatsby.dev/swag for details.
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

status: awaiting more approval A pull request that is awaiting reviewer #2 to be assigned

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants