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

1-js/02-first-steps/09-alert-prompt-confirm #53

Merged
merged 8 commits into from Apr 23, 2018
Merged

1-js/02-first-steps/09-alert-prompt-confirm #53

merged 8 commits into from Apr 23, 2018

Conversation

HydeSong
Copy link
Contributor

@HydeSong HydeSong commented Apr 22, 2018

翻译完成 resolve #9

翻译完成
翻译完成
翻译完成
@HydeSong HydeSong changed the title Translate/09 alert prompt confirm 1-js/02-first-steps/09-alert-prompt-confirm Apr 22, 2018
@Starriers
Copy link
Contributor

@leviding 校对认领

Copy link
Contributor

@Starriers Starriers left a comment

Choose a reason for hiding this comment

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

@HydeSong @leviding 校对完成

@@ -1,48 +1,48 @@
# Interaction: alert, prompt, confirm
# 交互:alert promptconfirm
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

Choose a reason for hiding this comment

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

下文单词同上不赘述


This part of the tutorial aims to cover JavaScript "as is", without environment-specific tweaks.
本部分旨在覆盖 JavaScript “原样”,而无需针对特定环境进行调整。
Copy link
Contributor

Choose a reason for hiding this comment

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

原样 =》 原生


```js
alert(message);
```

This shows a message and pauses the script execution until the user presses "OK".
浏览器会弹出一段信息并暂停脚本,直到用户点击了 “确定”。
Copy link
Contributor

Choose a reason for hiding this comment

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

这样的确定不用空格


```js run
alert("Hello");
```

The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons etc, until they have dealt with the window. In this case -- until they press "OK".
这个小窗口被称为 *模态窗*。“modal” 意味着用户不能与页面的其他部分进行交互,按其他按钮等,直到他们处理完窗口。 在这种情况下 - 直到他们按下“确定”。
Copy link
Contributor

Choose a reason for hiding this comment

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

用加粗不要斜体


```js run
alert("Hello");
```

The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons etc, until they have dealt with the window. In this case -- until they press "OK".
这个小窗口被称为 *模态窗*。“modal” 意味着用户不能与页面的其他部分进行交互,按其他按钮等,直到他们处理完窗口。 在这种情况下 - 直到他们按下“确定”。
Copy link
Contributor

Choose a reason for hiding this comment

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

按其它按钮=》点击其他按钮


That is the price for simplicity. There are other ways to show nicer windows and richer interaction with the visitor, but if "bells and whistles" do not matter much, these methods work just fine.
这是简单的代价。 还有其他一些方法可以显示更漂亮的窗口,并与用户进行更丰富的交互,但如果“花里胡哨”不重要,这些方法就可以正常工作。
Copy link
Contributor

Choose a reason for hiding this comment

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

不重要=>不是非常重要 就可以正常工作=》也可以工作的很好


That is the price for simplicity. There are other ways to show nicer windows and richer interaction with the visitor, but if "bells and whistles" do not matter much, these methods work just fine.
这是简单的代价。 还有其他一些方法可以显示更漂亮的窗口,并与用户进行更丰富的交互,但如果“花里胡哨”不重要,这些方法就可以正常工作。
Copy link
Contributor

Choose a reason for hiding this comment

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

还有前面多了空格


1. The exact location of the modal window is determined by the browser. Usually it's in the center.
2. The exact look of the window also depends on the browser. We can't modify it.
1. 模态窗口的确切位置由浏览器决定。 通常它在页面中心。
Copy link
Contributor

Choose a reason for hiding this comment

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

通常前多了空格

1. The exact location of the modal window is determined by the browser. Usually it's in the center.
2. The exact look of the window also depends on the browser. We can't modify it.
1. 模态窗口的确切位置由浏览器决定。 通常它在页面中心。
2. 窗口的确切外观还取决于浏览器。 我们不能修改它。
Copy link
Contributor

Choose a reason for hiding this comment

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

我们前面 多了空格


```js run
alert("Hello");
```

The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons etc, until they have dealt with the window. In this case -- until they press "OK".
这个小窗口被称为 *模态窗*。“modal” 意味着用户不能与页面的其他部分进行交互,按其他按钮等,直到他们处理完窗口。 在这种情况下 - 直到他们按下“确定”。
Copy link
Contributor

Choose a reason for hiding this comment

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

在这种情况下 前面多了空格

根据校对者一件修改
@HydeSong
Copy link
Contributor Author

已根据校对者意见修改 @leviding @Starriers

@@ -1,9 +1,8 @@
importance: 4
重要:4
Copy link
Member

Choose a reason for hiding this comment

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

重要程度


```js run
alert("Hello");
```

The mini-window with the message is called a *modal window*. The word "modal" means that the visitor can't interact with the rest of the page, press other buttons etc, until they have dealt with the window. In this case -- until they press "OK".
这个小窗口被称为 **模态窗**。“modal” 意味着用户不能与页面的其他部分进行交互,点击其他按钮等,直到他们处理完窗口。在这种情况下 - 直到他们按下“确定”。
Copy link
Member

Choose a reason for hiding this comment

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

“modal” => "modal"


`default`
: An optional second parameter, the initial value for the input field.
:可选的第二个参数,指定 input 框的初始值。
Copy link
Member

Choose a reason for hiding this comment

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

开头改为英文冒号加空格的形式,这是固定解析格式


`title`
: The text to show to the visitor.
:显示给用户的文本
Copy link
Member

Choose a reason for hiding this comment

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

开头改为英文冒号加空格的形式,这是固定解析格式


`alert`
: shows a message.
:显示信息
Copy link
Member

Choose a reason for hiding this comment

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

开头改为英文冒号加空格的形式,这是固定解析格式


`prompt`
: shows a message asking the user to input text. It returns the text or, if CANCEL or `key:Esc` is clicked, all browsers return `null`.
:显示信息要求用户输入文本。点击确定返回文本,或者点击取消或按下 `key:Esc` 键,对于所有浏览器来说,其返回值都是。
Copy link
Member

Choose a reason for hiding this comment

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

开头改为英文冒号加空格的形式,这是固定解析格式


`confirm`
: shows a message and waits for the user to press "OK" or "CANCEL". It returns `true` for OK and `false` for CANCEL/`key:Esc`.
:显示信息等待用户点击确定或取消。点击确定返回 `true`,点击取消或 `key:Esc` 键返回 `false`。
Copy link
Member

Choose a reason for hiding this comment

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

开头改为英文冒号加空格的形式,这是固定解析格式

@HydeSong
Copy link
Contributor Author

@leviding 已修改

@leviding leviding merged commit c86ec15 into javascript-tutorial:zh-hans Apr 23, 2018
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.

None yet

3 participants