8000 translate style-guide priority c (#394) · vuejs-jp-bot/jp.vuejs.org@45bcea8 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 45bcea8

Browse files
shika358kazupon
authored andcommitted
translate style-guide priority c (vuejs#394)
* style-guide Priority C: Component/instance options order * style-guide Priority C: Element attribute order * style-guide Priority C: Rule Categories C * style-guide Priority C: Empty lines in component/instance options * style-guide Priority C: Empty Single-file component top-level element order * fix translate, according to review * delete english sentences
1 parent 79575d3 commit 45bcea8

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

src/v2/style-guide/index.md

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ These rules help prevent errors, so learn and abide by them at all costs. Except
2727

2828
これらのルールは、ほとんどのプロジェクトで読みやすさや開発者の体験をよりよくするために見いだされました。これらに違反してもあなたのコードは動きますが、ごくまれなケースで、かつちゃんと正当を示した上でのみ違反するようにすべきです。
2929

30-
### Priority C: Recommended
30+
### 優先度 C: 推奨
3131

32-
Where multiple, equally good options exist, an arbitrary choice can be made to ensure consistency. In these rules, we describe each acceptable option and suggest a default choice. That means you can feel free to make a different choice in your own codebase, as long as you're consistent and have a good reason. Please do have a good reason though! By adapting to the community standard, you will:
32+
同じくらい良いオプションが複数ある場合、一貫性を確保するために任意の選択をすることができます。これらのルールでは、それぞれ許容可能なオプションを説明し、既定の選択を提案します。つまり、一貫性があり、良い理由を持ち続ける限り、独自のコードベースで自由に異なる選択肢を作ることができます。ですが、良い理由はあるのでしょうか!コミュニティの標準に合わせることで、あなたは:
3333

34-
1. train your brain to more easily parse most of the community code you encounter
35-
2. be able to copy and paste most community code examples without modification
36-
3. often find new hires are already accustomed to your preferred coding style, at least in regards to Vue
34+
1. 直面するコミュニティのコードを容易に理解できるように脳を慣れさせます。
35+
2. ほとんどのコミュニティのコードサンプルを変更なしにコピーして貼り付ける事ができます。
36+
3. 少なくとも Vue に関しては、ほとんどの場合、新たな人材はあなたのコーディングスタイルよりも既に慣れ親しんだものを好みます。
3737

3838
### Priority D: Use with Caution
3939

@@ -1313,114 +1313,114 @@ HTML では、空白を含まない属性値は引用符でくくらなくても
13131313

13141314

13151315

1316-
## Priority C Rules: Recommended (Minimizing Arbitrary Choices and Cognitive Overhead)
1316+
## 優先度 C のルール: 推奨 (任意の選択肢と認知上のオーバーヘッドの最小化)
13171317

13181318

13191319

1320-
### Component/instance options order <sup data-p="c">recommended</sup>
1320+
### コンポーネント/インスタンス オプション順序 <sup data-p="c">推奨</sup>
13211321

1322-
**Component/instance options should be ordered consistently.**
1322+
**コンポーネント/インスタンス オプションは、一貫した順序であるべきです。**
13231323

1324-
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.
1324+
これは推奨するコンポーネントオプションの既定の順序です。それらは種類分けされており、プラグインからどこに新たなプロパティを追加するか知ることができます。
13251325

1326-
1. **Side Effects** (triggers effects outside the component)
1326+
1. **副作用** (コンポーネント外への影響)
13271327
- `el`
13281328

1329-
2. **Global Awareness** (requires knowledge beyond the component)
1329+
2. **グローバルな認識** (コンポーネントを超えた知識が必要)
13301330
- `name`
13311331
- `parent`
13321332

1333-
3. **Component Type** (changes the type of the component)
1333+
3. **コンポーネントの種類** (コンポーネントの種類を変更)
13341334
- `functional`
13351335

1336-
4. **Template Modifiers** (changes the way templates are compiled)
1336+
4. **テンプレートの修飾子** (テンプレートのコンパイル方法を変更)
13371337
- `delimiters`
13381338
- `comments`
13391339

1340-
5. **Template Dependencies** (assets used in the template)
1340+
5. **テンプレートの依存関係** (テンプレートで使用されるアセット)
13411341
- `components`
13421342
- `directives`
13431343
- `filters`
13441344

1345-
6. **Composition** (merges properties into the options)
1345+
6. **合成** (プロパティをオプションにマージ)
13461346
- `extends`
13471347
- `mixins`
13481348

1349-
7. **Interface** (the interface to the component)
1349+
7. **インタフェース** (コンポーネントへのインタフェース)
13501350
- `inheritAttrs`
13511351
- `model`
13521352
- `props`/`propsData`
13531353

1354-
8. **Local State** (local reactive properties)
1354+
8. **ローカルの状態** (ローカル リアクティブ プロパティ)
13551355
- `data`
13561356
- `computed`
13571357

1358-
9. **Events** (callbacks triggered by reactive events)
1358+
9. **イベント** (リアクティブなイベントによって引き起こされたコールバック)
13591359
- `watch`
1360-
- Lifecycle Events (in the order they are called)
1360+
- ライフサイクルイベント (呼び出される順)
13611361

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

1365-
11. **Rendering** (the declarative description of the component output)
1365+
11. **レンダリング** (コンポーネント出力の宣言的な記述)
13661366
- `template`/`render`
13671367
- `renderError`
13681368

13691369

13701370

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

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

1375-
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.
1375+
これは推奨するコンポーネントオプションの既定の順序です。それらは種類分けされており、カスタム属性とディレクティブをどこに追加するか知ることができます。
13761376

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

1380-
2. **List Rendering** (creates multiple variations of the same element)
1380+
2. **リスト描画** (同じ要素の複数のバリエーションを作成する)
13811381
- `v-for`
13821382

1383-
2. **Conditionals** (whether the element is rendered/shown)
1383+
2. **条件** (要素が描画/表示されているかどうか)
13841384
- `v-if`
13851385
- `v-else-if`
13861386
- `v-else`
13871387
- `v-show`
13881388
- `v-cloak`
13891389

1390-
3. **Render Modifiers** (changes the way the element renders)
1390+
3. **描画修飾子** (要素の描画方法を変更)
13911391
- `v-pre`
13921392
- `v-once`
13931393

1394-
4. **Global Awareness** (requires knowledge beyond the component)
1394+
4. **グローバルな認識** (コンポーネントを超えた知識が必要)
13951395
- `id`
13961396

1397-
5. **Unique Attributes** (attributes that require unique values)
1397+
5. **一意の属性** (一意の値を必要とする属性)
13981398
- `ref`
13991399
- `key`
14001400
- `slot`
14011401

1402-
6. **Two-Way Binding** (combining binding and events)
1402+
6. **双方向バインディング** (バインディングとイベントの結合)
14031403
- `v-model`
14041404

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

1407-
8. **Events** (component event listeners)
1407+
8. **イベント** (コンポーネントのイベントリスナ)
14081408
- `v-on`
14091409

1410-
9. **Content** (overrides the content of the element)
1410+
9. **コンテンツ** (要素のコンテンツを上書きする)
14111411
- `v-html`
14121412
- `v-text`
14131413

14141414

14151415

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

1418-
**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.**
1418+
**特にオプションがスクロールなしでは画面に収まらなくなった場合、複数行に渡るプロバティの間に空行を追加してみてください。**
14191419

1420-
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.
1420+
コンポーネントに窮屈さや読みづらさを感じたら、複数行に渡るプロバティの間に空行を追加する事でそれらを簡単に読み流すことができるようになります。 Vim など、一部のエディタでは、このような書式を使用するとキーボードで簡単に移動することができます。
14211421

14221422
{% raw %}<div class="style-example example-good">{% endraw %}
1423-
#### Good
1423+
#### 良い例
14241424

14251425
``` js
14261426
props: {
@@ -1450,8 +1450,8 @@ computed: {
14501450
```
14511451

14521452
``` js
1453-
// No spaces are also fine, as long as the component
1454-
// is still easy to read and navigate.
1453+
// コンポーネントの読み取りや移動が容易であれば、
1454+
// 空行がなくても大丈夫です。
14551455
props: {
14561456
value: {
14571457
type: String,
@@ -1477,12 +1477,12 @@ computed: {
14771477

14781478

14791479

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

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

14841484
{% raw %}<div class="style-example example-bad">{% endraw %}
1485-
#### Bad
1485+
#### 悪い例
14861486

14871487
``` html
14881488
<style>/* ... */</style>
@@ -1504,7 +1504,7 @@ computed: {
15041504
{% raw %}</div>{% endraw %}
15051505

15061506
{% raw %}<div class="style-example example-good">{% endraw %}
1507-
#### Good
1507+
#### 良い例
15081508

15091509
``` html
15101510
<!-- ComponentA.vue -->

0 commit comments

Comments
 (0)
0