Skip to content

translated the "source code structure" into Japanese. #26

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 3 commits into from
Jul 1, 2017

Conversation

nasum
Copy link
Collaborator

@nasum nasum commented May 28, 2017

translated the "source code structure" into Japanese.

Copy link
Collaborator

@kazupon kazupon left a comment

Choose a reason for hiding this comment

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

レビュー 👀 しました。
レビューコメント 💬 の対応、よろしくお願いします!

ja/structure.md Outdated

## ステートフルなシングルトンは避ける

クライアント専用のコードを書くとき、私たちはコードが毎回新鮮なコンテキストで評価されるという事実に慣れています。しかし、 Node.js サーバーは長時間実行されるプロセスです。私たちのコードがプロセスに要求されるとき、それは一度評価されメモリにとどまります。つまりシングルトンのオブジェクトを作成したとき、それは全ての受信リクエスト間でシェアされると言うことです。
Copy link
Collaborator

Choose a reason for hiding this comment

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

fresh の訳ですが、新鮮ですと生き物のような気がするので、ここでは新しいでいいかと思います。

ja/structure.md Outdated

## ステートフルなシングルトンは避ける

クライアント専用のコードを書くとき、私たちはコードが毎回新鮮なコンテキストで評価されるという事実に慣れています。しかし、 Node.js サーバーは長時間実行されるプロセスです。私たちのコードがプロセスに要求されるとき、それは一度評価されメモリにとどまります。つまりシングルトンのオブジェクトを作成したとき、それは全ての受信リクエスト間でシェアされると言うことです。
Copy link
Collaborator

Choose a reason for hiding this comment

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

client-onlyの訳ですが、クライアント専用ですと文章的に違和感があるので、クライアントのみでいいと思います。

ja/structure.md Outdated

クライアント専用のコードを書くとき、私たちはコードが毎回新鮮なコンテキストで評価されるという事実に慣れています。しかし、 Node.js サーバーは長時間実行されるプロセスです。私たちのコードがプロセスに要求されるとき、それは一度評価されメモリにとどまります。つまりシングルトンのオブジェクトを作成したとき、それは全ての受信リクエスト間でシェアされると言うことです。

基本的な例としては、私たちは **リクエストごとに新しいルート Vue インスタンスを作成します**。それは各ユーザがそれぞれのブラウザでアプリの新鮮なインスタンスを使用することに似ています。もし私たちが複数のリクエストをまたいでインスタンスを共有すると、それは容易にクロスリクエスト状態の汚染につながるでしょう。
Copy link
Collaborator

Choose a reason for hiding this comment

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

ここのfresh新しいにしましょう!

ja/structure.md Outdated

クライアント専用のコードを書くとき、私たちはコードが毎回新鮮なコンテキストで評価されるという事実に慣れています。しかし、 Node.js サーバーは長時間実行されるプロセスです。私たちのコードがプロセスに要求されるとき、それは一度評価されメモリにとどまります。つまりシングルトンのオブジェクトを作成したとき、それは全ての受信リクエスト間でシェアされると言うことです。

基本的な例としては、私たちは **リクエストごとに新しいルート Vue インスタンスを作成します**。それは各ユーザがそれぞれのブラウザでアプリの新鮮なインスタンスを使用することに似ています。もし私たちが複数のリクエストをまたいでインスタンスを共有すると、それは容易にクロスリクエスト状態の汚染につながるでしょう。
Copy link
Collaborator

Choose a reason for hiding this comment

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

アプリは略称なのでアプリケーションにしておきましょう!

ja/structure.md Outdated

基本的な例としては、私たちは **リクエストごとに新しいルート Vue インスタンスを作成します**。それは各ユーザがそれぞれのブラウザでアプリの新鮮なインスタンスを使用することに似ています。もし私たちが複数のリクエストをまたいでインスタンスを共有すると、それは容易にクロスリクエスト状態の汚染につながるでしょう。

そのため、直接アプリのインスタンスを作成するのではなく、各リクエストで繰り返し実行される新しいアプリのインスタンスを作成するファクトリ関数を公開する必要があります:
Copy link
Collaborator

Choose a reason for hiding this comment

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

ここも同じく、アプリは略称なのでアプリケーションにしておきましょう!

ja/structure.md Outdated

これまでは、同じ Vue アプリケーションをクライアントへ配信する方法を論じてはいませんでした。これを行うには、webpack を使用して Vue アプリケーションをバンドルする必要があります。実際、webpack を使用して Vue アプリケーションをサーバーにバンドルしたいと思っているのはおそらく次の理由によるものです。

- 典型的な Vue アプリケーションは webpack と `vue-loader` によってビルドされ、 `file-loader` 経由でのファイルのインポートや`css-loader 経由でCSSをインポートなどの多くの webpack 固有の機能は Node.jsで直接動作しないため。`
Copy link
Collaborator

Choose a reason for hiding this comment

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

体現止めではなく、〜ですにしておきましょう〜

ja/structure.md Outdated

## Webpackによるコード戦略

webpack を使用してサーバーとクライアントのアプリケーションを処理しているので、ソースコードの大部分はユニバーサルに書かれており、すべての webpack の機能にアクセスできます。 同時に、ユニバーサルなコードを書くときに留意すべき[いくつかのことがあります。](./universal.md)
Copy link
Collaborator

Choose a reason for hiding this comment

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

a number of things の訳ですが、いくつかあります。にした方が自然ではないでしょうか。

