From 8d85842645550b7f48ba7c3de3c3ca8e60a4bf0e Mon Sep 17 00:00:00 2001 From: isy Date: Thu, 16 Jan 2020 19:48:03 +0900 Subject: [PATCH 1/5] Translate docs/recipes/transforming-data --- docs/docs/recipes/transforming-data.md | 34 +++++++++++++------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/docs/recipes/transforming-data.md b/docs/docs/recipes/transforming-data.md index e3242e78a..48110745e 100644 --- a/docs/docs/recipes/transforming-data.md +++ b/docs/docs/recipes/transforming-data.md @@ -1,32 +1,32 @@ --- -title: "Recipes: Transforming Data" +title: "レシピ集: データの変換" --- -Transforming data in Gatsby is plugin-driven. Transformer plugins take data fetched using source plugins, and process it into something more usable (e.g. JSON into JavaScript objects, and more). +Gatsby でのデータ変換はプラグインによって実現されています。Transformer プラグインは source プラグインを通じてデータを取得し、実際に使う形式へ変換します(例:JSON を JavaScript オブジェクトにする等)。 -## Transforming Markdown into HTML +## Markdown を HTML に変換する -The `gatsby-transformer-remark` plugin can transform Markdown files to HTML. +`gatsby-transformer-remark`プラグインは、Markdown ファイルを HTML に変換できます。 -### Prerequisites +### 前提条件 -- A Gatsby site with `gatsby-config.js` and an `index.js` page -- A Markdown file saved in your Gatsby site `src` directory -- A source plugin installed, such as `gatsby-source-filesystem` -- The `gatsby-transformer-remark` plugin installed +- `gatsby-config.js`と`index.js`ページがあること。 +- `src`ディレクトリーに Markdown ファイルが保存されている。 +- `gatsby-source-filesystem`のようなソースプラグインがインストールされている。 +- `gatsby-transformer-remark`プラグインがインストールされている。 -### Directions +### 進め方 -1. Add the transformer plugin in your `gatsby-config.js`: +1. Transformer プラグインを`gatsby-config.js`に追加します。 ```js:title=gatsby-config.js plugins: [ - // not shown: gatsby-source-filesystem for creating nodes to transform + // 省略: gatsby-source-filesystem 変換するノードを作成するため `gatsby-transformer-remark` ], ``` -2. Add a GraphQL query to the `index.js` file of your Gatsby site to fetch `MarkdownRemark` nodes: +2. MarkdownRemark ノードを取得するため、`index.js`に GraphQL クエリーを追加します。 ```jsx:title=src/pages/index.js export const query = graphql` @@ -48,9 +48,9 @@ export const query = graphql` ` ``` -3. Restart the development server and open GraphiQL at `http://localhost:8000/___graphql`. Explore the fields available on the `MarkdownRemark` node. +3. 開発用サーバーを再起動して、`http://localhost:8000/___graphql`で GraphiQL を開きます。`MarkdownRemark`ノードで使用できるフィールドを探します。 -### Additional resources +### 追加の資料 -- [Tutorial on transforming Markdown to HTML](/tutorial/part-six/#transformer-plugins) using `gatsby-transformer-remark` -- Browse available transformer plugins in the [Gatsby plugin library](/plugins/?=transformer) +- `gatsby-transformer-remark`を使用して、[Markdown を HTML に変換するチュートリアル](/tutorial/part-six/#transformer-plugins) +- [Gatsby プラグインライブラリ](/plugins/?=transformer)で利用できる Transformer プラグインを探す From 7ba41a6827a7f84ca2c27e92e5f5346bad629e52 Mon Sep 17 00:00:00 2001 From: isy Date: Thu, 16 Jan 2020 19:52:36 +0900 Subject: [PATCH 2/5] Chore --- docs/docs/recipes/transforming-data.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/recipes/transforming-data.md b/docs/docs/recipes/transforming-data.md index 48110745e..3be481a63 100644 --- a/docs/docs/recipes/transforming-data.md +++ b/docs/docs/recipes/transforming-data.md @@ -52,5 +52,5 @@ export const query = graphql` ### 追加の資料 -- `gatsby-transformer-remark`を使用して、[Markdown を HTML に変換するチュートリアル](/tutorial/part-six/#transformer-plugins) -- [Gatsby プラグインライブラリ](/plugins/?=transformer)で利用できる Transformer プラグインを探す +- `gatsby-transformer-remark`を使用して、[Markdown を HTML に変換するチュートリアル](/tutorial/part-six/#transformer-plugins)。 +- [Gatsby プラグインライブラリ](/plugins/?=transformer)で利用できる Transformer プラグインを探す。 From 803dcce271f361e9e088b8aa0d347cd295f15a0b Mon Sep 17 00:00:00 2001 From: Hironori Akaishi Date: Fri, 17 Jan 2020 00:41:03 +0900 Subject: [PATCH 3/5] fix context --- docs/docs/recipes/transforming-data.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/docs/recipes/transforming-data.md b/docs/docs/recipes/transforming-data.md index 3be481a63..1a8157391 100644 --- a/docs/docs/recipes/transforming-data.md +++ b/docs/docs/recipes/transforming-data.md @@ -10,7 +10,7 @@ Gatsby でのデータ変換はプラグインによって実現されていま ### 前提条件 -- `gatsby-config.js`と`index.js`ページがあること。 +- `gatsby-config.js`と`index.js`ページがある。 - `src`ディレクトリーに Markdown ファイルが保存されている。 - `gatsby-source-filesystem`のようなソースプラグインがインストールされている。 - `gatsby-transformer-remark`プラグインがインストールされている。 @@ -21,12 +21,12 @@ Gatsby でのデータ変換はプラグインによって実現されていま ```js:title=gatsby-config.js plugins: [ - // 省略: gatsby-source-filesystem 変換するノードを作成するため + // gatsby-source-filesystem を省略: 変換するノードを作成するため `gatsby-transformer-remark` ], ``` -2. MarkdownRemark ノードを取得するため、`index.js`に GraphQL クエリーを追加します。 +2. `MarkdownRemark` ノードを取得するため、`index.js`に GraphQL クエリーを追加します。 ```jsx:title=src/pages/index.js export const query = graphql` From 54b17805f6df749b25bd87cf14c81bf97871efaf Mon Sep 17 00:00:00 2001 From: isy Date: Fri, 17 Jan 2020 18:22:31 +0900 Subject: [PATCH 4/5] fix context Co-Authored-By: Hirotaka Mizutani --- docs/docs/recipes/transforming-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/recipes/transforming-data.md b/docs/docs/recipes/transforming-data.md index 1a8157391..5a77c1b47 100644 --- a/docs/docs/recipes/transforming-data.md +++ b/docs/docs/recipes/transforming-data.md @@ -12,7 +12,7 @@ Gatsby でのデータ変換はプラグインによって実現されていま - `gatsby-config.js`と`index.js`ページがある。 - `src`ディレクトリーに Markdown ファイルが保存されている。 -- `gatsby-source-filesystem`のようなソースプラグインがインストールされている。 +- `gatsby-source-filesystem` のようなソースプラグインがインストールされている。 - `gatsby-transformer-remark`プラグインがインストールされている。 ### 進め方 From 8b9b3d938a39abd8ed042f44fc7ae9e91c8bdc88 Mon Sep 17 00:00:00 2001 From: isy Date: Fri, 17 Jan 2020 18:26:33 +0900 Subject: [PATCH 5/5] fix context --- docs/docs/recipes/transforming-data.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs/recipes/transforming-data.md b/docs/docs/recipes/transforming-data.md index 5a77c1b47..283aab1b8 100644 --- a/docs/docs/recipes/transforming-data.md +++ b/docs/docs/recipes/transforming-data.md @@ -2,7 +2,7 @@ title: "レシピ集: データの変換" --- -Gatsby でのデータ変換はプラグインによって実現されています。Transformer プラグインは source プラグインを通じてデータを取得し、実際に使う形式へ変換します(例:JSON を JavaScript オブジェクトにする等)。 +Gatsby でのデータ変換はプラグインによって実現されています。トランスフォーマープラグインは source プラグインを通じてデータを取得し、実際に使う形式へ変換します(例:JSON を JavaScript オブジェクトにする等)。 ## Markdown を HTML に変換する @@ -17,7 +17,7 @@ Gatsby でのデータ変換はプラグインによって実現されていま ### 進め方 -1. Transformer プラグインを`gatsby-config.js`に追加します。 +1. トランスフォーマープラグインを`gatsby-config.js`に追加します。 ```js:title=gatsby-config.js plugins: [ @@ -26,7 +26,7 @@ plugins: [ ], ``` -2. `MarkdownRemark` ノードを取得するため、`index.js`に GraphQL クエリーを追加します。 +2. `MarkdownRemark` ノードを取得するため、`index.js` に GraphQL クエリーを追加します。 ```jsx:title=src/pages/index.js export const query = graphql` @@ -48,9 +48,9 @@ export const query = graphql` ` ``` -3. 開発用サーバーを再起動して、`http://localhost:8000/___graphql`で GraphiQL を開きます。`MarkdownRemark`ノードで使用できるフィールドを探します。 +3. 開発用サーバーを再起動して、`http://localhost:8000/___graphql` で GraphiQL を開きます。`MarkdownRemark` ノードで使用できるフィールドを探します。 ### 追加の資料 -- `gatsby-transformer-remark`を使用して、[Markdown を HTML に変換するチュートリアル](/tutorial/part-six/#transformer-plugins)。 -- [Gatsby プラグインライブラリ](/plugins/?=transformer)で利用できる Transformer プラグインを探す。 +- `gatsby-transformer-remark` を使用して、[Markdown を HTML に変換するチュートリアル](/tutorial/part-six/#transformer-plugins)。 +- [Gatsby プラグインライブラリ](/plugins/?=transformer)で利用できるトランスフォーマープラグインを探す。