Skip to content

Advanced Guides > Compotion API > Introduction の翻訳 #101

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

Merged

Conversation

saitolume
Copy link
Collaborator

@saitolume saitolume commented Oct 6, 2020

resolve #32

Description of Problem

https://v3.vuejs.org/guide/composition-api-introduction.html の翻訳を行ったのでレビューをお願いします。

Additional Information

作業に時間がかかったためご迷惑をおかけしてしまい、申し訳ありません。
いくつか悩んだ箇所があるので共有させていただきます。

  • a presumedly external API: 「おそらく外部 API」や「外部 API のようなもの」は違和感があったため「適当な外部 API」にしました。←「外部 API など」でも良かった気がしました。
  • the drill (L482): 「ドリル」は違和感があったため文脈に合わせて「ノウハウ」にしました。

@netlify
Copy link

netlify bot commented Oct 6, 2020

Deploy preview for vuejs-v3-ja-doc-preview ready!

Built with commit 1d3ecc4

https://deploy-preview-101--vuejs-v3-ja-doc-preview.netlify.app

Copy link
Member

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

レビュー 👀 コメント 💬 しました!
翻訳内容はほぼ大丈夫です。
細かい部分コメントしていますが、対応よろしくお願いします!


Such fragmentation is what makes it difficult to understand and maintain a complex component. The separation of options obscures the underlying logical concerns. In addition, when working on a single logical concern, we have to constantly "jump" around option blocks for the relevant code.
このような分離は、複雑なコンポーネントを理解ししてメンテナンスすることを難しくします。このオプションの分離は背景にある論理的な関心事をわかりづらくします。さらに、単一の論理的な関心事に取り組む場合、関連するコードのオプションブロックを何度も "ジャンプ" する必要があります。
Copy link
Member

Choose a reason for hiding this comment

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

typo の修正お願いします。 🙏

Suggested change
このような分離は、複雑なコンポーネントを理解ししてメンテナンスすることを難しくします。このオプションの分離は背景にある論理的な関心事をわかりづらくします。さらに、単一の論理的な関心事に取り組む場合、関連するコードのオプションブロックを何度も "ジャンプ" する必要があります。
このような分離は、複雑なコンポーネントを理解してメンテナンスすることを難しくします。このオプションの分離は背景にある論理的な関心事をわかりづらくします。さらに、単一の論理的な関心事に取り組む場合、関連するコードのオプションブロックを何度も "ジャンプ" する必要があります。


Let’s add `setup` to our component:
`setup` をコンポーネントに追加しましょう:
Copy link
Member

Choose a reason for hiding this comment

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

正しい訳ですが、文章の流れが自然になるように、以下でお願いします! 🙏

Suggested change
`setup` をコンポーネントに追加しましょう:
`setup` をコンポーネントに追加してみましょう:

