Skip to content

1-js/01-getting-started/ #29

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

Merged
merged 9 commits into from
Apr 22, 2018
Merged

1-js/01-getting-started/ #29

merged 9 commits into from
Apr 22, 2018

Conversation

linhe0x0
Copy link

@linhe0x0 linhe0x0 commented Apr 8, 2018

Co-authored-by: eric yang [email protected]

Cc @ericyang89

resolve #1

@linhe0x0 linhe0x0 changed the title Transfer the existing translation, ready for review 1-js/01-getting-started/ Apr 8, 2018
- They can be opened with `key:F12` for most browsers under Windows. Chrome for Mac needs `key:Cmd+Opt+J`, Safari: `key:Cmd+Opt+C` (need to enable first).
* 开发者工具允许我们查看错误,执行命令 ( 脚本 ),检查变量等等。
* 在 Windows 系统中,可以通过 `key:F12` 开启开发者工具。Mac 系统下,Chrome 需要使用 `key:Cmd+Opt+J`,Safari 使用
`key:Cmd+Opt+C` ( 需要提前开启 )。
Copy link
Member

Choose a reason for hiding this comment

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

和上一行连在一起


- Developer tools allow us to see errors, run commands, examine variables and much more.
- They can be opened with `key:F12` for most browsers under Windows. Chrome for Mac needs `key:Cmd+Opt+J`, Safari: `key:Cmd+Opt+C` (need to enable first).
* 开发者工具允许我们查看错误,执行命令 ( 脚本 ),检查变量等等。
Copy link
Member

Choose a reason for hiding this comment

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

括号换成中文的,去掉多余空格


![safari](safari.png)

Now `key:Cmd+Opt+C` can toggle the console. Also note that the new top menu item named "Develop" has appeared. It has many commands and options.
现在,我们通过 `key:Cmd+Opt+C` 就能打开或关闭控制台了。另外注意,名字为 “ 开发 ” 的顶部菜单出现了。有很多命令和选项。
Copy link
Member

Choose a reason for hiding this comment

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

多余空格


Open Preferences and go to "Advanced" pane. There's a checkbox at the bottom:
打开 “ 偏好设置 ...”, 点 “ 高级 ”。选中最下方的那个选择框。
Copy link
Member

Choose a reason for hiding this comment

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

多余空格,逗号换成中文的


## Safari

Safari (Mac browser, not supported by Windows/Linux) is a little bit special here. We need to enable the "Develop menu" first.
Safari ( Mac 系统中浏览器 , 不支持 Windows 和 Linux 系统 ) 有一点点不同。我们需要先开启 “ 开发菜单 ”。
Copy link
Member

Choose a reason for hiding this comment

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

多余空格,句号、括号换成中文的


