8000 [Components In-Depth]: Propsの翻訳 by potato4d · Pull Request #1107 · vuejs/jp.vuejs.org · GitHub
[go: up one dir, main page]

Skip to content

[Components In-Depth]: Propsの翻訳 #1107

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 8 commits into from
Jul 18, 2018

Conversation

potato4d
Copy link
Collaborator

resolve #919

About

Components In-Depth の Props のページについて翻訳を行いました。

Refs

原文

https://vuejs.org/v2/guide/components-props.html

翻訳対象

https://github.com/vuejs/jp.vuejs.org/blob/lang-ja/src/v2/guide/components-props.md

@potato4d
Copy link
Collaborator Author

@re-fort
大変遅くなってしまいすみません 🙇
翻訳について一旦完了しましたので、レビューお願いできますでしょうか!

< 8000 div data-view-component="true" class="TimelineItem-body"> @potato4d potato4d requested a review from re-fort July 15, 2018 04:29

All props form a **one-way-down binding** between the child property and the parent one: when the parent property updates, it will flow down to the child, but not the other way around. This prevents child components from accidentally mutating the parent's state, which can make your app's data flow harder to understand.
> This prevents child components from accidentally mutating the parent's state, which can make your app's data flow harder to understand.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@re-fort
ここだけ翻訳がうまく思いつきませんでした。
文脈としては、 props を利用することでデータの流れが単一となり、フローが追いやすくなるはずなのですが、原文が This prevents child components from accidentally mutating the parent's state, which can make your app's data flow **harder** to understand. となっていて少し不思議です。ご意見いただけますか?

Copy link
Member

Choose a reason for hiding this comment

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

which can make your app's data flow **harder** to understand.which は、child components from accidentally mutating the parent's state の関係代名詞な気がします。以下な感じでどうでしょうか?
これによって、アプリのデータフローを理解しづらい可能性のある子コンポーネントによる誤った親の状態変更から、防ぎます。


1. **The prop is used to pass in an initial value; the child component wants to use it as a local data property afterwards.** In this case, it's best to define a local data property that uses the prop as its initial value:
1. **プロパティを初期値として受け渡し、子コンポーネントにてローカルのデータとして後で利用したいと考える場合** この場合、プロパティの値をローカルの data の初期値として定義することを推奨します:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@re-fort
また、 props が "プロパティ"、 data が "データプロパティ"、 computed が "算出プロパティ" となってきており、props をプロパティと翻訳すると文章の読みづらさに影響してくるため、そろそろ props 表記に寄せるべきかと考えていたりするのですが、いかがでしょうか?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@potato4d 確認おそくなってすみません!
そうですねー、それは少し思ってました
property, propertiesはプロパティとして、propsはそのままにするのも良いかと思います!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@re-fort ではちょっと混在しそうなところにおいての props は props としましょう!
試しにこのドキュメントについて更新 PR を後ほどで打ってみますね〜

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.

レビュー 👀 コメント 💬 しました。
内容確認お願いします。


```html
<blog-post title="My journey with Vue"></blog-post>
```

You've also seen props assigned dynamically with `v-bind`, such as in:
次のような `v-bind` で動的に割り当てられたプロパティも見てきました:

```html
<!-- Dynamically assign the value of a variable -->
Copy link
Member

Choose a reason for hiding this comment

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

コメントも翻訳お願いします! 🙏

@@ -67,58 +65,58 @@ You've also seen props assigned dynamically with `v-bind`, such as in:
<blog-post v-bind:title="post.title + ' by ' + post.author.name"></blog-post>
```

In the two examples above, we happen to pass string values, but _any_ type of value can actually be passed to a prop.
上の 2 つの例では、文字列の値を渡していますが、プロパティには任意の型の値を渡すことが可能です。
Copy link
Member

Choose a reason for hiding this comment

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

_any_ のitalicが、翻訳の方にないようです。


All props form a **one-way-down binding** between the child property and the parent one: when the parent property updates, it will flow down to the child, but not the other way around. This prevents child components from accidentally mutating the parent's state, which can make your app's data flow harder to understand.
> This prevents child components from accidentally mutating the parent's state, which can make your app's data flow harder to understand.
Copy link
Member

Choose a reason for hiding this comment

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

which can make your app's data flow **harder** to understand.which は、child components from accidentally mutating the parent's state の関係代名詞な気がします。以下な感じでどうでしょうか?
これによって、アプリのデータフローを理解しづらい可能性のある子コンポーネントによる誤った親の状態変更から、防ぎます。

@potato4d potato4d force-pushed the feature/props-translate branch from ea89e47 to 8b9e409 Compare July 18, 2018 06:33
@potato4d
Copy link
Collaborator Author

@kazupon
レビューありがとうございます 🙇
which can make your app's data ~…… の部分、確かにそういうことなきがします。助かりました 🙏

対応いたしましたので再度ご確認お願いいたします!

@potato4d
Copy link
Collaborator Author

@kazupon
良さそうなのでこれはマージしちゃいますね。

@re-fort
Props を "プロパティ" として訳し続けるかどうかはちょっと議論の余地があると思うので、よければどこかのタイミングでご回答いただけると!

@potato4d potato4d merged commit 532ff6f into vuejs:lang-ja Jul 18, 2018
@potato4d potato4d deleted the feature/props-translate branch July 18, 2018 06:55
kaorun343 pushed a commit to kaorun343/jp.vuejs.org that referenced this pull request Sep 26, 2018
* fix: adjust padding for content section (vuejs#1107)

* Change links on deployment guide (vuejs#1104)

* fix extract css related link

* change to secureable schema

# Conflicts:
#	src/v2/guide/deployment.md

* Tiny update to components.md (vuejs#1105)

As someone new to Vuejs, it took me a few extra seconds to grok the expanded code block for when `v-model` is used with a component. My mind was somehow trying to relate the 3rd block of code with the 2nd block, instead of the 1st.

(https://vuejs.org/v2/guide/components.html#Form-Input-Components-using-Custom-Events).

I suggest re-wording it to make it a bit more obvious.
# Conflicts:
#	src/v2/guide/components.md

* fix blog layout (vuejs#1112)

# Conflicts:
#	themes/vue/layout/post.ejs

* Update class-and-style.md (vuejs#1113)

Remove extra comma in the Object Syntax example for computed properties

* Update date

* Update doc link to Japanese version
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.

[Components In-Depth]: Propsの翻訳
3 participants
0