-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Update ja document #240
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
Update ja document #240
Conversation
Thanks! Is this for 1.0 or 2.0? |
This is for 1.0. |
- [Vuex とは何か](intro.md) | ||
- [Vuex 入門](getting-started.md) | ||
- [チュートリアル](tutorial.md) | ||
- コアコンセプト | ||
- [ステート](state.md) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
英語では、State and Getters
となっていますね。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙇
|
||
大規模アプリケーションで状態を共有させるために優れた対処として、**コンポーネントのローカル状態**と**アプリケーションレベルの状態**を区別する必要があります。アプリケーション状態は特定のコンポーネントに属していませんが、私達のコンポーネントはリアクティブな DOM 更新のためにそれを監視できます。1 つの場所でそれを集中的に管理することによって、あるコンポーネントがそこに属する必要よりも全てに影響を与えるため、もはやイベントあちこちを渡す必要はありません。加えて、私達は、記録と状態変化の理解を容易にするための全ての変異を検査することができ、タイムトラベルデバッグのような派手なものも実装可能です。 | ||
大規模アプリケーションで状態を共有をより良く対処するために、**コンポーネント内部の状態**と**アプリケーションレベルの状態**を区別する必要があります。アプリケーションレベルの状態状態は特定のコンポーネントに属していませんが、私達のコンポーネントはリアクティブな DOM 更新のためにまだそれを監視することができます。ひとつの場所で一元的にそれを管理することによって、複数のコンポーネントに影響を与えるすべてがそこに属している必要があるので、もはやイベントをあちこちに渡す必要はありません。加えて、全ての変更の記録と検査をおこなうことで、状態変化の理解を容易にし、さらに、タイムトラベルデバッグのようなお洒落な機能も実装できます。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「アプリケーションレベルの状態状態」になってます……!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙇
|
||
Vuex は Vue.js アプリケーションで集中状態管理するためのアプリケーションアーキテクチャです。[Flux](https://facebook.github.io/flux/) や [Redux](https://github.com/rackt/redux) からインスピレーションを得ていますが、 簡易化された概念、そして Vue.js リアクティブシステムの長所を得るために、特別に設計された実装になっています。 | ||
Vuex は Vue.js アプリケーションで状態を一元的に管理するためのアプリケーションアーキテクチャです。[Flux](https://facebook.github.io/flux/) や [Redux](https://github.com/rackt/redux) にインスパイアされていますが、 それよりも単純化された概念を持ち、Vue.js のリアクティブシステムの長所を生かすために、特別に設計された実装になっています。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
が、 それよりも
- それよりの前にある半角スペース1個は消しても良さそうです。
持ち、Vue.js のリアクティブシステムの
- Vue.jsの先頭には半角スペース1個が必要です。
|
||
### Vue コンポーネントにおいて Vuex ステートを取得する | ||
`state` オブジェクトは、Vue インスタンスに渡される `data` オブジェクトに似ており、一度 Vuex store に渡され、[Vue のリアクティブシステム](http://vuejs.org/guide/reactivity.html) によってリアクティブになります。これは、Vue コンポーネントにバインディングする Vuex state は、算出プロパティ (computed property) の中からそれを返すのと同じくらい簡単なことを意味します: | ||
### Vue コンポーネント で Vuex ステート を取得する |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「Get X into Y」 で 「X を Y に入れる」なので、すこし意味が違っているように見えますねー。
Vue コンポーネントを_つかって_ Vuex ステートを取得するような印象を受けます。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
「Vuex の状態を Vue コンポーネントに入れる」と修正しました
|
||
### 単純なアクション |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
非同期
という用語は、原文の方では、asynchronous
という用語が bold されているので、同じく bold が必要です。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
おっと、抜けていましたね。ありがとうございますー。
@@ -1,6 +1,6 @@ | |||
# ミューテーション | |||
|
|||
Vuex のミューテーションは基本的にイベントです。各ミューテーションは**名前**と**ハンドラ**を持ちます。ハンドラ関数は常に全体のステートツリーを第1引数として取得します: | |||
Vuex のミューテーションは本質的にイベントです。各ミューテーションは**名前**と**ハンドラ**を持ちます。ハンドラ関数は常に Vuex のstateを第1引数として取得します: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
日本語訳ガイドラインに沿う場合、state
の前後に半角スペースを入れるといいでしょう。
2. ミューテーションハンドラだけステートを変異できます | ||
3. ミューテーションは同期でなければなく、そしてそれらを作成するだけの副作用はミューテーションとステートになるべきです | ||
4. データフェッチングのような全ての非同期ロジックはアクションで実行されるべきです | ||
1. アプリケーションステートは単一オブジェクトとして、ストアで保持されます |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
次の項目2.
で state
の訳状態
とでてきているのですが、それに合わせると、アプリケーションステート
ではなく、アプリケーションの状態
の方が、ドキュメント読んでいて違和感が無いような気がしました。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
たしかにそうですね。アプリケーションステート
に統一します。
|
||
新しいアクションとミューテーションによって `store.hotUpdate()` として呼び出すのと同じくらい簡単です: | ||
ミューテーションとモジュールに対して、`store.hotUpdate()` API method を利用する必要があります: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"API store.hotUpdate()
メソッド"とかどうでしょう?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙆
We have finished translation. |
Please merge this branch. |
@kitak sorry, have been ignoring this email chain because there was a lot of WIP noise, just noticed it's done! |
* upstream/master: (52 commits) Update ja document (vuejs#240) small word correction (vuejs#257) Modify type files to external module definition format to publish them via npm (vuejs#242) update docs for 1.0-rc.2 Fix typo of docs (vuejs#238) [release] 1.0.0-rc.2 [build] 1.0.0-rc.2 improve type test for subscribe update type definition for subscribe store.on(mutation) -> store.subscribe Update types for nested modules (vuejs#235) update plugins doc [release] 1.0.0-rc [build] 1.0.0-rc ignore explorations Update declaration (vuejs#218) add renamed logger include events methods in api reference expose replaceState() docs ...
TODO