Skip to content

Commit 5253d5a

Browse files
oohirakazupon
authored andcommitted
Translate v2.6 updates for api/index.md and render-function.md (#1512)
* Translate v2.6 updates for api/index.md * Translate v2.6 updates for render-function.md
1 parent 143c8c3 commit 5253d5a

File tree

2 files changed

+57
-57
lines changed

2 files changed

+57
-57
lines changed

src/v2/api/index.md

Lines changed: 55 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: API
33
type: api
4-
updated: 2019-02-11
4+
updated: 2019-02-18
55
---
66

77
## グローバル設定
@@ -85,7 +85,7 @@ updated: 2019-02-11
8585
8686
> 2.4.0 以降では、このフックは Vue のカスタムイベントハンドラ内部で投げられたエラーもキャプチャします。
8787
88-
> In 2.6.0+, this hook also captures errors thrown inside `v-on` DOM listeners. In addition, if any of the covered hooks or handlers returns a Promise chain (e.g. async functions), the error from that Promise chain will also be handled.
88+
> 2.6.0 以降では、このフックは `v-on` DOM リスナ内で投げられたエラーもキャプチャします。加えて、フックやハンドラが Promise チェーン (例えば、async 関数) を返す場合、その Promise チェーンからのエラーもハンドリングされます。
8989
9090
> エラー追跡サービスの [Sentry](https://sentry.io/for/vue/)[Bugsnag](https://docs.bugsnag.com/platforms/browsers/vue/) はこのオプションを使用して公式の統合を提供しています。
9191
@@ -408,16 +408,16 @@ updated: 2019-02-11
408408

409409
### Vue.observable( object )
410410

411-
> New in 2.6.0+
411+
> 2.6.0 から新規
412412
413-
- **Arguments:**
413+
- **引数:**
414414
- `{Object} object`
415415

416-
- **Usage:**
416+
- **使用方法:**
417417

418-
Make an object reactive. Internally, Vue uses this on the object returned by the `data` function.
418+
オブジェクトをリアクティブにします。内部的には、Vue `data` 関数から返されたオブジェクトに対してこれを使っています。
419419

420-
The returned object can be used directly inside [render functions](../guide/render-function.html) and [computed properties](../guide/computed.html), and will trigger appropriate updates when mutated. It can also be used as a minimal, cross-component state store for simple scenarios:
420+
戻り値のオブジェクトは、[描画関数](../guide/render-function.html) [算出プロパティ](../guide/computed.html) の中で直接使え、値が変更されたときには適切な更新をトリガーします。単純なシナリオでは、コンポーネントをまたぐ最小の state ストアとして使用することもできます:
421421

422422
``` js
423423
const state = Vue.observable({ count: 0 })
@@ -431,9 +431,9 @@ updated: 2019-02-11
431431
}
432432
```
433433

434-
<p class="tip">In Vue 2.x, `Vue.observable` directly mutates the object passed to it, so that it is equivalent to the object returned, as [demonstrated here](../guide/instance.html#Data-and-Methods). In Vue 3.x, a reactive proxy will be returned instead, leaving the original object non-reactive if mutated directly. Therefore, for future compatibility, we recommend always working with the object returned by `Vue.observable`, rather than the object originally passed to it.</p>
434+
<p class="tip">Vue 2.x では、`Vue.observable` は渡されたオブジェクトを直接操作するため、[ここでデモされる](../guide/instance.html#データとメソッド) ように戻り値のオブジェクトと等しくなります。Vue 3.x では、代わりにリアクティブプロキシを返し、元のオブジェクトを直接変更してもリアクティブにならないようにします。そのため、将来の互換性を考えると、`Vue.observable` に渡したオブジェクトではなく、返されたオブジェクトを使うことを推奨します。</p>
435435

436-
- **See also:** [Reactivity in Depth](../guide/reactivity.html)
436+
- **参照:** [リアクティブの探求](../guide/reactivity.html)
437437

438438
### Vue.version
439439

@@ -1378,7 +1378,7 @@ updated: 2019-02-11
13781378

13791379
- **デフォルト:**
13801380

1381-
プログラム的に[スロットにより配信された](/guide/components.html#スロットによるコンテンツ配信)コンテンツにアクセスするために使用されます。各[名前付きスロット](/guide/components.html#名前付きスロット) は自身に対応するプロパティを持ちます (例: `slot="foo"` のコンテンツは `vm.$slots.foo` で見つかります)。`default` プロパティは名前付きスロットに含まれない任意のノードを含みます。
1381+
プログラム的に[スロットにより配信された](/guide/components.html#スロットによるコンテンツ配信)コンテンツにアクセスするために使用されます。各[名前付きスロット](../guide/components-slots.html#名前付きスロット) は自身に対応するプロパティを持ちます (例: `slot="foo"` のコンテンツは `vm.$slots.foo` で見つかります)。`default` プロパティは名前付きスロットに含まれない任意のノードを含みます。
13821382

13831383
`vm.$slots` のアクセスは、[描画関数](/guide/render-function.html) によるコンポーネントを書くときに最も便利です。
13841384

@@ -1430,19 +1430,19 @@ updated: 2019-02-11
14301430

14311431
- **詳細:**
14321432

1433-
[スコープ付きスロット (scoped slot)](../guide/components.html#スコープ付きスロット)にプログラムでアクセスするために使用されます。`default` を含む各スロットに対して、オブジェクトには VNode を返す対応する関数が含まれています。
1433+
[スコープ付きスロット](../guide/components-slots.html#スコープ付きスロット) にプログラムでアクセスするために使用されます。`default` を含む各スロットに対して、オブジェクトには VNode を返す対応する関数が含まれています。
14341434

14351435
`vm.$scopedSlots` にアクセスする際に、[描画関数](../guide/render-function.html) でコンポーネントを書くときに最も便利です。
14361436

1437-
**Note:** since 2.6.0+, there are two notable changes to this property:
1437+
**注意:** 2.6.0 以降では、このプロパティに特筆すべき変更が 2 つあります:
14381438

1439-
1. Scoped slot functions are now guaranteed to return an array of VNodes, unless the return value is invalid, in which case the function will return `undefined`.
1439+
1. スコープ付きスロット関数は、戻り値が不正でない限り (この場合は `undefined` を返す) VNode の配列を返すことが保証されるようになりました。
14401440

1441-
2. All `$slots` are now also exposed on `$scopedSlots` as functions. If you work with render functions, it is now recommended to always access slots via `$scopedSlots`, whether they currently use a scope or not. This will not only make future refactors to add a scope simpler, but also ease your eventual migration to Vue 3, where all slots will be functions.
1441+
2. すべての `$slots` `$scopedSlots` にも関数として公開されるようになりました。描画関数を使う場合、今後はスコープ付きを使うかどうかに関係なく、常に `$scopedSlots` 経由でスロットにアクセスすることを推奨します。これは、将来スコープを追加するリファクタリングをシンプルにするだけでなく、すべてのスロットが関数になる Vue 3 への移行を簡単にします。
14421442

1443-
- **See also:**
1444-
- [`<slot>` コンポーネント](#slot-1)
1445-
- [スコープ付きスロット](../guide/components.html#スコープ付きスロット)
1443+
- **参照:**
1444+
- [`<slot>` コンポーネント](#slot)
1445+
- [スコープ付きスロット](../guide/components-slots.html#スコープ付きスロット)
14461446
- [描画関数 - スロット](../guide/render-function.html#スロット)
14471447

14481448
### vm.$refs
@@ -1987,7 +1987,7 @@ updated: 2019-02-11
19871987

19881988
### v-for
19891989

1990-
- **要求事項:** `Array | Object | number | string | Iterable (since 2.6)`
1990+
- **要求事項:** `Array | Object | number | string | Iterable (2.6 以降)`
19911991

19921992
- **使用方法:**
19931993

@@ -2015,7 +2015,7 @@ updated: 2019-02-11
20152015
</div>
20162016
```
20172017

2018-
In 2.6+, `v-for` can also work on values that implement the [Iterable Protocol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol), including native `Map` and `Set`. However, it should be noted that Vue 2.x currently does not support reactivity on `Map` and `Set` values, so cannot automatically detect changes.
2018+
2.6 以降では、`v-for` はネイティブの `Map` や `Set`を含む、[Iterable プロトコル](https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Iteration_protocols#The_iterable_protocol) を実装した値でも動作できるようになりました。ただし、Vue 2.x は今のところ `Map` 値や `Set` 値をリアクティブにはできず、変更を自動的に検知できない点は注意しておく必要があります。
20192019

20202020
<p class="tip">`v-if` といっしょに使用されるとき、`v-for` は `v-if` より優先度が高くなります。詳細については<a href="../guide/list.html#v-for-と-v-if">リストレンダリングのガイド</a>を参照してください。</p>
20212021

@@ -2062,7 +2062,7 @@ updated: 2019-02-11
20622062
<!-- メソッドハンドラ -->
20632063
<button v-on:click="doThis"></button>
20642064

2065-
<!-- dynamic event (2.6.0+) -->
2065+
<!-- 動的イベント (2.6.0 以降) -->
20662066
<button v-on:[event]="doThis"></button>
20672067

20682068
<!-- インラインステートメント -->
@@ -2071,7 +2071,7 @@ updated: 2019-02-11
20712071
<!-- 省略記法 -->
20722072
<button @click="doThis"></button>
20732073

2074-
<!-- shorthand dynamic event (2.6.0+) -->
2074+
<!-- 動的イベントの省略記法 (2.6.0 以降) -->
20752075
<button @[event]="doThis"></button>
20762076

20772077
<!-- イベント伝播の停止 -->
@@ -2145,13 +2145,13 @@ updated: 2019-02-11
21452145
<!-- 属性を束縛 -->
21462146
<img v-bind:src="imageSrc">
21472147

2148-
<!-- dynamic attribute name (2.6.0+) -->
2148+
<!-- 動的な属性名 (2.6.0 以降) -->
21492149
<button v-bind:[key]="value"></button>
21502150

21512151
<!-- 省略記法 -->
21522152
<img :src="imageSrc">
21532153

2154-
<!-- shorthand dynamic attribute name (2.6.0+) -->
2154+
<!-- 動的な属性名の省略記法 (2.6.0 以降) -->
21552155
<button :[key]="value"></button>
21562156

21572157
<!-- インライン文字列連結 -->
@@ -2220,24 +2220,24 @@ updated: 2019-02-11
22202220

22212221
### v-slot
22222222

2223-
- **Shorthand:** `#`
2223+
- **省略記法:** `#`
22242224

2225-
- **Expects:** JavaScript expression that is valid in a function argument position (supports destructuring in [supported environments](../guide/components-slots.html#Slot-Props-Destructuring)). Optional - only needed if expecting props to be passed to the slot.
2225+
- **要求事項:** 関数定義の引数部分で有効な JavaScript 式 ([サポートされている環境](../guide/components-slots.html#スロットプロパティの分割代入) では分割代入も使用可能)。省略可 - プロパティがスロットに渡される場合のみ必要。
22262226

2227-
- **Argument:** slot name (optional, defaults to `default`)
2227+
- **引数:** スロット名 (省略可。デフォルト値 `default`)
22282228

2229-
- **Limited to:**
2229+
- **適用対象制限:**
22302230
- `<template>`
2231-
- [components](../guide/components-slots.html#Abbreviated-Syntax-for-Lone-Default-Slots) (for a lone default slot with props)
2231+
- [コンポーネント](../guide/components-slots.html#デフォルトスロットしかない場合の省略記法) (デフォルトスロットしかない場合)
22322232

2233-
- **Usage:**
2233+
- **使用方法:**
22342234

2235-
Denote named slots or slots that expect to receive props.
2235+
名前付きスロットあるいはプロパティを受け取るスロットとなることを示します。
22362236

2237-
- **Example:**
2237+
- **:**
22382238

22392239
```html
2240-
<!-- Named slots -->
2240+
<!-- 名前付きスロット -->
22412241
<base-layout>
22422242
<template v-slot:header>
22432243
Header content
@@ -2250,7 +2250,7 @@ updated: 2019-02-11
22502250
</template>
22512251
</base-layout>
22522252

2253-
<!-- Named slot that receives props -->
2253+
<!-- プロパティを受け取る名前付きスロット -->
22542254
<infinite-scroll>
22552255
<template v-slot:item="slotProps">
22562256
<div class="item">
@@ -2259,16 +2259,16 @@ updated: 2019-02-11
22592259
</template>
22602260
</infinite-scroll>
22612261

2262-
<!-- Default slot that receive props, with destructuring -->
2262+
<!-- 分割代入でプロパティを受け取るデフォルトスロット -->
22632263
<mouse-position v-slot="{ x, y }">
22642264
Mouse position: {{ x }}, {{ y }}
22652265
</mouse-position>
22662266
```
22672267

2268-
For more details, see the links below.
2268+
詳細は、以下のリンクを参照してください。
22692269

2270-
- **See also:**
2271-
- [Components - Slots](../guide/components-slots.html)
2270+
- **参照:**
2271+
- [スロット](../guide/components-slots.html)
22722272
- [RFC-0001](https://github.com/vuejs/rfcs/blob/master/active-rfcs/0001-new-slot-syntax.md)
22732273

22742274
### v-pre
@@ -2410,43 +2410,43 @@ updated: 2019-02-11
24102410

24112411
詳しい使用方法については、上記のリンクを参照してください。
24122412

2413-
- **See also:**
2413+
- **参照:**
24142414
- [動的コンポーネント](../guide/components.html#動的コンポーネント)
24152415
- [DOM-テンプレート解析の注意事項](../guide/components.html#DOM-テンプレート解析の注意事項)
24162416

2417-
### slot <sup style="color:#c92222">deprecated</sup>
2417+
### slot <sup style="color:#c92222">非推奨</sup>
24182418

2419-
**Prefer [v-slot](#v-slot) in 2.6.0+.**
2419+
**2.6.0 以降では [v-slot](#v-slot) を使うこと**
24202420

2421-
- **Expects:** `string`
2421+
- **要求事項:** `string`
24222422

2423-
Used on content inserted into child components to indicate which named slot the content belongs to.
2423+
子コンポーネントに挿入されるコンテンツに対して、どの名前付きスロットのコンテンツになるかを示すために使われます。
24242424

2425-
- **See also:** [Named Slots with `slot`](../guide/components.html#Named-Slots-with-slot)
2425+
- **参照:** [`slot` 属性による名前付きスロット](../guide/components-slots.html#slot-属性による名前付きスロット)
24262426

2427-
### slot-scope <sup style="color:#c92222">deprecated</sup>
2427+
### slot-scope <sup style="color:#c92222">非推奨</sup>
24282428

2429-
**Prefer [v-slot](#v-slot) in 2.6.0+.**
2429+
**2.6.0 以降では [v-slot](#v-slot) を使うこと**
24302430

2431-
- **Expects:** `function argument expression`
2431+
- **要求事項:** `function argument expression`
24322432

2433-
- **Usage:**
2433+
- **使用方法:**
24342434

2435-
Used to denote an element or component as a scoped slot. The attribute's value should be a valid JavaScript expression that can appear in the argument position of a function signature. This means in supported environments you can also use ES2015 destructuring in the expression. Serves as a replacement for [`scope`](#scope-replaced) in 2.5.0+.
2435+
要素またはコンポーネントがスコープ付きスロットとなることを示すために使われます。属性の値は、関数シグネチャの引数部分で有効な JavaScript 式となる必要があります。これは、サポートされている環境では式に ES2015 の分割代入が使えることを意味します。2.5.0 以降では、[`scope`](#scope-削除) を置き換えます。
24362436

2437-
This attribute does not support dynamic binding.
2437+
この属性は、動的なバインディングはサポートしません。
24382438

2439-
- **See also:** [Scoped Slots with `slot-scope`](../guide/components.html#Scoped-Slots-with-slot-scope)
2439+
- **参照:** [`slot-scope` 属性によるスコープ付きスロット](../guide/components-slots.html#slot-scope-属性によるスコープ付きスロット)
24402440

2441-
### scope <sup style="color:#c92222">removed</sup>
2441+
### scope <sup style="color:#c92222">削除</sup>
24422442

2443-
**Replaced by [slot-scope](#slot-scope) in 2.5.0+. Prefer [v-slot](#v-slot) in 2.6.0+.**
2443+
**2.5.0 以降では [slot-scope](#slot-scope-非推奨) で置き換え。2.6.0 以降では [v-slot](#v-slot) を使うこと**
24442444

2445-
Used to denote a `<template>` element as a scoped slot.
2445+
`<template>` 要素がスコープ付きスロットとなることを示すために使われます。
24462446

2447-
- **Usage:**
2447+
- **使用方法:**
24482448

2449-
Same as [`slot-scope`](#slot-scope) except that `scope` can only be used on `<template>` elements.
2449+
[`slot-scope`](#slot-scope-非推奨) と同じですが、`scope` `<template>` 要素に対してのみ使用できます。
24502450

24512451
## 組み込みコンポーネント
24522452

src/v2/guide/render-function.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 描画関数とJSX
3-
updated: 2019-02-11
3+
updated: 2019-02-19
44
type: guide
55
order: 303
66
---
@@ -533,7 +533,7 @@ Vue.component('my-component', {
533533
- `props`: 提供されるプロパティのオブジェクト
534534
- `children`: 子 VNode の配列
535535
- `slots`: slots オブジェクトを返す関数
536-
- `scopedSlots`: (2.6.0+) An object that exposes passed-in scoped slots. Also exposes normal slots as functions.
536+
- `scopedSlots`: (2.6.0 以降) スコープ付きスロットを公開するオブジェクト。通常のスロットも関数として公開します
537537
- `data`: `createElement` の第 2 引数としてコンポーネントに渡される全体の[データオブジェクト](#データオブジェクト詳解)
538538
- `parent`: 親コンポーネントへの参照
539539
- `listeners`: (2.3.0 以降) 親に登録されたイベントリスナーを含むオブジェクト。これは単純に `data.on` のエイリアスです

0 commit comments

Comments
 (0)