ja/structure.md Outdated

### `entry-server.js`:

サーバーエントリはレンダリングごとに繰り返し呼び出すことができる関数をデフォルトでエクスポートします。現時点では、アプリケーションインスタンスを作成して返す以外のことはほとんど行いませんが、後でサーバーサイドのルートマッチングとデータプリフェッチロジックを実行します。The server entry uses a default export which is a function that can be called repeatedly for each render. At this moment, it doesn't do much other than creating and returning the app instance - but later when we will perform server-side route matching and data pre-fetching logic here.
Copy link
Collaborator

Choose a reason for hiding this comment

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

原文が残ってしまっているので、削除しましょう!

ja/structure.md Outdated
@@ -0,0 +1,114 @@
# ソースコード戦略
Copy link
Collaborator

Choose a reason for hiding this comment

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

Source Code Structureの訳ですが、このセクションでは、構造の説明なので、普通に ソースコードの構造でいいと思います。

ja/structure.md Outdated

セットアップの詳細については次のセクションで議論されます。今のところ、ビルドのセットアップが分かっていると仮定すると、webpack を有効にして Vue アプリコードを書くことが可能になっています。

## Webpackによるコード戦略
Copy link
Collaborator

Choose a reason for hiding this comment

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

ここタイトルのstructureも訳構造でいいと思います。

ja/structure.md Outdated
└── entry-server.js # runs on server only
```

### `app.js `
Copy link
Collaborator

Choose a reason for hiding this comment

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

app.js の後に半角スペースが入ってしまっているようです

Copy link
Collaborator

Choose a reason for hiding this comment

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

ここの半角スペース削除、お願いします!

@kazupon
Copy link
Collaborator

kazupon commented Jun 29, 2017

/ping @nasum
レビューコメント後に、コミットされていますが、もうマージしちゃっていいですか?

@kazupon kazupon merged commit 6dc3006 into open-source-translators:master Jul 1, 2017
sotayamashita pushed a commit to sotayamashita/vue-ssr-docs that referenced this pull request Sep 27, 2017
* Translate SUMMARY.md via GitLocalize

* Revert "Chinese Translation: zh/summary"

* Revert "Revert "Chinese Translation: zh/summary""

* Japanese Translation: ja/css.md (open-source-translators#19)

* Translate css.md via GitLocalize

* Translate css.md via GitLocalize

* Update css.md

Remove style closing tags

* Translate css.md via GitLocalize

* Update css.md

* Translate api.md via GitLocalize

* Translate streaming.md via GitLocalize (open-source-translators#22)

* Translate caching.md via GitLocalize (open-source-translators#23)

* Japanese Translation: ja/routing.md (open-source-translators#18)

* Translate routing.md via GitLocalize

* Translate routing.md via GitLocalize

* Translate universal.md via GitLocalize (open-source-translators#29)

* ja/api.md (open-source-translators#28)

* Translate api.md via GitLocalize

* Translate api.md via GitLocalize

* Translate api.md via GitLocalize

* Translate api.md via GitLocalize

* Translate build-config.md via GitLocalize (open-source-translators#27)

* Translate build-config.md via GitLocalize

* Translate build-config.md via GitLocalize

* Translate build-config.md via GitLocalize

* Japanese translation: bundle-renderer.md (open-source-translators#30)

* Translate bundle-renderer.md via GitLocalize

* Translate bundle-renderer.md via GitLocalize

* Translate basic.md (open-source-translators#32)

* Translate basic.md via GitLocalize

* Translate basic.md via GitLocalize

* Translate basic.md via GitLocalize

* Translate basic.md via GitLocalize

* Japanese Translation: ja/data.md (open-source-translators#25)

* Translate data.md via GitLocalize

* Translate data.md via GitLocalize

* Fix typos

* コード内のコメントを日本語に翻訳した

* コード内のコメントの意図をより明確にした

* expose はモジュールとしての公開するという意味なので訳を変更した

* 原文に ... とあるので一応残しておく

* "Client Side Hydration" の翻訳 (open-source-translators#36)

* Translate hydration.md via GitLocalize

* Translate hydration.md via GitLocalize

* Japanese Translation: ja/head.md (open-source-translators#33)

* Translate head.md via GitLocalize

* Translate head.md via GitLocalize

* expose はモジュールとして公開するという意味なので公開という言葉を使うようにした

* コードのコメントの翻訳が漏れていた

* Japanese Translation: ja/routing.md (open-source-translators#38)

* Translate routing.md via GitLocalize

* Translate routing.md via GitLocalize

* Japanese Translation: ja/caching.md (open-source-translators#37)

* Translate caching.md via GitLocalize

* Translate caching.md via GitLocalize

* translated the "source code structure" into Japanese. (open-source-translators#26)

* Translate structure.md via GitLocalize

* Translate structure.md via GitLocalize

* Translate structure.md via GitLocalize

* Japanese Translation: ja/SUMMARY.md (open-source-translators#35)

* Translate SUMMARY.md via GitLocalize

* hydration.md と合わせた

"Client Side Hydration" の翻訳 by hikimon · Pull Request open-source-translators#36 · open-source-translators/vue-ssr-docs
open-source-translators#36

* en/ に合わせてインデントを 2 にした

* Renderer 生成時の各オプションの階層を下げた。en/ でもそうなっている

* Japanese translation: readme.md (open-source-translators#39)

* Translate README.md via GitLocalize

* Translate README.md via GitLocalize
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.

3 participants