Skip to content

For japanese translation of remaining differences #949

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
Nov 28, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/ja/api/route-object.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@

ルートオブジェクトは複数の場所に存在します。

- コンポーネント内での `this.$route`、また、 `$route` watcher コールバック内部
- コンポーネント内での `this.$route`、また、 `$route` watcher コールバック内部

- `router.match(location)` を呼び出した時の返り値
- `router.match(location)` を呼び出した時の返り値

- ナビゲーションガード内での 1 つ目の引数
- ナビゲーションガード内での第 1 引数、第 2 引数として:

``` js
router.beforeEach((route, redirect, next) => {
// ここの route はルートオブジェクト
})
```

- `scrollBehavior` function 内の引数
- `scrollBehavior` 関数内の第 1 引数、第 2 引数として:

``` js
const router = new VueRouter({
Expand Down
4 changes: 4 additions & 0 deletions docs/ja/api/router-instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@
- **router.getMatchedComponents()**

現在のルートにマッチしているコンポーネント (インスタンスではなく定義 / コンストラクタ) の配列を返します。これは大抵の場合データ取得を行うサーバーサイドレンダリングで使用されます。

- **router.resolve(location, current?, append?)**

逆 URL 解決します。`<router-link/>` で使われているものと同じ形式の location が与えられた場合は、文字列プロパティ `href` のオブジェクトを返します。
11 changes: 8 additions & 3 deletions docs/ja/essentials/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,14 @@

Vue.js と vue-router を使ったシングルページアプリケーションの構築は驚くほど簡単です。Vue.js のコンポーネントを使ってアプリケーションを既に構成しています。vue-router を混ぜ込むには、コンポーネントとルートをマッピングさせて vue-router にどこでレンダリングするかを知らせるだけです。以下が基本的な例です。

> すべての example では、vue のスタンドアロンバージョンを使用してテンプレートを解析可能にしています。詳細は[こちら](http://jp.vuejs.org/v2/guide/installation.html#スタンドアロン-vs-ランタイム限定ビルド)を参照してください。

### HTML

``` html
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vue-router"></script>

<div id="app">
<h1>Hello App!</h1>
<p>
Expand All @@ -25,7 +30,7 @@ Vue.js と vue-router を使ったシングルページアプリケーション
### JavaScript

``` js
// 0. モジュールシステムを使っている場合Vue.use(VueRouter) を呼び出します
// 0. モジュールシステムを使っている場合 (例: vue-clie 経由で)、Vue と VueRouter をインポートし、Vue.use(VueRouter) を呼び出します

// 1. ルートコンポーネントを定義します
// 他のファイルからインポートすることもできます
Expand All @@ -34,8 +39,8 @@ const Bar = { template: '<div>bar</div>' }

// 2. ルートをいくつか定義します
// 各ルートは 1 つのコンポーネントとマッピングされる必要があります。
// このコンポーネントは実際の Vue.extend() によって作られたコンポーネントコンストラクタでも
// コンポーネントオプションのオブジェクトでも構いません
// このコンポーネントは実際の Vue.extend()、Vue.component() 経由によってコンポーネント ID が登録された文字列、
// またはコンポーネントオプションのオブジェクトでも構いません。
// ネストされたルートに関しては後で説明します
const routes = [
{ path: '/foo', component: Foo },
Expand Down
5 changes: 4 additions & 1 deletion docs/zh-cn/essentials/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
### HTML

``` html
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vue-router"></script>

<div id="app">
<h1>Hello App!</h1>
<p>
Expand All @@ -25,7 +28,7 @@
### JavaScript

``` js
// 0. 如果使用模块化机制编程, 要调用 Vue.use(VueRouter)
// 0. 如果使用模块化机制编程,導入Vue和VueRouter,要调用 vue.use(vuerouter)

// 1. 定义(路由)组件。
// 可以从其他文件 import 进来
Expand Down