-
Notifications
You must be signed in to change notification settings - Fork 181
Translate React top page #55
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
Changes from 3 commits
066455d
0d6cbf2
ee13dc6
f85e2c8
8aaf94d
57a873d
436af93
512f32b
4715c93
f12171d
c39c6d3
72f2148
f686a72
a7e8afc
f175cf9
b568ec4
6ee5aac
207a3ce
837fff1
1b10e12
3592167
5377b37
63a4379
00a4540
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,10 @@ | ||
--- | ||
title: A Component Using External Plugins | ||
title: 外部プラグインを使用する Component | ||
order: 3 | ||
domid: markdown-example | ||
--- | ||
|
||
React is flexible and provides hooks that allow you to interface with other libraries and frameworks. This example uses **remarkable**, an external Markdown library, to convert the `<textarea>`'s value in real time. | ||
React は柔軟性が高いので、 | ||
React 以外のライブラリやフレームワークとやり取りをするためのフックを提供しています。 | ||
superyusuke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
次の例では Markdown の外部ライブラリである **remarkable** を使用しています。 | ||
`<textarea>` に入力された値をリアルタイムに HTML へと変換しています。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
--- | ||
title: A Simple Component | ||
title: シンプルな Component | ||
superyusuke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
order: 0 | ||
domid: hello-example | ||
--- | ||
|
||
React components implement a `render()` method that takes input data and returns what to display. This example uses an XML-like syntax called JSX. Input data that is passed into the component can be accessed by `render()` via `this.props`. | ||
React コンポーネントを作成する場合には `render()` メソッドを実装します。このメソッドは、受け取った input データを元に、表示する内容を返す役割を担当します。次の例では JSX と呼ばれる XML に似た構文を使っています。コンポーネントに渡された input データを `this.props` で参照し、`render()` の中で使用しています。 | ||
superyusuke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
**JSX is optional and not required to use React.** Try the [Babel REPL](babel://es5-syntax-example) to see the raw JavaScript code produced by the JSX compilation step. | ||
**React を使う際に JSX を必ず使わなくてはいけないわけではありません。** JSX のコンパイルによって生成される生の JavaScript コードを見るには、[Babel REPL](babel://es5-syntax-example) を参照してください。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: A Stateful Component | ||
title: 状態を持つことのできる Component | ||
smikitky marked this conversation as resolved.
Show resolved
Hide resolved
|
||
order: 1 | ||
domid: timer-example | ||
--- | ||
|
||
In addition to taking input data (accessed via `this.props`), a component can maintain internal state data (accessed via `this.state`). When a component's state data changes, the rendered markup will be updated by re-invoking `render()`. | ||
コンポーネントは、入力されたデータを受け取るだけではなく(受け取ったデータは `this.props` で参照することができます)コンポーネント独自の内部状態を持つこともできます。(これは `this.state` で参照することができます)状態が変化した場合には、`render()` が再度実行され、描画されるマークアップの内容が更新されます。 | ||
superyusuke marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
title: An Application | ||
title: アプリケーションの実例 | ||
order: 2 | ||
domid: todos-example | ||
--- | ||
|
||
Using `props` and `state`, we can put together a small Todo application. This example uses `state` to track the current list of items as well as the text that the user has entered. Although event handlers appear to be rendered inline, they will be collected and implemented using event delegation. | ||
`props` and `state` を組み合わせることで、ちょっとした Todo アプリケーション を作ることができます。次の例では `state` を用いて、現在の Todo リストのアイテムの状態を追跡しています。それからユーザーが入力したテキストに関しても `state` で管理しています。イベントハンドラは、それが書かれた要素内部にレンダーされるように一見思われますが、実際にはこれらのハンドラは集められて、イベントデリゲーションを用いて実装されます。 | ||
superyusuke marked this conversation as resolved.
Show resolved
Hide resolved
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,8 +1,8 @@ | ||||||
--- | ||||||
title: Component-Based | ||||||
title: Component-Based / コンポーネントベース | ||||||
superyusuke marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
order: 1 | ||||||
--- | ||||||
|
||||||
Build encapsulated components that manage their own state, then compose them to make complex UIs. | ||||||
自分自身の状態を管理するカプセル化されたコンポーネントをまず作成し、これらを組み合わせることで複雑なユーザーインターフェイスを構築します。 | ||||||
superyusuke marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
|
||||||
Since component logic is written in JavaScript instead of templates, you can easily pass rich data through your app and keep state out of the DOM. | ||||||
コンポーネントのロジックは、Template ではなく JavaScript そのもので書くことができるので、様々な形式のデータをアプリケーションに対して簡単に渡すことができ、それでいて DOM に状態を持たせないようにすることができます。 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
"to your app" ではなく "through your app" です There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. @superyusuke の訳を支持します。 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. この pass の用法ですが、weblio にこれと似た例が載っていました。
すなわち "pass rich data through your app" とは app の外から app にデータを渡すことではなく、app 内にデータを通過させること、データを行きわたらせることです。React においてこれは主に、コンポーネント間で prop を「受け渡す」フローによって実現することです。 これがあくまでトップページの宣伝文句であることを考慮しつつ、もし自分でゼロから書く場合、「リッチなデータをアプリ内に行きわたらせて DOM から状態を取り除けます」くらいで済ませると思います。(「rich data」はドキュメント全体を検索してもここだけで出現する、トップページだからこそ使われる語感優先のフレーズなので、具体的用語で置き換えるのが本当に良いのか疑問に感じたため、残してみました) There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. IMO: ここまでの意見も読ませていただいた上で、 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @takanorip ありがとうございます。Context側と翻訳を合わせようとは全くしてないですね、Contextの方は「ツリーを通して」「ツリーの各階層で」などとなっており、それらはそれらで正しいと思います。ただ訳し方がどうあれ through に「貫く」のニュアンスがあるのは確かなので、それを無視して訳すのは如何か、という話です。リッチについては「豊富な形式の」は少しポジティブさが出るので折衷案として良いと思います。 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. 「豊富な」「取り回す」はどちらも思いつかなかったですが、私も良いと思います。以下の感じで如何でしょう。 「豊富な形式のデータをアプリケーション内で簡単に取り回して、DOM が状態を持たないようにできます」 (コンマもない and であり「~ができ、かつ~ができます」のような独立した2項目にしなくても自然に繋がるので、いわゆる te-form で直に繋げました) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
title: Declarative | ||
title: Declarative / 宣言的な View | ||
superyusuke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
order: 0 | ||
--- | ||
|
||
React makes it painless to create interactive UIs. Design simple views for each state in your application, and React will efficiently update and render just the right components when your data changes. | ||
React は、インタラクティブなユーザーインターフェイスの作成にともなう苦痛を取り除きます。アプリケーションの各状態に対応するシンプルな View を設計するだけで、React は状態用のデータの変更を検知し、関連するコンポーネントだけを効率的に更新、描画します。 | ||
superyusuke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
Declarative views make your code more predictable and easier to debug. | ||
宣言的な View を用いてアプリケーションを構築することで、コードはより見通しが立ちやすく、デバッグのしやすいものになります。 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
--- | ||
title: Learn Once, Write Anywhere | ||
title: Learn Once, Write Anywhere / 一度学習すれば、どこでも使える | ||
smikitky marked this conversation as resolved.
Show resolved
Hide resolved
|
||
order: 2 | ||
--- | ||
|
||
We don't make assumptions about the rest of your technology stack, so you can develop new features in React without rewriting existing code. | ||
React と組み合わせて使用する技術に関してはどんなものも選択できるので、React を使って新しい機能を追加する際にも、既存のソースコードを書き換える必要はありません。 | ||
superyusuke marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
React can also render on the server using Node and power mobile apps using [React Native](https://facebook.github.io/react-native/). | ||
React は Node を使ったサーバー上でも Render できますし、[React Native](https://facebook.github.io/react-native/) を使うことでモバイルアプリケーションの中でも動きます。 | ||
superyusuke marked this conversation as resolved.
Show resolved
Hide resolved
|
Uh oh!
There was an error while loading. Please reload this page.