Skip to content

Translation for Japanese #95

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 70 commits into from
Oct 19, 2017
Merged

Translation for Japanese #95

merged 70 commits into from
Oct 19, 2017

Conversation

kazupon
Copy link
Member

@kazupon kazupon commented Oct 13, 2017

related #58
based on translation by @sunecosuri (thanks!)

/cc @sunecosuri @re-fort
もし、可能でしたらレビューお願いできますか?

})
})

it('calls store action actionInput when input value is input and an input even is fired', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

私も見逃していましたが、ここは翻訳しないのが一般的なんでしょうか…?
it('で検索かけるとそれなりにヒットするので、もしVueの翻訳ドキュメントの規約に沿って意図して翻訳していないなどであればそのままで大丈夫かと思います。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

コード内のコメントは訳していますが、この部分はテストのコードの一部なのでしなくても大丈夫です。

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be calls store action actionInput when input value is input and an input event is fired

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh... I could not notice. 👀
Thanks!

@kazupon kazupon mentioned this pull request Oct 13, 2017
Copy link
Contributor

@re-fort re-fort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've reviewed😃


### マウンティングコンポーネント

`vue-test-utils` は Vue コンポーネントを隔離してマウントし、必要な入力(プロパティ、注入、そしてユーザイベント)をモックにし出力されたものを検証することで結果を出力します。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's missing translation.
The original text: (render result, emitted custom events)
https://github.com/vuejs/vue-test-utils/blame/dev/docs/en/guides/getting-started.md#L42


### `nextTick` はどうですか?

Vue バッチは DOM 更新を保留し、非同期的に適用して、複数のデータのミューテーションに起因する不要な再描画を防ぎます。実際には、Vue が何らかの状態変更をトリガした後に Vue が実際の DOM 更新を実行するまで待つために、`Vue.nextTick` を使用しなければならないからです。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/Vue バッチは DOM 更新を保留し/Vue は保留した DOM 更新をまとめて処理し

// イベント数を検証する
expect(wrapper.emitted().foo.length).toBe(2)

// イベントを含んでいるか検証する
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/イベントを含んでいるか検証する/イベントのペイロードを検証する


多くの一般的な JavaScript テストランナがあり、`vue-test-utils` はそれらすべてで動作します。テストランナにとらわれません。

テストランナを選択する際には、機能セット、パフォーマンス、および単一ファイルコンポーネント (SFC) の事前コンパイルのサポートが考慮されます。既存のライブラリを慎重に比較した上で、以下の2つのテストランナをお勧めします:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/テストランナを選択する際には、機能セット、パフォーマンス、および単一ファイルコンポーネント (SFC) の事前コンパイルのサポートが考慮されます。/ですが、テストランナを選択する際には、機能セット、パフォーマンス、および単一ファイルコンポーネント (SFC) の事前コンパイルのサポートなどを考慮すべきです。


テストランナを選択する際には、機能セット、パフォーマンス、および単一ファイルコンポーネント (SFC) の事前コンパイルのサポートが考慮されます。既存のライブラリを慎重に比較した上で、以下の2つのテストランナをお勧めします:

- [Jest](https://facebook.github.io/jest/docs/en/getting-started.html#content) は最も充実したテストランナです。最小の設定が必要で、デフォルトで JSDOM を設定し、組み込みの検証を提供し、コマンドラインのユーザーエクスペリエンスが優れています。ただし、テストで SFC コンポーネントをインポートできるようにするには、プリプロセッサが必要です。最も一般的な SFC 機能を処理できる `jest-vue` プリプロセッサを作成しましたが、現在 `vue-loader` に 100% の機能パリティを持っていません。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/vue-loader に 100% の機能パリティを持っていません。/vue-loader と 100% 同じ機能を持っていません。

}
```

> デフォルトでは、`babel-jest` はインストールされている間自動的に設定します。しかし、`*.vue` ファイルのための変換を明示的に追加したため、`babel-jest` も明示的に設定する必要があります。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/インストールされている間/インストールしさえすれば


ここでは何が起こっているでしょうか?まず、Vue に `Vue.use` メソッドを使用して Vuex を使用するように指示しています。これは、単なる `Vue.use` のラッパです。

次に、新しい `Vuex.store` をモックされた値で呼び出すことによってモックストアを呼び出します。それは全て気にすることであるので、それをアクションに渡すだけです。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/次に、新しい Vuex.store をモックされた値で呼び出すことによってモックストアを呼び出します。それは全て気にすることであるので、それをアクションに渡すだけです。/次に、新しい Vuex.store をモックした値で呼び出すことによってモックのストアを作成します。それをアクションに渡すだけです。それが気にしなければならないことの全てだからです。


アクションのスタブが期待どおりに呼び出されたことを検討することができます。

今、ストアを定義する方法が、あなたには少し外に見えるかもしれません。
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/外に/異質に

@kazupon
Copy link
Member Author

kazupon commented Oct 16, 2017

@re-fort
レビューありがとうございました!
こちら修正しました!

@kazupon
Copy link
Member Author

kazupon commented Oct 18, 2017

@re-fort
レビュー、いつもありがとうございます!
fix しました!

Copy link
Contributor

@re-fort re-fort left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kazupon
🙆🙆🙆

@kazupon
Copy link
Member Author

kazupon commented Oct 18, 2017

@eddyerburgh
Done!
You can merge at any time. 🚀

@eddyerburgh eddyerburgh merged commit 5fa01e6 into vuejs:dev Oct 19, 2017
@eddyerburgh
Copy link
Member

Thanks guys, great job 🙂

@kazupon kazupon deleted the translate-ja branch October 19, 2017 06:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants