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

Translation of docs/testing-components-with-graphql #202

Merged

Conversation

bebetaro
Copy link
Contributor

概要

I translated docs/testing-components-with-graphql!
Original Page here: https://www.gatsbyjs.org/docs/testing-components-with-graphql/

I really appreciate to your reviews! 🙇
I tried my best to translate, but if there are some mistakes in my translation, I will fix it asap!
Thanks!

チェックリスト

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

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

補足

Ref: #1

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

@imbsky @uetchy レビューありがとうございます!ご指摘いただいた点について修正しました!

@@ -1,34 +1,18 @@
---
title: Testing Components with GraphQL
title: GraphQLを用いたコンポーネントのテスト
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
title: GraphQLを用いたコンポーネントのテスト
title: GraphQL を用いたコンポーネントのテスト

If you are using TypeScript this is a lot easier to get right as the type errors
will tell you exactly what you should be passing to the components. This is why
it is a good idea to define type interfaces for all of your GraphQL queries.
もしあなたが Typescript を使用しているのならば、タイプエラーはあなたがコンポーネントに渡すべきなものについて正確に教えてくれるため、ずっと簡単にテストを行いやすくなります。これが、あなたの全ての GraphQL クエリーに対して、型のインターフェイスを定義することが良いアイデアとなる理由です。
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
もしあなたが Typescript を使用しているのならば、タイプエラーはあなたがコンポーネントに渡すべきなものについて正確に教えてくれるため、ずっと簡単にテストを行いやすくなります。これが、あなたの全ての GraphQL クエリーに対して、型のインターフェイスを定義することが良いアイデアとなる理由です。
もしあなたが TypeScript を使用しているのならば、タイプエラーはあなたがコンポーネントに渡すべきなものについて正確に教えてくれるため、ずっと簡単にテストを行いやすくなります。これが、あなたの全ての GraphQL クエリーに対して、型のインターフェイスを定義することが良いアイデアとなる理由です。

@@ -322,8 +270,6 @@ describe("Header", () => {
})
```

## Using TypeScript
## Typescript を使った場合
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
## Typescript を使った場合
## TypeScript を使った場合

@smorimoto
Copy link
Contributor

I have added suggestions for fixing some minor typos.

@smorimoto
Copy link
Contributor

By the way, when committing a suggestion, you should commit using "Commit suggestion" or "Add suggestion to batch". Because the change belongs to the person who suggested it and should be clarified as the co-author of the commit. See the link below for more details. It's probably a hassle to get the exact email address of the person who suggested it, and GitHub has a feature that makes it easy, so you should use it.
https://help.github.com/en/github/committing-changes-to-your-project/creating-a-commit-with-multiple-authors

bebetaro and others added 2 commits February 24, 2020 22:02
fix: add space
Co-Authored-By: imbsky <git@bsky.moe>
Co-Authored-By: imbsky <git@bsky.moe>
@bebetaro
Copy link
Contributor Author

@imbsky
I fixed additional suggestion!
And thank you for telling me about commit with co-author. I tried it this time! 😄

@@ -87,8 +65,8 @@ query IndexQuery {
}
```

The output panel should now give you a nice JSON object with the query result.
Here it is, trimmed to one node for brevity:
出力結果は、クエリーの結果と共に、JSON オブジェクトをあなたに与えてくれます。
Copy link
Contributor

Choose a reason for hiding this comment

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

改行を原文と合わせたいです。(Diffは二行になっていますが、Webサイトの方の最新と見比べています。)
68行目と69行目を同じ行にするようお願いします:bow:

Co-Authored-By: Jesse Katsumata <niconico.clarinet@gmail.com>
@bebetaro
Copy link
Contributor Author

@Naturalclar
ありがとうございます!68行目と69行目を同じ行にしました!
同様に152行目と153行目もWEBサイトを確認したところ、同一の行だったようなので、同じ行にしました!

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 author response A pull request that is awaiting author's response status: awaiting review A pull request that is currently awaiting a reviewer's response labels Feb 25, 2020
@smorimoto smorimoto merged commit 7ab9774 into gatsbyjs:master Feb 25, 2020
@smorimoto
Copy link
Contributor

Thanks @bebetaro for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

4 participants