-
Notifications
You must be signed in to change notification settings - Fork 9
Japanese Translation: ja/data.md #25
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
Japanese Translation: ja/data.md #25
Conversation
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.
翻訳ありがとうございます! 👍
レビュー 👀 しました!
レビューコメント 💬 内容の対応お願いします!
ja/data.md
Outdated
|
||
SSR をしているとき、基本的にはアプリケーションの「スナップショット」をレンダリングしています、したがって、アプリケーションがいくつかの非同期データに依存している場合においては、**それらのデータを、レンダリング処理を開始する前にプリフェッチして解決する必要があります**。 | ||
|
||
もうひとつの重要なことは、クライアントサイドでアプリケーションがマウとされる前に、クライアントサイドで同じデータを利用可能である必要があるということです。そうしないと、クライアントサイドが異なるステートを用いてレンダリングしてしまい、ハイドレーションが失敗してしまいます。 |
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.
typo 見つけました。
マウ
-> マウント
ja/data.md
Outdated
|
||
もうひとつの重要なことは、クライアントサイドでアプリケーションがマウとされる前に、クライアントサイドで同じデータを利用可能である必要があるということです。そうしないと、クライアントサイドが異なるステートを用いてレンダリングしてしまい、ハイドレーションが失敗してしまいます。 | ||
|
||
この問題に対応するため、フェッチされたデータはビューコンポーネントの外でも存続している必要があります。つまり特定の用途のデータストアもしくは "ステート・コンテナ" に入っている必要があります。サーバーサイドではレンダリングする前にデータをプリフェッチしてストアの中に入れることができます。さらにシリアライズして HMTL にステートを埋め込みます。クライアントサイドのストアは、アプリケーションをマウントする前に、埋め込まれたステートを直接取得できます。 |
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.
typo 見つけました。
HMTL
-> HTML
レビューありがとうございます!タイポの修正と、またあわせてコード内のコメントの翻訳が終わりましたので確認お願いしますー 😄 |
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.
再度レビュー 👀 しました。
レビューコメント 💬 の確認お願いします!
ja/data.md
Outdated
// return the Promise via store.dispatch() so that we know | ||
// when the data has been fetched | ||
// store.dispatch() を使って Promise を返します | ||
// そうすればデータがフェッチされたときにそれを知ることができます |
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.dispatch() 経由でデータがフェッチされたときにそれを知るために、Promise を返します。
ここでのコメントの意図としては、fetchItem
アクションで Promise
を返すことで store.dispatch
側で Promise
の then
を使って、データがフェッチされたのをハンドリングできるということだと思います。
vuex のドキュメントこちらを参考になるかと思います。
https://vuex.vuejs.org/ja/actions.html#アクションを構成する
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.dispatch() 経由でデータがフェッチされたときにそれを知るために、Promise を返します。
をそのまま採用させてもらいます!
ja/data.md
Outdated
const app = new Vue({ | ||
router, | ||
store, | ||
render: h => h(App) | ||
}) | ||
// expose the app, the router and the store. | ||
// アプリケーション、ルーター、ストアを露出します |
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.
expose
は訳として一般的な 露出
よりは、モジュールとしての公開するということなので、公開
でいいと思います。
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.
なるほど、公開
に変更します
ja/data.md
Outdated
@@ -156,31 +155,31 @@ if (window.__INITIAL_STATE__) { | |||
|
|||
```js | |||
// entry-client.js | |||
// ...omitting unrelated code | |||
// 関係のないコードは除外します |
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.
了解ですー
それと、コードのコメントの訳もありがとうございます!👍 今回のSSRの翻訳はコードのコメントの方は、GitLocalizeがコードのコメントが翻訳できるようになってから実施しようと思っていました。 こちらでお伝え忘れてしまい、貴重な時間を費やしてしまって申し訳ないです。 🙇 せっかく訳して頂いたので、このdata.mdについては取り込みたいと思います。 :) |
修正が遅くなってしまいすみません、指摘いただいた点、対応しましたので確認お願いしますー 🙏 |
ありがとうございました! 👍 |
* 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
"Data Pre-fetching and State" の翻訳 ・ Issue #6 ・ open-source-translators/vue-ssr-docs について翻訳作業を行いました。レビューをお願いします!