An IDE loads the project (can be many files), allows navigation between files, provides autocompletion based on the whole project (not just the open file), integrates with a version management system (like [git](https://git-scm.com/)), a testing environment and other "project-level" stuff.
* IntelliJ editors: [WebStorm](http://www.jetbrains.com/webstorm/) 供前端开发使用。 除了前端,如果你们还需要使用其他语言
,那么可以考虑 [PHPStorm (PHP)](http://www.jetbrains.com/phpstorm/),
Copy link
Member

Choose a reason for hiding this comment

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

翻译和原文不同?

An IDE loads the project (can be many files), allows navigation between files, provides autocompletion based on the whole project (not just the open file), integrates with a version management system (like [git](https://git-scm.com/)), a testing environment and other "project-level" stuff.
* IntelliJ editors: [WebStorm](http://www.jetbrains.com/webstorm/) 供前端开发使用。 除了前端,如果你们还需要使用其他语言
,那么可以考虑 [PHPStorm (PHP)](http://www.jetbrains.com/phpstorm/),
[IDEA (Java)](http://www.jetbrains.com/idea/),[RubyMine (Ruby)](http://www.jetbrains.com/ruby/) 。
Copy link
Member

Choose a reason for hiding this comment

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

翻译和原文不同?


If you haven't considered selecting an IDE yet, look at the following variants:
* Visual Studio 一般 .NET 开发者喜欢用。
* 基于 Eclipse 的产品,例如 : [Aptana](http://www.aptana.com/) 和 Zend Studio。
Copy link
Member

Choose a reason for hiding this comment

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

翻译和原文不同?

If you haven't considered selecting an IDE yet, look at the following variants:
* Visual Studio 一般 .NET 开发者喜欢用。
* 基于 Eclipse 的产品,例如 : [Aptana](http://www.aptana.com/) 和 Zend Studio。
* [Komodo IDE](http://www.activestate.com/komodo-ide) 以及他的轻量版
Copy link
Member

Choose a reason for hiding this comment

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

翻译和原文不同?

* Visual Studio 一般 .NET 开发者喜欢用。
* 基于 Eclipse 的产品,例如 : [Aptana](http://www.aptana.com/) 和 Zend Studio。
* [Komodo IDE](http://www.activestate.com/komodo-ide) 以及他的轻量版
[Komodo Edit](http://www.activestate.com/komodo-edit)。
Copy link
Member

Choose a reason for hiding this comment

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

翻译和原文不同?

@linhe0x0 linhe0x0 changed the title 1-js/01-getting-started/ [WIP] 1-js/01-getting-started/ Apr 11, 2018
@linhe0x0
Copy link
Author

@leviding It's ready for review now.

@linhe0x0 linhe0x0 changed the title [WIP] 1-js/01-getting-started/ 1-js/01-getting-started/ Apr 12, 2018
@linhe0x0 linhe0x0 self-assigned this Apr 17, 2018
@meloalright
Copy link

校对认领 @leviding ~哈哈 居然 13 days ago 的还没认领呢

@leviding
Copy link
Member

leviding commented Apr 21, 2018

@meloalright ok,哈哈,看来我要宣传一波了。

Copy link

@meloalright meloalright left a comment

Choose a reason for hiding this comment

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

@sqrthree @leviding 校对完成~ 翻译的很出色~ 足够地道 仅有三个我认为的小问题~


```smart header="Why <u>Java</u>Script?"
When JavaScript was created, it initially had another name: "LiveScript". But Java language was very popular at that time, so it was decided that positioning a new language as a "younger brother" of Java would help.
JavaScript 在被创建的时候,它的名字叫 “LiveScript”。但是因为当时 Java 很流行,所以决定将一种新语言定位为 Java 的“弟弟”会有所帮助。
Copy link

@meloalright meloalright Apr 21, 2018

Choose a reason for hiding this comment

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

『JavaScript 在被创建的时候,它的名字叫 “LiveScript”。』
=>
『JavaScript 刚诞生的时候,它的名字叫 “LiveScript”。』

(O(∩_∩)O哈哈 感觉 ”被创建“ 这个词容易产生歧义 更容易和开发过程中 JavaScript 文件被创建的概念混淆)

```

At present, JavaScript can execute not only in the browser, but also on the server, or actually on any device where there exists a special program called [the JavaScript engine](https://en.wikipedia.org/wiki/JavaScript_engine).
现在,JavaScript 不仅仅是在浏览器内执行,也可以在服务端执行。甚至在存在任意 [JavaScript 引擎](https://en.wikipedia.org/wiki/JavaScript_engine)的环境中都可以执行。
Copy link

@meloalright meloalright Apr 21, 2018

Choose a reason for hiding this comment

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

『甚至在存在任意 [JavaScript 引擎]的环境』
=>
『甚至在任意存在 [JavaScript 引擎]的环境』

Copy link

Choose a reason for hiding this comment

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

『甚至在任意存在 [JavaScript 引擎]的环境』=>『甚至在任意搭载了 JavaScript 引擎的环境中都可以执行。』

The limitation is again for user's safety. A page from `http://anysite.com` which a user has opened must not be able to access another browser tab with the URL `http://gmail.com` and steal information from there.
- JavaScript can easily communicate over the net to the server where the current page came from. But its ability to receive data from other sites/domains is crippled. Though possible, it requires explicit agreement (expressed in HTTP headers) from the remote side. Once again, that's safety limitations.
这个限制也是为了用户的信息安全。例如,用户打开的 `http://anysite.com` 网页的 JavaScript 不能访问 `http://gmail.com`(另外一个标签页打开的网页)也不能从那里窃取信息。
- JavaScript 通过互联网可以很容易的和服务器通讯(当前网页域名的服务器)通讯。但是从其他的服务器中获取数据的功能是受限的,需要(在 HTTP 头中)添加某些参数。这也是为了用户的数据安全。
Copy link

@meloalright meloalright Apr 21, 2018

Choose a reason for hiding this comment

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

『 JavaScript 通过互联网可以很容易的和服务器通讯(当前网页域名的服务器)通讯。』
=>
『JavaScript 通过互联网可以很容易的和服务器(当前网页域名的服务器)通讯。 』
(通讯二字重复勒~)

『 需要(在 HTTP 头中)添加某些参数 』
=>
『 需要服务器(在 HTTP 头中)添加某些参数 』
(中文说到这一句的时候主语是 JavaScript ,所以看起来应该带上 ”需要服务器 。。。“)

@chenjie
Copy link

chenjie commented Apr 21, 2018

@leviding 校对认领

Copy link

@chenjie chenjie left a comment

Choose a reason for hiding this comment

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

翻译的不错!


The programs in this language are called *scripts*. They can be written right in the HTML and execute automatically as the page loads.
这种编程语言我们称之为**脚本**。把它们正确编写到 HTML 当中,在页面加载的时候会自动执行。
Copy link

Choose a reason for hiding this comment

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

『把它们正确编写到 HTML 当中』=>『它们可以写在 HTML 中』
这里 right 不是正确的含义

```

At present, JavaScript can execute not only in the browser, but also on the server, or actually on any device where there exists a special program called [the JavaScript engine](https://en.wikipedia.org/wiki/JavaScript_engine).
现在,JavaScript 不仅仅是在浏览器内执行,也可以在服务端执行。甚至在存在任意 [JavaScript 引擎](https://en.wikipedia.org/wiki/JavaScript_engine)的环境中都可以执行。
Copy link

Choose a reason for hiding this comment

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

『甚至在任意存在 [JavaScript 引擎]的环境』=>『甚至在任意搭载了 JavaScript 引擎的环境中都可以执行。』

- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- in Chrome and Opera.
- [SpiderMonkey](https://en.wikipedia.org/wiki/SpiderMonkey) -- in Firefox.
- ...There are other codenames like "Trident", "Chakra" for different versions of IE, "ChakraCore" for Microsoft Edge, "Nitro" and "SquirrelFish" for Safari etc.
- [V8](https://en.wikipedia.org/wiki/V8_(JavaScript_engine)) -- Chrome 和 Opera 中的 JavaScript 引擎 。
Copy link

Choose a reason for hiding this comment

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

删去句号前面空格


The terms above are good to remember, because they are used in developer articles on the internet. We'll use them too. For instance, if "a feature X is supported by V8", then it probably works in Chrome and Opera.
上面这些很容易记忆,因为经常出现在网上关于开发的文章中。我们也会这样用。例如:某个新的功能,JavaScript 引擎 V8 是支持的,那么我们可以认为这个功能在 Chrome Opera 中可以正常运行。
Copy link

Choose a reason for hiding this comment

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

『JavaScript 引擎 V8 是支持的』=>『如果 JavaScript 引擎 V8 是支持的』


The capabilities greatly depend on the environment that runs JavaScript. For instance, [Node.JS](https://wikipedia.org/wiki/Node.js) supports functions that allow JavaScript to read/write arbitrary files, perform network requests etc.
JavaScript 的能力依赖于它执行的环境。例如:[Node.JS](https://wikipedia.org/wiki/Node.js) 允许 JavaScript 读写任意文件、执行网络请求等。
Copy link

Choose a reason for hiding this comment

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

『Node.JS』=>『Node.js』

- [Dart](https://www.dartlang.org/) is a standalone language that has its own engine that runs in non-browser environments (like mobile apps). It was initially offered by Google as a replacement for JavaScript, but as of now, browsers require it to be transpiled to JavaScript just like the ones above.
- [CoffeeScript](http://coffeescript.org/) JavaScript 的语法糖,它语法简短,精确简捷。通常使用 Ruby 的人喜欢用。
- [TypeScript](http://www.typescriptlang.org/) 主要是是添加了严格类型系统。这样就能简化开发,也能用于开发复杂的系统。TypeScript 是微软开发的。
- [Dart](https://www.dartlang.org/) 是一门独立的语言。它拥有自己的引擎用于在非浏览器环境中运行(如:在手机应用中运行)。最开始是 Google 提供的用于替代 JavaScript 的,但是现在,浏览器也需要它和上面的语言一样需要被编译成 JavaScript
Copy link

Choose a reason for hiding this comment

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

『但是现在,浏览器也需要它和上面的语言一样需要被编译成 JavaScript』=>『但是现在,它和其他上述的语言一样,浏览器也要求它被编译成 JavaScript』


There are two archetypes: IDE and lightweight editors. Many people feel comfortable choosing one tool of each type.
编辑器主要分两种:IDE(集成开发环境) 和轻量编辑器。很多人喜欢这两种各选一个。
Copy link

Choose a reason for hiding this comment

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

多了一个空格


## My favorites
## 我喜欢的
Copy link

Choose a reason for hiding this comment

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

『我喜欢的』=>『我的最爱』


- [WebStorm](http://www.jetbrains.com/webstorm/) for JS, and if there is one more language in the project, then I switch to one of the other Jetbrains offerings listed above.
- As a lightweight editor -- [Sublime Text](http://www.sublimetext.com) or [Atom](https://atom.io/).
- 使用 [WebStorm](http://www.jetbrains.com/webstorm/) 写 JS,如果项目涉及其他语言我切换到上面列出的其他 Jetbrains 产品之一。
Copy link

Choose a reason for hiding this comment

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

『JS』=>『JavaScript』
参考:[Link]


There are other great editors in our big world. Please choose the one you like the most.
世上还有很多其他的很好的编辑器,你们可以选择一个你们最喜欢的。
Copy link

Choose a reason for hiding this comment

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

『你们可以选择一个你们最喜欢的』=>『你们可以选择一个自己最喜欢的』

@chenjie
Copy link

chenjie commented Apr 21, 2018

@sqrthree @leviding 校对完成

@linhe0x0
Copy link
Author

@leviding 调整完毕

@leviding leviding merged commit 6ea3316 into zh-hans Apr 22, 2018
@leviding leviding deleted the transfer/getting-started branch April 22, 2018 12:12
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.

4 participants