Skip to content
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

Translate v2 docs in Japanese. #428

Merged
merged 83 commits into from
Dec 5, 2016
Merged

Translate v2 docs in Japanese. #428

merged 83 commits into from
Dec 5, 2016

Conversation

kitak
Copy link
Contributor

@kitak kitak commented Oct 29, 2016

TODO


1. Vuex ストアはリアクティブです。 Vue コンポーネントがストアから状態を取り出すとき、もしストアの状態が変化したら、ストアはリアクティブかつ効率的に更新を行います。

2. ストアの状態を直接変更することはできません。明示的に**ミューテーションをコミットする**ことによってのみ、ストアの状態を変更します。これによって、全ての状態の変更について追跡可能な記録を残すことが保証され、ツールでのアプリケーションの動作の理解を助けます。
Copy link

@inouetakuya inouetakuya Nov 11, 2016

Choose a reason for hiding this comment

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

@kitak @tadyjp

  1. You cannot directly mutate the store's state. The only way to change a store's state is by explicitly committing mutations. This ensures every state change leaves a track-able record, and enables tooling that helps us better understand our applications.

I am not really sure about the translation of "committing mutations".

Which do you think is the best?

  • ミューテーションをコミットする
  • ミューテーションを送る
  • another idea?

Copy link
Member

Choose a reason for hiding this comment

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

メソッド名と対応しているので「ミューテーションをコミットする」が良いと思います。

Choose a reason for hiding this comment

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

ありがとうございます!「ミューテーションをコミットする」でいこうと思います!

@inouetakuya
Copy link

@kitak Modules(modules.md) の翻訳やりたいですー

Copy link

@kimikimi714 kimikimi714 left a comment

Choose a reason for hiding this comment

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

翻訳しながら理解できなかった部分について自分でコメントを書きました。フィードバックよろしくお願いします。