@@ -87,27 +87,27 @@ export default {
setup(props) {
console.log(props) // { user: '' }

return {} // anything returned here will be available for the rest of the component
return {} // ここで返されるものは残りの要素で使用可能です
Copy link
Member

Choose a reason for hiding this comment

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

the rest of the component の訳ですが、"rest` はコンポーネントオプションのことを示しているので、以下のような訳でどうでしょうか。
こちらの方が分かりやすいかと思います。他にいい訳があれば、お願いします!

Suggested change
return {} // ここで返されるものは残りの要素で使用可能です
return {} // ここで返されるものはコンポーネントで他のオプションで使用可能です

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

「ここで返されるものはコンポーネント "の" 他のオプションで使用可能です」のほうが日本語として自然な気がしました!

Copy link
Member

Choose a reason for hiding this comment

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

そうですね。それでいきましょう!

}
// the "rest" of the component
// 残りの要素
Copy link
Member

Choose a reason for hiding this comment

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

少し原文自体がよくない感じなのですが、ここのコメントはコンポーネントの他のオプションのこと示しているので、以下の訳でどうでしょうか。

Suggested change
// 残りの要素
// 以降、コンポーネントの"他"のオプション


Let’s add it to our `setup` function:
それを `setup` 関数に追加しましょう:
Copy link
Member

Choose a reason for hiding this comment

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

前の文章の流れから、以下のように意訳気味ではどうでしょう。

Suggested change
それを `setup` 関数に追加しましょう:
では、`setup` 関数にそれを追加してみましょう:

Copy link
Member

@potato4d potato4d left a comment

Choose a reason for hiding this comment

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

Pull Request ありがとうございます!

いくつか nits をコメントしました 📝
主に読みやすさの観点です。


**Here’s a quick look at how it works.**
**その仕組をざっと見てみましょう。**
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
**その仕組をざっと見てみましょう**
**その仕組みをざっと見てみましょう**

[nits] こちらのほうがより一般的かもしれません。


Just like how we set up a watcher on the `user` property inside our component using the `watch` option, we can do the same using the `watch` function imported from Vue. It accepts 3 arguments:
コンポーネント内の `user` プロパティに `watch` オプションを使用してウォッチャを追加するのと同じように、Vue からインポートした `watch` 関数を使用することができます。それは 3 つの引数を受け付けます:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
コンポーネント内の `user` プロパティに `watch` オプションを使用してウォッチャを追加するのと同じように、Vue からインポートした `watch` 関数を使用することができます。それは 3 つの引数を受け付けます:
コンポーネント内の `user` プロパティに `watch` オプションを使用してウォッチャを追加するのと同じように、Vue からインポートした `watch` 関数を使用することができます。それは以下の 3 つの引数を受け付けます:

日本語訳の読みやすさの面で、 以下の をつけると良いかもしれません

@@ -388,7 +388,7 @@ setup (props) {
}
```

We could do the same for other **logical concerns** but you might be already asking the question – _Isn’t this just moving the code to the `setup` option and making it extremely big?_ Well, that’s true. That’s why before moving on with the other responsibilities, we will first extract the above code into a standalone **composition function**. Let's start with creating `useUserRepositories`:
他の**論理的な関心事**にも同じことができますが、既に疑問があるかもしれません。- _これはコードを `setup` オプションに移動させて肥大させるだけではありませんか?_ そのため他の責務に移る前に、まず上記のコードをスタンドアローンな**コンポジション関数**に抽出します。 `useUserRepositories` の作成から始めましょう:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
他の**論理的な関心事**にも同じことができますが、既に疑問があるかもしれません。- _これはコードを `setup` オプションに移動させて肥大させるだけではありませんか?_ そのため他の責務に移る前に、まず上記のコードをスタンドアローンな**コンポジション関数**に抽出します。 `useUserRepositories` の作成から始めましょう:
他の**論理的な関心事**にも同じことができますが、既に疑問があるかもしれません。- _これはコードを `setup` オプションに移動させて肥大させるだけではありませんか?_ そのため他の責務に移る前に、まず上記のコードをスタンドアロンな**コンポジション関数**に抽出します。 `useUserRepositories` の作成から始めましょう:

すみません!ここだけ スタンドアロン でお願いします。
このページ内で スタンドアローンスタンドアロン が両方あったのですが、基本的な長音の取り扱いと、 v2 ドキュメントの歴史的に スタンドアロン で統一したいと思います。

vuejs/jp.vuejs.org@5c56077

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ミスでした…!指摘ありがとうございます 🙏

@saitolume
Copy link
Collaborator Author

@kazupon @potato4d 修正完了しました!レビューありがとうございます。

@saitolume saitolume requested review from kazupon and potato4d October 7, 2020 03:52
@kazupon
Copy link
Member

kazupon commented Oct 8, 2020

対応ありがとうございました!
マージしますね!

翻訳ありがとうございました!

@kazupon kazupon merged commit 01ee39a into vuejs-jp:lang-ja Oct 8, 2020
@saitolume saitolume deleted the translate-composition-api-introduction branch October 8, 2020 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Advanced Guides > Compotion API > Introduction の翻訳
3 participants