Skip to content

Commit 3d6c963

Browse files
authored
Merge pull request #185 from kikd/translate-styleguide-c
2 parents 4c87ee3 + a1ba141 commit 3d6c963

File tree

1 file changed

+44
-40
lines changed

1 file changed

+44
-40
lines changed

src/style-guide/README.md

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,44 +1260,43 @@ HTML では、空白を含まない属性値は引用符でくくらなくても
12601260
</div>
12611261

12621262

1263-
## Priority C Rules: Recommended <span class="hide-from-sidebar">(Minimizing Arbitrary Choices and Cognitive Overhead)</span>
1263+
## 優先度 C のルール: 推奨 (任意の選択肢と認知上のオーバーヘッドの最小化)
12641264

1265-
### Component/instance options order <sup data-p="c">recommended</sup>
1265+
## 優先度 C のルール: 推奨 (任意の選択肢と認知上のオーバーヘッドの最小化)
12661266

1267-
**Component/instance options should be ordered consistently.**
1267+
### コンポーネント/インスタンス オプション順序 <sup data-p="c">推奨</sup>
12681268

1269-
This is the default order we recommend for component options. They're split into categories, so you'll know where to add new properties from plugins.
1269+
**コンポーネント/インスタンス オプションは、一貫した順序になるべきです。**
12701270

1271-
1. **Global Awareness** (requires knowledge beyond the component)
1272-
- `name`
1271+
これは推奨するコンポーネントオプションの既定の順序です。それらは種類分けされており、プラグインからどこに新たなプロパティを追加するか知ることができます。
12731272

1274-
2. **Template Compiler Options** (changes the way templates are compiled)
1275-
- `compilerOptions`
1273+
1. **グローバルな認識** (コンポーネントを超えた知識が必要)
1274+
- `name`
12761275

1277-
3. **Template Dependencies** (assets used in the template)
1276+
2. **テンプレートの依存関係** (テンプレートで使用されるアセット)
12781277
- `components`
12791278
- `directives`
12801279

1281-
4. **Composition** (merges properties into the options)
1280+
3. **合成** (プロパティをオプションにマージ)
12821281
- `extends`
12831282
- `mixins`
12841283
- `provide`/`inject`
12851284

1286-
5. **Interface** (the interface to the component)
1285+
4. **インタフェース** (コンポーネントへのインタフェース)
12871286
- `inheritAttrs`
12881287
- `props`
12891288
- `emits`
12901289

1291-
6. **Composition API** (the entry point for using the Composition API)
1290+
5. **コンポジション API** (コンポジション API を使用するためのエントリポイント)
12921291
- `setup`
12931292

1294-
7. **Local State** (local reactive properties)
1293+
6. **ローカルの状態** (ローカル リアクティブ プロパティ)
12951294
- `data`
12961295
- `computed`
12971296

1298-
8. **Events** (callbacks triggered by reactive events)
1297+
7. **イベント** (リアクティブなイベントによって引き起こされたコールバック)
12991298
- `watch`
1300-
- Lifecycle Events (in the order they are called)
1299+
- ライフサイクルイベント (呼び出される順)
13011300
- `beforeCreate`
13021301
- `created`
13031302
- `beforeMount`
@@ -1312,62 +1311,65 @@ This is the default order we recommend for component options. They're split into
13121311
- `renderTracked`
13131312
- `renderTriggered`
13141313

1315-
9. **Non-Reactive Properties** (instance properties independent of the reactivity system)
1314+
8. **リアクティブではないプロパティ** (リアクティブシステムから独立したインスタンス プロパティ)
13161315
- `methods`
13171316

1318-
10. **Rendering** (the declarative description of the component output)
1317+
9. **レンダリング** (コンポーネント出力の宣言的な記述)
13191318
- `template`/`render`
13201319

1321-
### Element attribute order <sup data-p="c">recommended</sup>
1320+
### 要素の属性の順序 <sup data-p="c">推奨</sup>
13221321

1323-
**The attributes of elements (including components) should be ordered consistently.**
1322+
**要素の属性 (コンポーネントを含む) は、一貫した順序になるべきです。**
13241323

1325-
This is the default order we recommend for component options. They're split into categories, so you'll know where to add custom attributes and directives.
1324+
これは推奨するコンポーネントオプションの既定の順序です。それらは種類分けされており、カスタム属性とディレクティブをどこに追加するか知ることができます。
13261325

1327-
1. **Definition** (provides the component options)
1326+
1. **定義** (コンポーネントオプションを提供)
13281327
- `is`
13291328

1330-
2. **List Rendering** (creates multiple variations of the same element)
1329+
2. **テンプレートの修飾子** (テンプレートのコンパイル方法を変更)
1330+
- `delimiters`
1331+
1332+
3. **リスト描画** (同じ要素の複数のバリエーションを作成する)
13311333
- `v-for`
13321334

