-
Notifications
You must be signed in to change notification settings - Fork 126
「Tutorial > Declarative Rendering」の翻訳 #364
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
「Tutorial > Declarative Rendering」の翻訳 #364
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.
レビューしました。
2箇所修正をお願いします:pray:
@jay-es |
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.
レビュー 👀 コメント 💬 しました。
確認お願いします。
``` | ||
|
||
`reactive()` only works on objects (including arrays and built-in types like `Map` and `Set`). `ref()`, on the other hand, can take any value type and create an object that exposes the inner value under a `.value` property: | ||
`reactive()` はオブジェクト(配列や `Map` や `Set` のような組み込み型も含む)に対してのみ動作します。一方、`ref()` は、任意の値の型を取り、`.value` プロパティの下で内部の値を公開するオブジェクトを作成することができます。: |
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.
文章の最後にある :
は、翻訳に対応させるときは、読点。
+ :
ではなく、:
で大丈夫です。
`reactive()` はオブジェクト(配列や `Map` や `Set` のような組み込み型も含む)に対してのみ動作します。一方、`ref()` は、任意の値の型を取り、`.value` プロパティの下で内部の値を公開するオブジェクトを作成することができます。: | |
`reactive()` はオブジェクト(配列や `Map` や `Set` のような組み込み型も含む)に対してのみ動作します。一方、`ref()` は、任意の値の型を取り、`.value` プロパティの下で内部の値を公開するオブジェクトを作成することができます: |
<div class="sfc"> | ||
|
||
Reactive state declared in the component's `<script setup>` block can be used directly in the template. This is how we can render dynamic text based on the value of the `state` object and `message` ref, using mustaches syntax: | ||
コンポーネントの `<script setup>` ブロックで宣言されたリアクティブステートはテンプレートで直接使用することができます。このようにして、mustaches 構文を使い、 `state` オブジェクトと `message` ref の値に基づいて動的なテキストをレンダリングすることができます。: |
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.
:
同じく。
コンポーネントの `<script setup>` ブロックで宣言されたリアクティブステートはテンプレートで直接使用することができます。このようにして、mustaches 構文を使い、 `state` オブジェクトと `message` ref の値に基づいて動的なテキストをレンダリングすることができます。: | |
コンポーネントの `<script setup>` ブロックで宣言されたリアクティブステートはテンプレートで直接使用することができます。このようにして、mustaches 構文を使い、 `state` オブジェクトと `message` ref の値に基づいて動的なテキストをレンダリングすることができます: |
<div class="html"> | ||
|
||
The object being passed to `createApp()` is a Vue component. A component's state should be declared inside its `setup()` function, and returned using an object: | ||
`createApp()` に渡されるオブジェクトは Vue のコンポーネントです。コンポーネントの状態は、その `setup()` 関数内で宣言され、オブジェクトを使用して返される必要があります。: |
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.
:
同じく。
`createApp()` に渡されるオブジェクトは Vue のコンポーネントです。コンポーネントの状態は、その `setup()` 関数内で宣言され、オブジェクトを使用して返される必要があります。: | |
`createApp()` に渡されるオブジェクトは Vue のコンポーネントです。コンポーネントの状態は、その `setup()` 関数内で宣言され、オブジェクトを使用して返される必要があります: |
``` | ||
|
||
Properties in the returned object will be made available in the template. This is how we can render dynamic text based on the value of `message`, using mustaches syntax: | ||
返されたオブジェクトのプロパティはテンプレートで利用できるようになります。このようにして、mustaches 構文を使い、 `message` の値に基づいて動的なテキストをレンダリングすることができます。: |
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.
:
同じく。
返されたオブジェクトのプロパティはテンプレートで利用できるようになります。このようにして、mustaches 構文を使い、 `message` の値に基づいて動的なテキストをレンダリングすることができます。: | |
返されたオブジェクトのプロパティはテンプレートで利用できるようになります。このようにして、mustaches 構文を使い、 `message` の値に基づいて動的なテキストをレンダリングすることができます: |
</div> | ||
|
||
The content inside the mustaches is not limited to just identifiers or paths - we can use any valid JavaScript expression: | ||
mustaches の内側の内容は識別子やパスに限られません。有効な JavaScript の式であれば何でも使うことができます。: |
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.
:
同じく。
mustaches の内側の内容は識別子やパスに限られません。有効な JavaScript の式であれば何でも使うことができます。: | |
mustaches の内側の内容は識別子やパスに限られません。有効な JavaScript の式であれば何でも使うことができます: |
@kazupon |
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.
修正ありがとうございます!:pray:
kazupon さんの箇所も直っているのでマージします
* translated tutorial step2 * レビュー指摘箇所の修正 * :の前の。は不要なので削除
This reverts commit 7c405d4.
resolve #92