Skip to content
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

翻译react.js新手村教程 #279

Merged
merged 10 commits into from
Apr 22, 2016
Merged

翻译react.js新手村教程 #279

merged 10 commits into from
Apr 22, 2016

Conversation

markzhai
Copy link
Contributor

@markzhai markzhai commented Apr 18, 2016

See #252

@JasinYip
Copy link

请问可以认领校对了吗? @antonia0912

@antonia0912
Copy link
Contributor

@JasinYip 可以的 老方法校对!加油

* 校对者:



As you can probably guess from the title, this post is aimed at readers with very little experience of programming. That is, at people such as myself: as I've only been exploring the world of programming for six months now. **So, it's going to be a genuine newbies tutorial!** To follow it, you'll only need to have an understanding of HTML and CSS and a basic level of Javascript (JS).
正如你能从标题猜到的,这篇文章的目标是给那些有很少编程经验的读者的。比如,像我这样的人:因为迄今为止,我才探索了变成编程世界6个月。**所以,这将是一篇新手村教程!** 你只需要拥有对HTML和CSS的理解,以及基本的JavaScript (JS) 知识就能看懂本文。

Choose a reason for hiding this comment

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

建议在中文和英文或者中文与数字之间加空格,并使用中文标点符号

Copy link
Contributor Author

Choose a reason for hiding this comment

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

哪儿没用中文标点符号了?

Choose a reason for hiding this comment

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

括号

Copy link
Contributor Author

Choose a reason for hiding this comment

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

看到了,3Q


React is a JS library, created by Facebook and Instagram ([https://facebook.github.io/react/](https://facebook.github.io/react/)), which makes it possible to create single-page applications ([Single Page Applications (SPA)](http://www.leanpanda.com/blog/2015/05/25/single-page-application-development/)) using a structure that divides them into a number of dynamic, reusable **components**.
React是一个JS库,由Facebook和Instagram创建([https://facebook.github.io/react/](https://facebook.github.io/react/))。它通过将应用分为一些动态的,可复用的 **组件**,来使我们可以创建单页应用([Single Page Applications (SPA)](http://www.leanpanda.com/blog/2015/05/25/single-page-application-development/))

Choose a reason for hiding this comment

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

由Facebook和Instagram创建( -> 由 Facebook 和 Instagram 创建(

Choose a reason for hiding this comment

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

动态的,可复用的 -> 动态的、可复用的

@markzhai
Copy link
Contributor Author

@JasinYip 目前的意见都修改好啦,谢谢,提出的意见都很好

@JasinYip
Copy link

其实你可以等我们说「校对完毕」后再修改😂不然你得改好几次呢


The React structure, known as a [virtual DOM](https://facebook.github.io/react/docs/working-with-the-browser.html), makes it possible to update a component every time its content undergoes a change, without the need for the entire page to be refreshed. For this purpose, the component will require an internal method in which the variable data and specific HTML attributes assigned to the element which are to undergo changes will be saved. Those attributes will themselves be linked to other methods which we will define within the components and which will be responsible for bringing about changes.
React 结构,被称为[虚拟 DOM](https://facebook.github.io/react/docs/working-with-the-browser.html),可以使我们在组件的内容发生改变的时候,不需要刷新整个页面,而可以只更新对应组件。
Copy link

@JasinYip JasinYip Apr 20, 2016

Choose a reason for hiding this comment

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

这后面貌似漏了半段……?

For this purpose, the component will require an internal method (in which the variable data and specific HTML attributes assigned to the element( which are to undergo changes)) will be saved. Those attributes will themselves be linked to other methods which we will define within the components and which will be responsible for bringing about changes.

所以,这个组件会依赖一个内置方法,它保存了那个变量 data 和赋予了一些具体的 HTML 属性的元素,并且这些元素是可以接受修改的。这些属性会自行连接到其它方法当中,这些方法我们会定义在组件里面,它们负责响应变动。

(Ps:这块感觉有点难度……可能翻译得不是十分好,希望译者或者其他校对朋友也来校对一下我这句,谢谢)

@markzhai
Copy link
Contributor Author

@antonia0912 修改好啦


A React component is a JS class that extends the **Component** class provided by React itself. A component represents and defines a block of HTML code, together with any behaviour associated with that block, such as a click event. Components are like Lego blocks that can be assembled to create complex applications as desired. Components, which are entirely composed of JS code, can be isolated and re-used. The fundamental method is **render()**, which simply returns a piece of HTML code.
一个React组件是一个继承了由React提供的 **Component** 的JS类。一个组件代表并定义了一块HTML代码,以及任何与这块代码相关的行为,比如点击事件。组件就像是乐高积木,可以用来组建成所需的复杂应用。完全由JS代码构成的组件,可以被隔离和复用。基本方法是 **render()**,它简单地返回一片HTML代码。
Copy link
Contributor

@malcolmyu malcolmyu Apr 21, 2016

Choose a reason for hiding this comment

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

注意中英文之间应有空格

@JasinYip
Copy link

我校对完了

@malcolmyu
Copy link
Contributor

校对完成

@markzhai
Copy link
Contributor Author

@antonia0912 改好啦




As you can probably guess from the title, this post is aimed at readers with very little experience of programming. That is, at people such as myself: as I've only been exploring the world of programming for six months now. **So, it's going to be a genuine newbies tutorial!** To follow it, you'll only need to have an understanding of HTML and CSS and a basic level of Javascript (JS).
正如你能从标题猜到的,这篇文章的目标是给那些有很少编程经验的读者的。比如,像我这样的人:因为迄今为止,我才探索了变成编程世界6个月。**所以,这将是一篇新手村教程!** 你只需要拥有对 HTML CSS 的理解,以及基本的 JavaScript(JS)知识就能看懂本文。
Copy link
Contributor

Choose a reason for hiding this comment

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

变成编程世界 这里是不是多了一个变成

Copy link
Contributor Author

Choose a reason for hiding this comment

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

是的。。。

@markzhai
Copy link
Contributor Author

@antonia0912 好了


In our example, the independent variable data is composed of dates. These vary as a result of click events which set of chain reactions within the DOM that alter according to the information relating to pirates and temperature. We will therefore save the information related to each date in a “DATA” object. We will also make use of React’s `this.state={}` property within the parent component to save variable data in the form of key-value copies.
在我们的例子里,那个独立的变量 data 是由日期组成的。这些会根据点击事件所集合的DOM内连锁反应进而根据对应海盗、温度信息而进行改变。所以我们将会根据每个 “DATA” 对象内的对应日期去保存信息。我们还将利用React在父组件内的 `this.state={}` 属性来以键值对拷贝形式保存变量数据的。
Copy link
Contributor

@antonia0912 antonia0912 Apr 22, 2016

Choose a reason for hiding this comment

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

DOM 中英文之间的空格。。。。。请原谅一个像处女座一样龟毛的水瓶女。。。。还有 React 。。。。 为什么大部分的英文都加空格了 。。。结果这里又蹦出几个没有空格的。。。

@antonia0912
Copy link
Contributor

@markzhai 译文中我给了几处note,中英文之间的空格好多都没有加喔 麻烦译者再检查一遍吧——来自一个像处女座一样龟毛的水瓶女。。。。

@markzhai
Copy link
Contributor Author

@antonia0912 貌似都加上了。。把你也加到校对名单了

@antonia0912
Copy link
Contributor

@markzhai merge完就可以分享到掘金啦

@antonia0912 antonia0912 merged commit 13f6cc4 into xitu:master Apr 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants