-
Notifications
You must be signed in to change notification settings - Fork 87
docs #26 Reusability & Composition > Custom Directives の翻訳 #68
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
docs #26 Reusability & Composition > Custom Directives の翻訳 #68
Conversation
Deploy preview for vuejs-v3-ja-doc-preview ready! Built with commit ee56f74 https://deploy-preview-68--vuejs-v3-ja-doc-preview.netlify.app |
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/guide/custom-directive.md
Outdated
|
||
Now let's build the directive that accomplishes this: | ||
ここからこれを実現するディレクティブを実装しましょう。 |
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.
:
ですが、これまでの Vue 公式ドキュメントの翻訳ではそのまま載せてきたので、ここでは句点ではなく :
でお願いします! 🙏
ここからこれを実現するディレクティブを実装しましょう。 | |
ここからこれを実現するディレクティブを実装しましょう: |
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.
ご指摘ありがとうございます!
2504960 にてまとめて修正を入れさせていただきました 🙏
src/guide/custom-directive.md
Outdated
mounted(el) { | ||
el.focus() | ||
} | ||
} | ||
} | ||
``` | ||
|
||
Then in a template, you can use the new `v-focus` attribute on any element, like this: | ||
そしてテンプレートでは、新規登録した `v-focus` 属性をどの要素に対しても以下のように利用できます。 |
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.
ここも同じく :
そしてテンプレートでは、新規登録した `v-focus` 属性をどの要素に対しても以下のように利用できます。 | |
そしてテンプレートでは、新規登録した `v-focus` 属性をどの要素に対しても以下のように利用できます: |
src/guide/custom-directive.md
Outdated
app.directive('focus', { | ||
// When the bound element is mounted into the DOM... | ||
// バインドされている要素が DOM にマウントされると... |
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.
これまでの Vue 公式ドキュメントの翻訳では、bind
は 束縛
で訳してきているの、こちらでお願いしいます! 🙏
// バインドされている要素が DOM にマウントされると... | |
// 束縛されている要素が DOM にマウントされると... |
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.
承知しました!
こちら 63bedfb にてまとめて修正させていただきました 🙋
src/guide/custom-directive.md
Outdated
|
||
- `beforeMount`: called when the directive is first bound to the element and before parent component is mounted. This is where you can do one-time setup work. | ||
- `beforeMount`: ディレクティブが初めて要素にバインドされた時、そして親コンポーネントがマウントされる前に呼ばれます。ここは1度だけ実行するセットアップ処理を行える場所です。 |
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.
ここの bind
も同じく。
- `beforeMount`: ディレクティブが初めて要素にバインドされた時、そして親コンポーネントがマウントされる前に呼ばれます。ここは1度だけ実行するセットアップ処理を行える場所です。 | |
- `beforeMount`: ディレクティブが初めて要素に束縛された時、そして親コンポーネントがマウントされる前に呼ばれます。ここは1度だけ実行するセットアップ処理を行える場所です。 |
src/guide/custom-directive.md
Outdated
|
||
- `mounted`: called when the bound element's parent component is mounted. | ||
- `mounted`: バインドされた要素の親コンポーネントがマウントされた時に呼ばれます。 |
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.
ここの bind
も同じく。
- `mounted`: バインドされた要素の親コンポーネントがマウントされた時に呼ばれます。 | |
- `mounted`: 束縛された要素の親コンポーネントがマウントされた時に呼ばれます。 |
src/guide/custom-directive.md
Outdated
|
||
:::tip Note | ||
We'll cover VNodes in more detail [later](render-function.html#the-virtual-dom-tree), when we discuss render functions. | ||
:::tip 注意 |
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.
VuePress の :::
のやつですが、以下でも質問がありましたが、一旦翻訳しない方向に決めました。
#1 (comment)
ですので、そのままにしておいてください。 🙏
:::tip 注意 | |
:::tip Note |
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.
なるほど!ご指摘ありがとうございます!
こちらも原文表示に修正しました!
ee56f74
src/guide/custom-directive.md
Outdated
::: | ||
|
||
- `updated`: called after the containing component's VNode **and the VNodes of its children** have updated. | ||
- `updated`: バインドされた要素を含むコンポーネントの VNode **とその子コンポーネントの VNode** が更新された後に呼ばれます。 |
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.
ここの bind も同じく。
- `updated`: バインドされた要素を含むコンポーネントの VNode **とその子コンポーネントの VNode** が更新された後に呼ばれます。 | |
- `updated`: 束縛された要素を含むコンポーネントの VNode **とその子コンポーネントの VNode** が更新された後に呼ばれます。 |
src/guide/custom-directive.md
Outdated
|
||
- `beforeUnmount`: called before the bound element's parent component is unmounted | ||
- `beforeUnmount`: バインドされた要素の親コンポーネントがアンマウントされる前に呼ばれます。 |
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.
ここの bind も同じく。
- `beforeUnmount`: バインドされた要素の親コンポーネントがアンマウントされる前に呼ばれます。 | |
- `beforeUnmount`: 束縛された要素の親コンポーネントがアンマウントされる前に呼ばれます。 |
src/guide/custom-directive.md
Outdated
|
||
- `unmounted`: called only once, when the directive is unbound from the element and the parent component is unmounted. | ||
- `unmounted`: ディレクティブが要素からバインドを解かれた時、また親コンポーネントがアンマウントされた時に1度だけ呼ばれます。 |
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.
ここの bind も同じく。
- `unmounted`: ディレクティブが要素からバインドを解かれた時、また親コンポーネントがアンマウントされた時に1度だけ呼ばれます。 | |
- `unmounted`: ディレクティブが要素から束縛されなくなった時、また親コンポーネントがアンマウントされた時に1度だけ呼ばれます。 |
src/guide/custom-directive.md
Outdated
@@ -134,7 +134,7 @@ Result: | |||
</p> | |||
<script async src="https://static.codepen.io/assets/embed/ei.js"></script> | |||
|
|||
Our custom directive is now flexible enough to support a few different use cases. To make it even more dynamic, we can also allow to modify a bound value. Let's create an additional property `pinPadding` and bind it to the `<input type="range">` | |||
このカスタムディレクティブは、いくつかの違うユースケースをサポートできるほど柔軟になりました。さらに動的にするには、バインドした値を修正できるようにすれば良いでしょう。`pinPadding` という追加のプロパティを作成して、`<input type="range">` にバインドしてみましょう。 |
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.
ここの bind も同じく。
このカスタムディレクティブは、いくつかの違うユースケースをサポートできるほど柔軟になりました。さらに動的にするには、バインドした値を修正できるようにすれば良いでしょう。`pinPadding` という追加のプロパティを作成して、`<input type="range">` にバインドしてみましょう。 | |
このカスタムディレクティブは、いくつかの違うユースケースをサポートできるほど柔軟になりました。さらに動的にするには、束縛した値を修正できるようにすれば良いでしょう。`pinPadding` という追加のプロパティを作成して、`<input type="range">` に束縛してみましょう。 |
細かくレビューいただきありがとうございました! |
指摘事項の対応ありがとうございました! CIでエラーが起きていますが、翻訳作業に支障はない(このPRとは別事象)ので、マージします! 翻訳ありがとうございました! |
resolved #26