1333-
3. **Conditionals** (whether the element is rendered/shown)
1335+
4. **条件** (要素が描画/表示されているかどうか)
13341336
- `v-if`
13351337
- `v-else-if`
13361338
- `v-else`
13371339
- `v-show`
13381340
- `v-cloak`
13391341

1340-
4. **Render Modifiers** (changes the way the element renders)
1342+
5. **描画修飾子** (要素の描画方法を変更)
13411343
- `v-pre`
13421344
- `v-once`
13431345

1344-
5. **Global Awareness** (requires knowledge beyond the component)
1346+
6. **グローバルな認識** (コンポーネントを超えた知識が必要)
13451347
- `id`
13461348

1347-
6. **Unique Attributes** (attributes that require unique values)
1349+
7. **一意の属性** (一意の値を必要とする属性)
13481350
- `ref`
13491351
- `key`
13501352

1351-
7. **Two-Way Binding** (combining binding and events)
1353+
8. **双方向バインディング** (バインディングとイベントの結合)
13521354
- `v-model`
13531355

1354-
8. **Other Attributes** (all unspecified bound & unbound attributes)
1356+
9. **その他の属性** (すべての指定されていないバインドされた属性とバインドされていない属性)
13551357

1356-
9. **Events** (component event listeners)
1358+
10. **イベント** (コンポーネントのイベントリスナ)
13571359
- `v-on`
13581360

1359-
10. **Content** (overrides the content of the element)
1361+
10. **コンテンツ** (要素のコンテンツを上書きする)
13601362
- `v-html`
13611363
- `v-text`
13621364

1363-
### Empty lines in component/instance options <sup data-p="c">recommended</sup>
1365+
### コンポーネント/インスタンス オプションの空行 <sup data-p="c">推奨</sup>
13641366

1365-
**You may want to add one empty line between multi-line properties, particularly if the options can no longer fit on your screen without scrolling.**
1367+
**特にオプションがスクロールなしでは画面に収まらなくなった場合、複数行に渡るプロパティの間に空行を追加してみてください。**
13661368

1367-
When components begin to feel cramped or difficult to read, adding spaces between multi-line properties can make them easier to skim again. In some editors, such as Vim, formatting options like this can also make them easier to navigate with the keyboard.
1369+
コンポーネントに窮屈さや読みづらさを感じたら、複数行に渡るプロパティの間に空行を追加する事でそれらを簡単に読み流すことができるようになります。 Vim など、一部のエディタでは、このような書式を使用するとキーボードで簡単に移動することができます。
13681370

13691371
<div class="style-example style-example-good">
1370-
<h4>Good</h4>
1372+
<h4>良い例</h4>
13711373

13721374
``` js
13731375
props: {
@@ -1397,8 +1399,8 @@ computed: {
13971399
```
13981400

13991401
``` js
1400-
// No spaces are also fine, as long as the component
1401-
// is still easy to read and navigate.
1402+
// コンポーネントの読み取りや移動が容易であれば、
1403+
// 空行がなくても大丈夫です。
14021404
props: {
14031405
value: {
14041406
type: String,
@@ -1426,12 +1428,12 @@ computed: {
14261428
```
14271429
</div>
14281430

1429-
### Single-file component top-level element order <sup data-p="c">recommended</sup>
1431+
### 単一ファイルコンポーネントのトップレベルの属性の順序 <sup data-p="c">推奨</sup>
14301432

1431-
**[Single-file components](../guide/single-file-component.html) should always order `<script>`, `<template>`, and `<style>` tags consistently, with `<style>` last, because at least one of the other two is always necessary.**
1433+
**[単一ファイルコンポーネント](../guide/single-file-components.html)では、 `<script>``<template>` `<style>` タグを一貫した順序にし、 `<style>` は他の2つのうち少なくとも1つで常に必要となるため、順序を最後にするべきです。**
14321434

14331435
<div class="style-example style-example-bad">
1434-
<h4>Bad</h4>
1436+
<h4>悪い例</h4>
14351437

14361438
``` html
14371439
<style>/* ... */</style>
@@ -1453,7 +1455,7 @@ computed: {
14531455
</div>
14541456

14551457
<div class="style-example style-example-good">
1456-
<h4>Good</h4>
1458+
<h4>良い例</h4>
14571459

14581460
``` html
14591461
<!-- ComponentA.vue -->
@@ -1480,6 +1482,8 @@ computed: {
14801482
```
14811483
</div>
14821484

1485+
## Priority D Rules: Use with Caution <span class="hide-from-sidebar">(Potentially Dangerous Patterns)</span>
1486+
14831487
### Element selectors with `scoped` <sup data-p="d">use with caution</sup>
14841488

14851489
**Element selectors should be avoided with `scoped`.**

0 commit comments

Comments
 (0)