Skip to content

Commit 747e5ae

Browse files
potato4dkazupon
andauthored
doc: Translate API Configuration in Reference (#178)
* doc: Translate API Configuration * chore: fix typo in original text * Update src/api/application-config.md Co-authored-by: kazuya kawaguchi <[email protected]> Co-authored-by: kazuya kawaguchi <[email protected]>
1 parent 6da4d69 commit 747e5ae

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

src/api/application-config.md

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# アプリケーション構成
22

3-
`config` is an object containing Vue application global configurations. You can modify its properties listed below before mounting your application:
3+
`config` は、 Vue アプリケーションのグローバル設定を含むオブジェクトです。アプリケーションをマウントする前に、以下のプロパティを変更できます:
44

55
```js
66
const app = Vue.createApp({})
@@ -10,61 +10,61 @@ app.config = {...}
1010

1111
## devtools
1212

13-
- **Type:** `boolean`
13+
- **:** `boolean`
1414

15-
- **Default:** `true` (`false` in production builds)
15+
- **デフォルト:** `true` (プロダクションビルドでは `false`)
1616

17-
- **Usage:**
17+
- **使用方法:**
1818

1919
```js
2020
app.config.devtools = true
2121
```
2222

23-
Configure whether to allow [vue-devtools](https://github.com/vuejs/vue-devtools) inspection. This option's default value is `true` in development builds and `false` in production builds. You can set it to `true` to enable inspection for production builds.
23+
[vue-devtools](https://github.com/vuejs/vue-devtools) による検査を許可するかどうかを設定します。このオプションのデフォルト値は、development ビルドでは `true` に、プロダクションビルドでは `false` となります。true にすることで、プロダクションビルドで検査を有効にできます。
2424

2525
## errorHandler
2626

27-
- **Type:** `Function`
27+
- **:** `Function`
2828

29-
- **Default:** `undefined`
29+
- **デフォルト:** `undefined`
3030

31-
- **Usage:**
31+
- **使用方法:**
3232

3333
```js
3434
app.config.errorHandler = (err, vm, info) => {
35-
// handle error
36-
// `info` is a Vue-specific error info, e.g. which lifecycle hook
37-
// the error was found in
35+
// エラーハンドリング
36+
// `info` は、Vue 固有のエラー情報です。例: ライフサイクルフック
37+
// エラーが見つかった際の処理
3838
}
3939
```
4040

41-
Assign a handler for uncaught errors during component render function and watchers. The handler gets called with the error and the application instance.
41+
コンポーネントの描画関数とウォッチャーに捕捉されなかったエラーのハンドラを割り当てます。ハンドラには、アプリケーションのインスタンスとエラーが渡されて呼び出されます。
4242

43-
> Error tracking services [Sentry](https://sentry.io/for/vue/) and [Bugsnag](https://docs.bugsnag.com/platforms/browsers/vue/) provide official integrations using this option.
43+
> エラートラッキングサービスの [Sentry](https://sentry.io/for/vue/) ならびに [Bugsnag](https://docs.bugsnag.com/platforms/browsers/vue/) は公式に連携のためのオプションを用意しています。
4444
4545
## warnHandler
4646

47-
- **Type:** `Function`
47+
- **:** `Function`
4848

49-
- **Default:** `undefined`
49+
- **デフォルト:** `undefined`
5050

51-
- **Usage:**
51+
- **使用方法:**
5252

5353
```js
5454
app.config.warnHandler = function(msg, vm, trace) {
55-
// `trace` is the component hierarchy trace
55+
// `trace` は、コンポーネント階層のトレースです。
5656
}
5757
```
5858

59-
Assign a custom handler for runtime Vue warnings. Note this only works during development and is ignored in production.
59+
Vue の warning のためのカスタムハンドラを割り当てます。開発環境でのみ動き、プロダクションでは動作しないことに注意してください。
6060

6161
## globalProperties
6262

63-
- **Type:** `[key: string]: any`
63+
- **:** `[key: string]: any`
6464

65-
- **Default:** `undefined`
65+
- **デフォルト:** `undefined`
6666

67-
- **Usage:**
67+
- **使用方法:**
6868

6969
```js
7070
app.config.globalProperties.foo = 'bar'
@@ -76,9 +76,9 @@ app.component('child-component', {
7676
})
7777
```
7878

79-
Adds a global property that can be accessed in any component instance inside the application. The component’s property will take priority when there are conflicting keys.
79+
アプリケーション内のあらゆるコンポーネントのインスタンスからアクセスできるグローバルなプロパティを追加します。名称が競合した場合、コンポーネントのプロパティが優先されます。
8080

81-
This can replace Vue 2.x `Vue.prototype` extending:
81+
これは、 Vue 2.x における Vue.prototype` 拡張を置き換えることができます:
8282

8383
```js
8484
// Before
@@ -91,28 +91,28 @@ app.config.globalProperties.$http = () => {}
9191

9292
## isCustomElement
9393

94-
- **Type:** `(tag: string) => boolean`
94+
- **:** `(tag: string) => boolean`
9595

96-
- **Default:** `undefined`
96+
- **デフォルト:** `undefined`
9797

98-
- **Usage:**
98+
- **使用方法:**
9999

100100
```js
101-
// any element starting with 'ion-' will be recognized as a custom one
101+
// 'ion-' から始まる要素は、Custom Element として認識されます。
102102
app.config.isCustomElement = tag => tag.startsWith('ion-')
103103
```
104104

105-
Specifies a method to recognize custom elements defined outside of Vue (e.g., using the Web Components APIs). If component matches this condition, it won't need local or global registration and Vue won't throw a warning about an `Unknown custom element`.
105+
Vue の外部にて定義された(Web Components API を利用した場合などの)Custom Element を認識する方法を指定します。条件にコンポーネントがマッチした場合は、ローカルならびにグローバルでの登録を必要とせず、`Unknown custom element` の警告をスローしません。
106106

107-
> Note that all native HTML and SVG tags don't need to be matched in this function - Vue parser performs this check automatically
107+
> この関数では、全てのネイティブの HTML ならびに SVG のタグをマッチさせる必要はありません。Vue のパーサが自動的にこのチェックを行います。
108108
109109
## optionMergeStrategies
110110

111-
- **Type:** `{ [key: string]: Function }`
111+
- **:** `{ [key: string]: Function }`
112112

113-
- **Default:** `{}`
113+
- **デフォルト:** `{}`
114114

115-
- **Usage:**
115+
- **使用方法:**
116116

117117
```js
118118
const app = Vue.createApp({
@@ -129,21 +129,21 @@ app.mixin({
129129
hello: 'Vue'
130130
})
131131

132-
// 'Hello, Vue
132+
// 'Hello, Vue'
133133
```
134134

135-
Define merging strategies for custom options.
135+
カスタムオプションのマージ戦略を定義します。
136136

137-
The merge strategy receives the value of that option defined on the parent and child instances as the first and second arguments, respectively. The context application instance is passed as the third argument.
137+
マージ戦略は、親インスタンスと子インスタンスで定義されたオプションの値をそれぞれ第一引数と第二引数として受け取ります。アプリケーションコンテキストのインスタンスは、第三引数として渡されます。
138138

139-
- **See also:** [Custom Option Merging Strategies](../guide/mixins.html#custom-option-merge-strategies)
139+
- **こちらも:** [Custom Option Merging Strategies](../guide/mixins.html#custom-option-merge-strategies)
140140

141141
## performance
142142

143-
- **Type:** `boolean`
143+
- **:** `boolean`
144144

145-
- **Default:** `false`
145+
- **デフォルト:** `false`
146146

147-
- **Usage**:
147+
- **使用方法**:
148148

149-
Set this to `true` to enable component init, compile, render and patch performance tracing in the browser devtool performance/timeline panel. Only works in development mode and in browsers that support the [performance.mark](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark) API.
149+
コンポーネントの初期化に `true` に設定することで、ブラウザの devtool 内の performance/timeline パネルにて、レンダリングおよびパッチにおけるパフォーマンスの追跡が可能となります。development モード並びに[performance.mark](https://developer.mozilla.org/en-US/docs/Web/API/Performance/mark) API が有効なブラウザでのみ機能します。

0 commit comments

Comments
 (0)