Skip to content

Commit 8229f64

Browse files
authored
Merge branch 'master' into test-utils
2 parents f1fa94f + c689c9f commit 8229f64

File tree

239 files changed

+4501
-3282
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

239 files changed

+4501
-3282
lines changed

.github/PULL_REQUEST_TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Thank you for the PR! Contributors like you keep React awesome!
66
77
Please see the Contribution Guide for guidelines:
88
9-
https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md
9+
https://github.com/reactjs/ja.reactjs.org/blob/master/CONTRIBUTING.md
1010
1111
If your PR references an existing issue, please add the issue number below
1212

.textlintrc

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
"preset-jtf-style": {
44
"1.2.1.句点(。)と読点(、)": false,
55
"1.2.2.ピリオド(.)とカンマ(,)": false,
6-
"3.1.1.全角文字と半角文字の間": false
6+
"3.1.1.全角文字と半角文字の間": false,
7+
"4.2.1.感嘆符(!)": false,
8+
"4.2.2.疑問符(?)": false
79
}
810
}
911
}

README.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# reactjs.org
1+
# ja.reactjs.org
22

3-
This repo contains the source code and documentation powering [reactjs.org](https://reactjs.org/).
3+
This repo contains the source code and documentation powering [ja.reactjs.org](https://ja.reactjs.org/).
44

55
## Getting started
66

@@ -10,11 +10,11 @@ This repo contains the source code and documentation powering [reactjs.org](http
1010
1. Node: any 8.x version starting with 8.4.0 or greater
1111
1. Yarn: See [Yarn website for installation instructions](https://yarnpkg.com/lang/en/docs/install/)
1212
1. A fork of the repo (for any contributions)
13-
1. A clone of the [reactjs.org repo](https://github.com/reactjs/reactjs.org) on your local machine
13+
1. A clone of the [ja.reactjs.org repo](https://github.com/reactjs/ja.reactjs.org) on your local machine
1414

1515
### Installation
1616

17-
1. `cd reactjs.org` to go into the project root
17+
1. `cd ja.reactjs.org` to go into the project root
1818
1. `yarn` to install the website's npm dependencies
1919

2020
### Running locally
@@ -26,11 +26,11 @@ This repo contains the source code and documentation powering [reactjs.org](http
2626

2727
### Guidelines
2828

29-
The documentation is divided into several sections with a different tone and purpose. If you plan to write more than a few sentences, you might find it helpful to get familiar with the [contributing guidelines](https://github.com/reactjs/reactjs.org/blob/master/CONTRIBUTING.md#guidelines-for-text) for the appropriate sections.
29+
The documentation is divided into several sections with a different tone and purpose. If you plan to write more than a few sentences, you might find it helpful to get familiar with the [contributing guidelines](https://github.com/reactjs/ja.reactjs.org/blob/master/CONTRIBUTING.md#guidelines-for-text) for the appropriate sections.
3030

3131
### Create a branch
3232

33-
1. `git checkout master` from any folder in your local `reactjs.org` repository
33+
1. `git checkout master` from any folder in your local `ja.reactjs.org` repository
3434
1. `git pull origin master` to ensure you have the latest main code
3535
1. `git checkout -b the-name-of-my-branch` (replacing `the-name-of-my-branch` with a suitable name) to create a branch
3636

@@ -51,15 +51,16 @@ The documentation is divided into several sections with a different tone and pur
5151

5252
1. `git add -A && git commit -m "My message"` (replacing `My message` with a commit message, such as `Fixed header logo on Android`) to stage and commit your changes
5353
1. `git push my-fork-name the-name-of-my-branch`
54-
1. Go to the [reactjs.org repo](https://github.com/reactjs/reactjs.org) and you should see recently pushed branches.
54+
1. Go to the [ja.reactjs.org repo](https://github.com/reactjs/ja.reactjs.org) and you should see recently pushed branches.
5555
1. Follow GitHub's instructions.
5656
1. If possible, include screenshots of visual changes. A Netlify build will also be automatically created once you make your PR so other people can see your change.
5757

5858
## Translation
5959

60-
If you are interesting in translating `reactjs.org`, please join the Crowdin.
60+
If you are interested in translating `reactjs.org`, please see the current translation efforts at [isreacttranslatedyet.com](https://www.isreacttranslatedyet.com/).
6161

62-
* [Crowdin - React](https://crowdin.com/project/react)
62+
63+
If your language does not have a translation and you would like to create one, please follow the instructions at [reactjs.org Translations](https://github.com/reactjs/reactjs.org-translation#translating-reactjsorg).
6364

6465
## Troubleshooting
6566

TRANSLATION.md

+7-9
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ README.md にある通りですが、さらなる簡略版は以下の通りで
1818

1919
## スタイルの自動チェック
2020

21-
`yarn lint:text` で、基本的な文法(全角英数を使わない、句読点の統一)チェックが走ります。
22-
コミット・PR作成の前にはエラーが出ないようにしてください。
21+
`yarn lint:text` で、基本的な文法(全角英数を使わない、句読点の統一)チェックが走ります。コミット・PR作成の前にはエラーが出ないようにしてください。
2322

2423
## 全般的なこと
2524

25+
- 見出しの行末にある `{#try-react}` のようなものは見出しアンカーなので、翻訳しない。([参考](https://github.com/reactjs/reactjs.org/issues/1608)
2626
- 「です」「ます」調で書く(箇条書きの中など特殊な文脈を除く)。
2727
- カッコは内部に和文を含む場合は全角、英数字のみ含む場合(特に原文の単語を示す場合など)は半角とする。
2828
- 半角開きカッコの前と半角閉じカッコの後には半角スペースを入れる。ただし別の約物と直接隣接している場合は不要。
@@ -39,17 +39,15 @@ README.md にある通りですが、さらなる簡略版は以下の通りで
3939
- 和文内で文の一部として使う記号・約物類は原則全角とする。`「`, `」`, `、`, `。`, `:`, `!`, `?`, `/` などが該当する。
4040
- 用例の直前の行で行末に現れるコロンについても全角とする。ただしこれは毎回使うべきというわけではない。文が途切れる場合は `:` が必要だが、不自然にならないのであれば、句点 `。` で終えても構わない。
4141
- 英文から飛躍した意訳や表現の追加・改変を行わない。一方で分かりづらくなるような逐語訳もしない。
42-
- ひとまず、リンク先の URL は変えない。(MDN などについては後でまとめて日本語版へのリンクに置換するかもしれませんが、まとめてやる方が間違いも少ないと思われるので、気にしないでいいです)
43-
- `#` で始まる見出しを翻訳すると現時点では自動生成されるアンカー (`<a id="#...">`) が変わってしまい、ページ内の見出しへのリンクが壊れてしまうが、これもひとまず気にしないでおく。(これについては [こちら](https://github.com/reactjs/reactjs.org/issues/1608) で検討中です)
44-
- 和文に対する `*強調*`(`<em>強調</em>` に変換される)がうまく表示されない(日本語フォントに斜体が適用されないため)が、ひとまず原文通りに強調を残す形で翻訳する。(恐らく CSS を弄って解決できるはず
42+
- リンク先の URL は変えない。(MDN などについては後でまとめて日本語版へのリンクに置換するかもしれませんが、まとめてやる方が間違いも少ないと思われるので、気にしないでいいです)
43+
- コードサンプルについては原則翻訳しなくてよい。特に例の中の `banana` とか `Canada` のようなものまで翻訳する必要はない。ただしコード中のコメントに、(本来は本文に書いたほうがいいレベルの)大量の説明があり、翻訳しないと理解を妨げる危険性が高い場合は翻訳してもよい。
44+
- `*強調*` や `**強調**` (それぞれ `em` と `strong` に変換される)は、極力原文での使用法を保つ。(環境によって日本語フォントは斜体で表示できないため、`em` に日本語が含まれる場合は自動的に太字に変換されるようになっています:[参考](https://github.com/reactjs/ja.reactjs.org/issues/22)
4545
- ごく一般的な日本語表記に関して困ったら概ね公用文作成の要領などに準ずるが、カタカナ語の末尾の長音符については JIS Z 8301 の推奨に従う。そこまで目くじらを立てなくてよいが、基本は要するに以下の通り。
46-
- 3音以上の場合のみ、片仮名語の末尾の長音符を原則省略。「エコー」「マナー」「ハンドラ」「プロパティ」
46+
- 3 音以上の場合のみ、片仮名語の末尾の長音符を原則省略。「エコー」「マナー」「ハンドラ」「プロパティ」
4747
- ただし「レンダー」だけは例外で、常に「レンダー」と伸ばす。
4848
- 補助動詞(~てください・~てみる・~ておく・~てくる・~てしまう、など)はかな書き。
4949
- 語彙化した副詞はなるべくかな書き。「ついに」「まれに」「ときに」「ようやく」「おそらく」など。
5050
5151
## 用語の統一
5252
53-
作成中です。
54-
55-
ひとまず https://github.com/reactjs/ja.reactjs.org/issues/3 を参照してください。
53+
Wiki の[訳語の統一](https://github.com/reactjs/ja.reactjs.org/wiki/%E8%A8%B3%E8%AA%9E%E3%81%AE%E7%B5%B1%E4%B8%80)を参照。

content/blog/2013-06-05-why-react.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ author: [petehunt]
66
There are a lot of JavaScript MVC frameworks out there. Why did we build React
77
and why would you want to use it?
88

9-
## React isn't an MVC framework.
9+
## React isn't an MVC framework. {#react-isnt-an-mvc-framework}
1010

1111
React is a library for building composable user interfaces. It encourages
1212
the creation of reusable UI components which present data that changes over
1313
time.
1414

15-
## React doesn't use templates.
15+
## React doesn't use templates. {#react-doesnt-use-templates}
1616

1717
Traditionally, web application UIs are built using templates or HTML directives.
1818
These templates dictate the full set of abstractions that you are allowed to use
@@ -33,7 +33,7 @@ to render views, which we see as an advantage over templates for a few reasons:
3333
We've also created [JSX](/docs/jsx-in-depth.html), an optional syntax
3434
extension, in case you prefer the readability of HTML to raw JavaScript.
3535

36-
## Reactive updates are dead simple.
36+
## Reactive updates are dead simple. {#reactive-updates-are-dead-simple}
3737

3838
React really shines when your data changes over time.
3939

@@ -63,7 +63,7 @@ Because this re-render is so fast (around 1ms for TodoMVC), the developer
6363
doesn't need to explicitly specify data bindings. We've found this approach
6464
makes it easier to build apps.
6565

66-
## HTML is just the beginning.
66+
## HTML is just the beginning. {#html-is-just-the-beginning}
6767

6868
Because React has its own lightweight representation of the document, we can do
6969
some pretty cool things with it:

content/blog/2013-06-12-community-roundup.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: [vjeux]
55

66
React was open sourced two weeks ago and it's time for a little round-up of what has been going on.
77

8-
## Khan Academy Question Editor
8+
## Khan Academy Question Editor {#khan-academy-question-editor}
99

1010
It looks like [Sophie Alpert](http://sophiebits.com/) is the first person outside of Facebook and Instagram to push React code to production. We are very grateful for her contributions in form of pull requests, bug reports and presence on IRC ([#reactjs on Freenode](irc://chat.freenode.net/reactjs)). Sophie wrote about her experience using React:
1111

@@ -16,7 +16,7 @@ It looks like [Sophie Alpert](http://sophiebits.com/) is the first person outsid
1616
>
1717
> [Read the full post...](http://sophiebits.com/2013/06/09/using-react-to-speed-up-khan-academy.html)
1818
19-
## Pimp my Backbone.View (by replacing it with React)
19+
## Pimp my Backbone.View (by replacing it with React) {#pimp-my-backboneview-by-replacing-it-with-react}
2020

2121
[Paul Seiffert](https://blog.mayflower.de/) wrote a blog post that explains how to integrate React into Backbone applications.
2222

@@ -28,15 +28,15 @@ It looks like [Sophie Alpert](http://sophiebits.com/) is the first person outsid
2828
>
2929
> [Read the full post...](https://blog.mayflower.de/3937-Backbone-React.html)
3030
31-
## Using facebook's React with require.js
31+
## Using facebook's React with require.js {#using-facebooks-react-with-requirejs}
3232

3333
[Mario Mueller](http://blog.xenji.com/) wrote a menu component in React and was able to easily integrate it with require.js, EventEmitter2 and bower.
3434

3535
> I recently stumbled upon facebook's React library, which is a JavaScript library for building reusable frontend components. Even if this lib is only at version 0.3.x it behaves very stable, it is fast and is fun to code. I'm a big fan of require.js, so I tried to use React within the require.js eco system. It was not as hard as expected and here are some examples and some thoughts about it.
3636
>
3737
> [Read the full post...](http://blog.xenji.com/2013/06/facebooks-react-require-js.html)
3838
39-
## Origins of React
39+
## Origins of React {#origins-of-react}
4040

4141
[Pete Hunt](http://www.petehunt.net/blog/) explained what differentiates React from other JavaScript libraries in [a previous blog post](/blog/2013/06/05/why-react.html). [Lee Byron](http://leebyron.com/) gives another perspective on Quora:
4242

content/blog/2013-06-19-community-roundup-2.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: [vjeux]
55

66
Since the launch we have received a lot of feedback and are actively working on React 0.4. In the meantime, here are the highlights of this week.
77

8-
## Some quick thoughts on React
8+
## Some quick thoughts on React {#some-quick-thoughts-on-react}
99

1010
[Andrew Greig](http://www.andrewgreig.com/) made a blog post that gives a high level description of what React is.
1111

@@ -19,7 +19,7 @@ Since the launch we have received a lot of feedback and are actively working on
1919
>
2020
> [Read the full post...](http://www.andrewgreig.com/637/)
2121
22-
## React and Socket.IO Chat Application
22+
## React and Socket.IO Chat Application {#react-and-socketio-chat-application}
2323

2424
[Danial Khosravi](https://danialk.github.io/) made a real-time chat application that interacts with the back-end using Socket.IO.
2525

@@ -28,7 +28,7 @@ Since the launch we have received a lot of feedback and are actively working on
2828
>
2929
> [Read the full post...](https://danialk.github.io/blog/2013/06/16/reactjs-and-socket-dot-io-chat-application/)
3030
31-
## React and Other Frameworks
31+
## React and Other Frameworks {#react-and-other-frameworks}
3232

3333
[Pete Hunt](http://www.petehunt.net/blog/) wrote an answer on Quora comparing React and Angular directives. At the end, he explains how you can make an Angular directive that is in fact being rendered with React.
3434

@@ -40,7 +40,7 @@ Since the launch we have received a lot of feedback and are actively working on
4040
4141
In the same vein, [Markov Twain](https://twitter.com/markov_twain/status/345702941845499906) re-implemented the examples on the front-page [with Ember](http://jsbin.com/azihiw/2/edit) and [Vlad Yazhbin](https://twitter.com/vla) re-implemented the tutorial [with Angular](http://jsfiddle.net/vla/Cdrse/).
4242

43-
## Web Components: React & x-tags
43+
## Web Components: React & x-tags {#web-components-react--x-tags}
4444

4545
Mozilla and Google are actively working on Web Components. [Vjeux](http://blog.vjeux.com/) wrote a proof of concept that shows how to implement them using React.
4646

@@ -49,7 +49,7 @@ Mozilla and Google are actively working on Web Components. [Vjeux](http://blog.v
4949
>
5050
> [Read the full post...](http://blog.vjeux.com/2013/javascript/custom-components-react-x-tags.html)
5151
52-
## React TodoMVC Example
52+
## React TodoMVC Example {#react-todomvc-example}
5353

5454
[TodoMVC.com](http://todomvc.com/) is a website that collects various implementations of the same basic Todo app. [Pete Hunt](http://www.petehunt.net/blog/) wrote an idiomatic React version.
5555

@@ -60,7 +60,7 @@ Mozilla and Google are actively working on Web Components. [Vjeux](http://blog.v
6060
>
6161
> [Read the source code...](https://github.com/tastejs/todomvc/tree/gh-pages/labs/architecture-examples/react)
6262
63-
## JSX is not HTML
63+
## JSX is not HTML {#jsx-is-not-html}
6464

6565
Many of you pointed out differences between JSX and HTML. In order to clear up some confusion, we have added some documentation that covers the four main differences:
6666

content/blog/2013-06-21-react-v0-3-3.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ author: [zpao]
66
We have a ton of great stuff coming in v0.4, but in the meantime we're releasing v0.3.3. This release addresses some small issues people were having and simplifies our tools to make them easier to use.
77

88

9-
## react-tools
9+
## react-tools {#react-tools}
1010

1111
* Upgrade Commoner so `require` statements are no longer relativized when passing through the transformer. This was a feature needed when building React, but doesn't translate well for other consumers of `bin/jsx`.
1212
* Upgraded our dependencies on Commoner and Recast so they use a different directory for their cache.
1313
* Freeze our esprima dependency.
1414

1515

16-
## React
16+
## React {#react}
1717

1818
* Allow reusing the same DOM node to render different components. e.g. `React.renderComponent(<div/>, domNode); React.renderComponent(<span/>, domNode);` will work now.
1919

2020

21-
## JSXTransformer
21+
## JSXTransformer {#jsxtransformer}
2222

2323
* Improved the in-browser transformer so that transformed scripts will execute in the expected scope. The allows components to be defined and used from separate files.

content/blog/2013-06-27-community-roundup-3.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: [vjeux]
55

66
The highlight of this week is that an interaction-heavy app has been ported to React. React components are solving issues they had with nested views.
77

8-
## Moving From Backbone To React
8+
## Moving From Backbone To React {#moving-from-backbone-to-react}
99

1010
[Clay Allsopp](https://twitter.com/clayallsopp) successfully ported [Propeller](http://usepropeller.com/blog/posts/from-backbone-to-react/), a fairly big, interaction-heavy JavaScript app, to React.
1111

@@ -17,7 +17,7 @@ The highlight of this week is that an interaction-heavy app has been ported to R
1717
>
1818
> [Read the full post...](http://usepropeller.com/blog/posts/from-backbone-to-react/)
1919
20-
## Grunt Task for JSX
20+
## Grunt Task for JSX {#grunt-task-for-jsx}
2121

2222
[Eric Clemmons](https://ericclemmons.github.io/) wrote a task for [Grunt](http://gruntjs.com/) that applies the JSX transformation to your JavaScript files. It also works with [Browserify](http://browserify.org/) if you want all your files to be concatenated and minified together.
2323

@@ -45,7 +45,7 @@ The highlight of this week is that an interaction-heavy app has been ported to R
4545
>
4646
> [Check out the project ...](https://github.com/ericclemmons/grunt-react)
4747
48-
## Backbone/Handlebars Nested Views
48+
## Backbone/Handlebars Nested Views {#backbonehandlebars-nested-views}
4949
5050
[Joel Burget](http://joelburget.com/) wrote a blog post talking about the way we would write React-like components in Backbone and Handlebars.
5151
@@ -57,13 +57,13 @@ The highlight of this week is that an interaction-heavy app has been ported to R
5757
>
5858
> [Read the full post...](http://joelburget.com/react/)
5959
60-
## JSRomandie Meetup
60+
## JSRomandie Meetup {#jsromandie-meetup}
6161
6262
[Renault John Lecoultre](https://twitter.com/renajohn/) from [BugBuster](http://www.bugbuster.com) did a React introduction talk at a JS meetup called [JS Romandie](https://twitter.com/jsromandie) last week.
6363
6464
<script async class="speakerdeck-embed" data-id="888a9d50c01b01300df36658d0894ac1" data-ratio="1.33333333333333" src="//speakerdeck.com/assets/embed.js"></script>
6565
66-
## CoffeeScript integration
66+
## CoffeeScript integration {#coffeescript-integration}
6767
6868
[Vjeux](http://blog.vjeux.com/) used the fact that JSX is just a syntactic sugar on-top of regular JS to rewrite the React front-page examples in CoffeeScript.
6969
@@ -81,7 +81,7 @@ The highlight of this week is that an interaction-heavy app has been ported to R
8181
>
8282
> [Read the full post...](http://blog.vjeux.com/2013/javascript/react-coffeescript.html)
8383
84-
## Tutorial in Plain JavaScript
84+
## Tutorial in Plain JavaScript {#tutorial-in-plain-javascript}
8585
8686
We've seen a lot of people comparing React with various frameworks. [Ricardo Tomasi](http://ricardo.cc/) decided to re-implement the tutorial without any framework, just plain JavaScript.
8787

0 commit comments

Comments
 (0)