-
Notifications
You must be signed in to change notification settings - Fork 229
[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
Conversation
@re-fort |
src/v2/guide/components-props.md
Outdated
|
||
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. |
There was a problem hiding this comment.
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.
となっていて少し不思議です。ご意見いただけますか?
There was a problem hiding this comment.
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 の初期値として定義することを推奨します: |
There was a problem hiding this comment.
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 表記に寄せるべきかと考えていたりするのですが、いかがでしょうか?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@potato4d 確認おそくなってすみません!
そうですねー、それは少し思ってました
property, propertiesはプロパティとして、propsはそのままにするのも良いかと思います!
There was a problem hiding this comment.
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 を後ほどで打ってみますね〜
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
レビュー 👀 コメント 💬 しました。
内容確認お願いします。
src/v2/guide/components-props.md
Outdated
|
||
```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 --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
コメントも翻訳お願いします! 🙏
src/v2/guide/components-props.md
Outdated
@@ -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 つの例では、文字列の値を渡していますが、プロパティには任意の型の値を渡すことが可能です。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_any_
のitalicが、翻訳の方にないようです。
src/v2/guide/components-props.md
Outdated
|
||
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. |
There was a problem hiding this comment.
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
の関係代名詞な気がします。以下な感じでどうでしょうか?
これによって、アプリのデータフローを理解しづらい可能性のある子コンポーネントによる誤った親の状態変更から、防ぎます。
ea89e47
to
8b9e409
Compare
@kazupon 対応いたしましたので再度ご確認お願いいたします! |
* 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
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