rootState // store.state と同じ
```

登録されたゲッターは `store.getters` 上で外から見えるようになります。

Choose a reason for hiding this comment

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

exposeをどう訳すと良いかがわからず「外から見える」と訳しています

Copy link
Contributor Author

Choose a reason for hiding this comment

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

「公開されます」はどうでしょうか?

Choose a reason for hiding this comment

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

なるほど!そのほうがしっくりきますね。修正します。


- **`dispatch(mutationName: String, ...args) | dispatch(mutation: Object)`**

アクションをディスパッチします。すべてのトリガーされたアクションハンドラを解決するプロミスを返します。[詳細](actions.md)

Choose a reason for hiding this comment

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

上の他の方の翻訳例を見るとPromiseはPromiseのままのようなので、そちらに合わせるよう修正します。


- **`mapActions(map: Array<string> | Object): Object`**

アクションをディスパッチするコンポーネントメソッドオプションを作成します。[詳細](actions.md#dispatching-actions-in-components)

Choose a reason for hiding this comment

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

component methods optionsという単語ひとかたまりかと思って訳してしまっているのですが、間違っている気がしています…。

Copy link
Member

Choose a reason for hiding this comment

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

コンポーネントのメソッドオプションでどうでしょうか?

Choose a reason for hiding this comment

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

確かに、そのほうが何のことかがもう少しわかりやすくなりますね。修正します。

Copy link
Contributor Author

Choose a reason for hiding this comment

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

いっそのこと、メソッドはプロパティ名のままで コンポーネントの methods オプションとかどうでしょうか。

Choose a reason for hiding this comment

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

なるほどです。無理に全部日本語にしようとしないほうがわかりやすそうですね。
コンポーネントの methods オプション で修正します。


- **`replaceState(state: Object)`**

ストアのルートステートを置き換えます。これは、ステートの水和やタイムトラベルのためだけに利用すべきです。

Choose a reason for hiding this comment

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

hydrationの訳もどうしていいものかわかりませんでした。
直訳だと水和であってると思うのですが、何かのジョークなのか?とも思ってよくわからないですね…。

Copy link
Member

Choose a reason for hiding this comment

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

hydration はハイドレーションでいいと思います。Server Side Rendering の用語です。


- 型: `Object`

Vuex store のための ルートステートオブジェクトです。
Copy link
Member

Choose a reason for hiding this comment

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

他の方の翻訳ではストアと書かれてるので、 s/store/ストア/ していただけますか?

Choose a reason for hiding this comment

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

確かに。1.0のときにままにしていました。置き換えます。


- 型: `{ [type: string]: Function }`

Vuex storeにミューテーションを登録します。ハンドラ関数は第一引数に `state` を常に受け取り(またモジュール内で定義されていれば、ローカルステートをモジュール化し)、指定されていれば第二引数に `payload` を受け取ります。
Copy link
Member

Choose a reason for hiding this comment

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

ローカルステートをモジュール化し

「モジュールのローカルステートを受け取り」が原文の意味として正しいですね。

Choose a reason for hiding this comment

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

確かに be moduled ではないですね。修正します。


``` js
{
state, // store.state と同じか, or モジュール内にあればローカルステート
Copy link
Member

Choose a reason for hiding this comment

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

or はとりましょう!

Choose a reason for hiding this comment

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

消し忘れていました…。消します。

Vuex storeにゲッターを登録します. ゲッター関数は次の引数を受け取ります:

```
state, // モジュール内で定義されていればローカルステートをモジュール化します
Copy link
Member

Choose a reason for hiding this comment

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

ローカルステートをモジュール化します

「モジュールのローカルステートとなります」が原文の意味として正しいですね。

}
```

各モジュールは、ルートオプションに似た `state` と `mutations` を含むことができます。モジュールの状態は、モジュールのキーを使って、ストアのルートステートにアタッチされます。モジュールのミューテーションとゲッターは、第一引数としてルートステートの代わりに、モジュールのローカルステートだけを受け取り、モジュールのアクションの `context.state` もローカルステートを指すようになります。
Copy link
Member

Choose a reason for hiding this comment

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

アタッチされます

結合されます。とかでどうでしょうか?

store.subscribe((mutation, state) => {
console.log(mutation.type)
console.log(mutation.payload)
})
Copy link
Member

Choose a reason for hiding this comment

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

インデントが微妙にずれてますね。

})
```

もっともよく利用されるプラグインです。[詳細](plugins.md)
Copy link
Member

Choose a reason for hiding this comment

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

Most commonly used in plugins
なので、プラグイン内でよく使われると言う意味になります。


- **`hotUpdate(newOptions: Object)`**

新しいアクションとミューテーションでホットスワップします。[詳細](hot-reload.md)
Copy link
Member

Choose a reason for hiding this comment

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

こまかいですが、new actions and mutations は目的格なので ではなく だと思います。

Choose a reason for hiding this comment

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

確かに はおかしいですね。修正します。


- **`mapState(map: Array<string> | Object): Object`**

Vuex storeのサブツリーを返すオプションを計算したコンポーネントを作成します。[詳細](state.md#the-mapstate-helper)
Copy link
Member

Choose a reason for hiding this comment

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

Create component computed options

は「コンポーネントの算出プロパティオプションを作成する」で、

that return the sub tree of the Vuex store

はそのオプションが「Vuex ストアのサブツリーを返す」ことを意味しています。


- **`mapGetters(map: Array<string> | Object): Object`**

ゲッターの評価後の値を返すオプションを計算したコンポーネントを作成します。[詳細](getters.md#the-mapgetters-helper)
Copy link
Member

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.

下の methods と合わせて computed オプションにしても良いかもしれません

Choose a reason for hiding this comment

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

なるほど。上のコメントも合わせてありがとうございます。
computedオプションにしてしまおうと思います。

Copy link

@kimikimi714 kimikimi714 left a comment

Choose a reason for hiding this comment

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

コメントをいただいた部分の修正を行いました。ご確認よろしくお願いします。


``` js
{
state, // store.state と同じか, or モジュール内にあればローカルステート

Choose a reason for hiding this comment

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

消し忘れていました…。消します。


- 型: `Object`

Vuex store のための ルートステートオブジェクトです。

Choose a reason for hiding this comment

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

確かに。1.0のときにままにしていました。置き換えます。


- 型: `{ [type: string]: Function }`

Vuex storeにミューテーションを登録します。ハンドラ関数は第一引数に `state` を常に受け取り(またモジュール内で定義されていれば、ローカルステートをモジュール化し)、指定されていれば第二引数に `payload` を受け取ります。

Choose a reason for hiding this comment

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

確かに be moduled ではないですね。修正します。


ストアのルートステートを置き換えます。これは、ステートの水和やタイムトラベルのためだけに利用すべきです。

- **`watch(getter: Function, cb: Function, [options: Object])`**

Choose a reason for hiding this comment

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

https://github.com/vuejs/vuex/blob/dev/docs/en/api.md
でも (state: Object) になっているように思いますが、間違っていますでしょうか?

下の options?: Object にならないといけないところですね。失礼いたしました。修正します。


- **`hotUpdate(newOptions: Object)`**

新しいアクションとミューテーションでホットスワップします。[詳細](hot-reload.md)

Choose a reason for hiding this comment

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

確かに はおかしいですね。修正します。

```

もっともよく利用されるプラグインです。[詳細](plugins.md)
プラグインの中でももっともよく利用されます。[詳細](plugins.md)
Copy link
Member

Choose a reason for hiding this comment

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

何度もすみません。この訳だと、 subscribe ∈ プラグイン という意味になってしまうと思います。
この文で言いたいのは、この subscribe メソッドの使い道として、それぞれの Vuex プラグインの中で使われることを想定しているということなので、中でも ではなく 中で が良いんじゃないかと思います。

Choose a reason for hiding this comment

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

なるほど!完全に勘違いしていました!
プラグイン内で利用されることがある、ということですね…。
修正します。

@kitak kitak changed the title [WIP] Translate v2 docs in Japanese. Translate v2 docs in Japanese. Dec 4, 2016
@kitak
Copy link
Contributor Author

kitak commented Dec 4, 2016

Could you please merge it?

@ktsn
Copy link
Member

ktsn commented Dec 5, 2016

@kitak @inouetakuya @tadyjp @kimikimi714
Thanks for your hard work!
Can we add README.md and book.json for Japanese docs for our final task? :)
Make sure to merge latest dev branch into yours since there are a few update for docs.

@kitak
Copy link
Contributor Author

kitak commented Dec 5, 2016

@ktsn

OK. I've done them.

@ktsn
Copy link
Member

ktsn commented Dec 5, 2016

Thanks! I'm merging this.

@ktsn ktsn merged commit 730deb7 into vuejs:dev Dec 5, 2016
@ktsn
Copy link
Member

ktsn commented Dec 5, 2016

Deployed 🎉 https://vuex.vuejs.org/ja/

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.

8 participants