Skip to content

Essentials > Computed Properties and Watchers の翻訳 #72

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
merged 2 commits into from
Sep 22, 2020

Conversation

jay-es
Copy link
Member

@jay-es jay-es commented Sep 21, 2020

resolve #49

v2 のドキュメントと内容はほぼ同じでしたが、「一語一句翻訳」のガイドラインに沿って翻訳しなおしました。
以下の用語(や見出し)は v2 の訳を踏襲してあります。

getter → getter 関数
setter → setter 関数
watcher/watchers → ウォッチャ
watched property → 監視プロパティ
Computed Caching vs Methods → 算出プロパティ vs メソッド

ご確認よろしくお願いします。

@netlify
Copy link

netlify bot commented Sep 21, 2020

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

Built with commit 6da7e9a

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

@@ -254,4 +254,4 @@ const vm = Vue.createApp({
}).mount('#demo')
```

Much better, isn't it?
ずっといいですよね?
Copy link
Member Author

Choose a reason for hiding this comment

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

原文に合わせ、なるべく短く、かつ少しだけくだけた感じを目指しました。
これを再翻訳すると原文と同じになります。
https://www.deepl.com/ja/translator#ja/en/%E3%81%9A%E3%81%A3%E3%81%A8%E3%81%84%E3%81%84%E3%81%A7%E3%81%99%E3%82%88%E3%81%AD%EF%BC%9F

別のニュアンスの代案として「ぐっとよくなりましたね?」があります
https://www.deepl.com/ja/translator#ja/en/%E3%81%90%E3%81%A3%E3%81%A8%E3%82%88%E3%81%8F%E3%81%AA%E3%82%8A%E3%81%BE%E3%81%97%E3%81%9F%E3%81%AD%EF%BC%9F

Copy link
Member

Choose a reason for hiding this comment

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

そうですね。
ここの Much better, isn't it? は、この文章の流れ的に、砕けた感じでも大丈夫そうです。
ずっといいですよね?で、いいと思います。

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.

レビュー 👀 コメント 💬 しました。
いくつか対応お願いします。


That's why for complex logic that includes reactive data, you should use a **computed property**.
そのため、リアクティブなデータを含む複雑なロジックには**算出プロパティ**を使いましょう。
Copy link
Member

Choose a reason for hiding this comment

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

you should use a **computed property**. の訳ですが、文章の流れから、ここでの should は義務、当然の行為を表す 〜すべき で訳すのが自然だと思います。
なので、以下でお願いします。

Suggested change
そのため、リアクティブなデータを含む複雑なロジックには**算出プロパティ**を使いましょう
そのため、リアクティブなデータを含む複雑なロジックには**算出プロパティ**を使うべきです


You can data-bind to computed properties in templates just like a normal property. Vue is aware that `vm.publishedBooksMessage` depends on `vm.author.books`, so it will update any bindings that depend on `vm.publishedBooksMessage` when `vm.author.books` changes. And the best part is that we've created this dependency relationship declaratively: the computed getter function has no side effects, which makes it easier to test and understand.
通常のプロパティと同じように、テンプレート内で算出プロパティにデータバインドできます。Vue `vm.publishedBooksMessage` `vm.author.books` に依存していると分かっているので、`vm.author.books` が変更されると `vm.publishedBooksMessage` に依存するバインディングを更新します。また、この依存関係を宣言的に作成しているのが最高です: 算出 getter 関数には副作用がないので、テストや理解するのが容易になります。
Copy link
Member

Choose a reason for hiding this comment

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

And the best part is that we've created this dependency relationship declaratively の訳ですが、また、この依存関係を宣言的に作成しているのが最高です では、ちょっと言い回しが砕けすぎなので、以下のような感じでお願いします。

そして、一番よいのは、この依存関係を宣言的に作成していることです。


This also means the following computed property will never update, because `Date.now()` is not a reactive dependency:
下の算出プロパティは `Date.now()` がリアクティブな依存関係ではないので、一度も更新されないことになります:
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
下の算出プロパティは `Date.now()` がリアクティブな依存関係ではないので、一度も更新されないことになります:
以下の算出プロパティは `Date.now()` がリアクティブな依存関係ではないので、一度も更新されないことになります:

@@ -254,4 +254,4 @@ const vm = Vue.createApp({
}).mount('#demo')
```

Much better, isn't it?
ずっといいですよね?
Copy link
Member

Choose a reason for hiding this comment

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

そうですね。
ここの Much better, isn't it? は、この文章の流れ的に、砕けた感じでも大丈夫そうです。
ずっといいですよね?で、いいと思います。

@jay-es
Copy link
Member Author

jay-es commented Sep 22, 2020

修正完了しましたので、ご確認よろしくお願いします。

@jay-es jay-es requested a review from kazupon September 22, 2020 01:48
@kazupon
Copy link
Member

kazupon commented Sep 22, 2020

@jay-es
確認しました!
ありがとうございます!
LGTM 👍 です!

CI でエラーが起きていますが、特に支障がないのでマージします。

@kazupon kazupon merged commit 8c2e759 into vuejs-jp:lang-ja Sep 22, 2020
@kazupon
Copy link
Member

kazupon commented Sep 22, 2020

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

@jay-es jay-es deleted the essentials-computed branch December 4, 2020 03:57
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.

Essentials > Computed Properties and Watchers の翻訳
2 participants