Skip to content

Update ja docs #1412

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 9 commits into from
May 16, 2017
Merged

Update ja docs #1412

merged 9 commits into from
May 16, 2017

Conversation

kazupon
Copy link
Member

@kazupon kazupon commented May 14, 2017

No description provided.

@kazupon kazupon requested review from tejitak and ktsn May 14, 2017 14:40
@@ -2,7 +2,7 @@

この名前が示すように、 `vue-router` によって提供されるナビゲーションガードは、リダイレクトもしくはキャンセルによって遷移をガードするために主に使用されます。ルートナビゲーション処理 (グローバル、ルート単位、コンポーネント内) をフックする多くの方法があります。

**パラメータまたはクエリの変更はナビゲーションガードをトリガーしない** ということを覚えておいてください。単純にそれらの変更を対応するために [`$route` オブジェクトを監視します](../essentials/dynamic-matching.md#reacting-to-params-changes)。
**パラメータまたはクエリの変更は enter/leave ナビゲーションガードをトリガーしない** ということを覚えておいてください。それらの変更を対応するために [`$route` オブジェクトを監視する](../essentials/dynamic-matching.md#reacting-to-params-changes)、またはコンポーネント内ガード `beforeRouteUpdate` を使用するか、どちらかでできます
Copy link
Member

Choose a reason for hiding this comment

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

細かいですが、

  • それらの変更を対応するために -> それらの変更対応するために
  • ...を使用するか、どちらかでできます。 -> ...を使用するか、どちらかできます。

が自然かなと感じました。


> New in 2.5.0

2.5.0 以降では、`router.beforeResolve` によってグローバルガードを登録できます。これは `router.beforeEach` に似ていますが、**すべてのコンポーネント内ガードと非同期ルートコンポーネントが解決された後**、ナビゲーションが解決される直ゼインに解決ガードが呼び出されるという違いがあります。
Copy link
Member

Choose a reason for hiding this comment

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

👀

直ゼイン -> 直前

1. ナビゲーションがトリガされる
2. 非アクティブ化されたコンポーネントで leave ガードを呼ぶ
3. グローバル `beforeEach` ガードを呼ぶ
4. 再利用コンポーネント (2.2 以降) で `beforeRouteUpdate` ガードを呼ぶ
Copy link
Member

Choose a reason for hiding this comment

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

ここの (2.2 以降) はこの文全体にかかっていると思います。

Copy link
Member

Choose a reason for hiding this comment

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

「再利用されるコンポーネント」の方がより具体的ですかね?

2. 非アクティブ化されたコンポーネントで leave ガードを呼ぶ
3. グローバル `beforeEach` ガードを呼ぶ
4. 再利用コンポーネント (2.2 以降) で `beforeRouteUpdate` ガードを呼ぶ
5. ルート設定 `beforeEnter` を呼ぶ
Copy link
Member

Choose a reason for hiding this comment

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

「ルート設定内の」まで説明するほうが親切かもです?

5. ルート設定 `beforeEnter` を呼ぶ
6. 非同期ルートコンポーネントを解決する
7. アクティブ化されたコンポーネントで `beforeRouteEnter` を呼ぶ
8. グローバル `beforeResolve` ガード (2.5 以降) を呼ぶ
Copy link
Member

Choose a reason for hiding this comment

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

ここも (2.5 以降) は全体にかかっているように見えます。

@@ -66,7 +76,7 @@
) => { x: number, y: number } | { selector: string } | ?{}
```

より詳細ついては [スクロールの振る舞い](../advanced/scroll-behavior.md) をご参照ください
より詳細ついては [スクロールの振る舞い](../advanced/scroll-behavior.md) を参照してください
Copy link
Member

Choose a reason for hiding this comment

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

今回の変更じゃないですが、「より詳細ついては」にしたほうが良さそうですね。

const User = {
template: '...',
beforeRouteUpdate (to, from, next) {
// ルート変更にリアクティブにする...
Copy link
Member

Choose a reason for hiding this comment

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

ここの react は reactive property の react とは違う意味で普通に「反応する」という意味だと思うので、「ルート変更に反応する...」でいかがでしょうか?

@kazupon
Copy link
Member Author

kazupon commented May 16, 2017

レビューありがとうございます!
いくつかの指摘事項、修正しました!

Copy link
Member

@ktsn ktsn left a comment

Choose a reason for hiding this comment

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

👍 💯

@kazupon kazupon merged commit 7283ae2 into vuejs:dev May 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants