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

[zh-cn] sync translated content #16975

Merged
merged 3 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 33 additions & 11 deletions files/zh-cn/_redirects.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,11 @@
/zh-CN/docs/DOM/XMLHttpRequest/Sending_and_Receiving_Binary_Data /zh-CN/docs/Web/API/XMLHttpRequest_API/Sending_and_Receiving_Binary_Data
/zh-CN/docs/DOM/XMLHttpRequest/Synchronous_and_Asynchronous_Requests /zh-CN/docs/Web/API/XMLHttpRequest_API/Synchronous_and_Asynchronous_Requests
/zh-CN/docs/DOM/XMLHttpRequest/Using_XMLHttpRequest /zh-CN/docs/Web/API/XMLHttpRequest_API/Using_XMLHttpRequest
/zh-CN/docs/DOM/console.dir /zh-CN/docs/Web/API/console/dir
/zh-CN/docs/DOM/console.group /zh-CN/docs/Web/API/console/group
/zh-CN/docs/DOM/console.groupCollapsed /zh-CN/docs/Web/API/console/groupCollapsed
/zh-CN/docs/DOM/console.log /zh-CN/docs/Web/API/console/log
/zh-CN/docs/DOM/console.trace /zh-CN/docs/Web/API/console/trace
/zh-CN/docs/DOM/console.dir /zh-CN/docs/Web/API/console/dir_static
/zh-CN/docs/DOM/console.group /zh-CN/docs/Web/API/console/group_static
/zh-CN/docs/DOM/console.groupCollapsed /zh-CN/docs/Web/API/console/groupcollapsed_static
/zh-CN/docs/DOM/console.log /zh-CN/docs/Web/API/console/log_static
/zh-CN/docs/DOM/console.trace /zh-CN/docs/Web/API/console/trace_static
/zh-CN/docs/DOM/document /zh-CN/docs/Web/API/Document
/zh-CN/docs/DOM/document.URL /zh-CN/docs/Web/API/Document/URL
/zh-CN/docs/DOM/document.activeElement /zh-CN/docs/Web/API/Document/activeElement
Expand Down Expand Up @@ -1915,12 +1915,34 @@
/zh-CN/docs/Web/API/XMLHttpRequestEventTarget/onload /zh-CN/docs/Web/API/XMLHttpRequest/load_event
/zh-CN/docs/Web/API/XMLHttpRequestEventTarget/onloadstart /zh-CN/docs/Web/API/XMLHttpRequest/loadstart_event
/zh-CN/docs/Web/API/XMLHttpRequestEventTarget/onprogress /zh-CN/docs/Web/API/XMLHttpRequest/progress_event
/zh-CN/docs/Web/API/console.dir /zh-CN/docs/Web/API/console/dir
/zh-CN/docs/Web/API/console.group /zh-CN/docs/Web/API/console/group
/zh-CN/docs/Web/API/console.groupCollapsed /zh-CN/docs/Web/API/console/groupCollapsed
/zh-CN/docs/Web/API/console.log /zh-CN/docs/Web/API/console/log
/zh-CN/docs/Web/API/console.time /zh-CN/docs/Web/API/console/time
/zh-CN/docs/Web/API/console.trace /zh-CN/docs/Web/API/console/trace
/zh-CN/docs/Web/API/console.dir /zh-CN/docs/Web/API/console/dir_static
/zh-CN/docs/Web/API/console.group /zh-CN/docs/Web/API/console/group_static
/zh-CN/docs/Web/API/console.groupCollapsed /zh-CN/docs/Web/API/console/groupcollapsed_static
/zh-CN/docs/Web/API/console.log /zh-CN/docs/Web/API/console/log_static
/zh-CN/docs/Web/API/console.time /zh-CN/docs/Web/API/console/time_static
/zh-CN/docs/Web/API/console.trace /zh-CN/docs/Web/API/console/trace_static
/zh-CN/docs/Web/API/console/assert /zh-CN/docs/Web/API/console/assert_static
/zh-CN/docs/Web/API/console/clear /zh-CN/docs/Web/API/console/clear_static
/zh-CN/docs/Web/API/console/count /zh-CN/docs/Web/API/console/count_static
/zh-CN/docs/Web/API/console/countReset /zh-CN/docs/Web/API/console/countreset_static
/zh-CN/docs/Web/API/console/debug /zh-CN/docs/Web/API/console/debug_static
/zh-CN/docs/Web/API/console/dir /zh-CN/docs/Web/API/console/dir_static
/zh-CN/docs/Web/API/console/dirxml /zh-CN/docs/Web/API/console/dirxml_static
/zh-CN/docs/Web/API/console/error /zh-CN/docs/Web/API/console/error_static
/zh-CN/docs/Web/API/console/group /zh-CN/docs/Web/API/console/group_static
/zh-CN/docs/Web/API/console/groupCollapsed /zh-CN/docs/Web/API/console/groupcollapsed_static
/zh-CN/docs/Web/API/console/groupEnd /zh-CN/docs/Web/API/console/groupend_static
/zh-CN/docs/Web/API/console/info /zh-CN/docs/Web/API/console/info_static
/zh-CN/docs/Web/API/console/log /zh-CN/docs/Web/API/console/log_static
/zh-CN/docs/Web/API/console/profile /zh-CN/docs/Web/API/console/profile_static
/zh-CN/docs/Web/API/console/profileEnd /zh-CN/docs/Web/API/console/profileend_static
/zh-CN/docs/Web/API/console/table /zh-CN/docs/Web/API/console/table_static
/zh-CN/docs/Web/API/console/time /zh-CN/docs/Web/API/console/time_static
/zh-CN/docs/Web/API/console/timeEnd /zh-CN/docs/Web/API/console/timeend_static
/zh-CN/docs/Web/API/console/timeLog /zh-CN/docs/Web/API/console/timelog_static
/zh-CN/docs/Web/API/console/timeStamp /zh-CN/docs/Web/API/console/timestamp_static
/zh-CN/docs/Web/API/console/trace /zh-CN/docs/Web/API/console/trace_static
/zh-CN/docs/Web/API/console/warn /zh-CN/docs/Web/API/console/warn_static
/zh-CN/docs/Web/API/document.URL /zh-CN/docs/Web/API/Document/URL
/zh-CN/docs/Web/API/document.activeElement /zh-CN/docs/Web/API/Document/activeElement
/zh-CN/docs/Web/API/document.anchors /zh-CN/docs/Web/API/Document/anchors
Expand Down
44 changes: 22 additions & 22 deletions files/zh-cn/_wikihistory.json
Original file line number Diff line number Diff line change
Expand Up @@ -16159,7 +16159,7 @@
"jiereal"
]
},
"Web/API/console/assert": {
"Web/API/console/assert_static": {
"modified": "2020-10-15T21:49:40.751Z",
"contributors": [
"zhangchen",
Expand All @@ -16169,51 +16169,51 @@
"ZhangKaiqiang"
]
},
"Web/API/console/clear": {
"Web/API/console/clear_static": {
"modified": "2020-01-12T03:19:48.000Z",
"contributors": ["853419196", "ZhangKaiqiang"]
},
"Web/API/console/count": {
"Web/API/console/count_static": {
"modified": "2019-08-15T04:00:38.089Z",
"contributors": ["teemoooo", "gaowhen"]
},
"Web/API/console/countReset": {
"Web/API/console/countreset_static": {
"modified": "2020-10-15T22:08:08.444Z",
"contributors": ["Paapaapa", "807573515"]
},
"Web/API/console/debug": {
"Web/API/console/debug_static": {
"modified": "2020-10-15T22:15:26.417Z",
"contributors": ["hefang"]
},
"Web/API/console/dir": {
"Web/API/console/dir_static": {
"modified": "2019-10-08T07:08:14.257Z",
"contributors": ["SphinxKnight", "teoli", "AshfaqHossain", "ziyunfei"]
},
"Web/API/console/dirxml": {
"Web/API/console/dirxml_static": {
"modified": "2019-03-23T22:11:46.371Z",
"contributors": ["zzw918"]
},
"Web/API/console/error": {
"Web/API/console/error_static": {
"modified": "2019-08-15T04:02:05.738Z",
"contributors": ["pluwen", "kameii"]
},
"Web/API/console/group": {
"Web/API/console/group_static": {
"modified": "2019-03-24T00:18:26.661Z",
"contributors": ["teoli", "khalid32", "ziyunfei"]
},
"Web/API/console/groupCollapsed": {
"Web/API/console/groupcollapsed_static": {
"modified": "2019-03-24T00:18:28.377Z",
"contributors": ["teoli", "khalid32", "ziyunfei"]
},
"Web/API/console/groupEnd": {
"Web/API/console/groupend_static": {
"modified": "2019-03-18T21:46:40.075Z",
"contributors": ["hhxxhg", "luohe"]
},
"Web/API/console/info": {
"Web/API/console/info_static": {
"modified": "2020-02-02T00:13:13.877Z",
"contributors": ["Headog", "tsingwong", "Jaanai-Ewain", "yogoshary"]
},
"Web/API/console/log": {
"Web/API/console/log_static": {
"modified": "2020-07-27T04:01:25.975Z",
"contributors": [
"alan10332000",
Expand All @@ -16228,19 +16228,19 @@
"ziyunfei"
]
},
"Web/API/console/profile": {
"Web/API/console/profile_static": {
"modified": "2019-03-18T21:41:07.871Z",
"contributors": ["clwm01"]
},
"Web/API/console/profileEnd": {
"Web/API/console/profileend_static": {
"modified": "2020-10-15T22:04:42.916Z",
"contributors": ["JQ_Chan"]
},
"Web/API/console/table": {
"Web/API/console/table_static": {
"modified": "2020-10-15T21:54:27.285Z",
"contributors": ["RainSlide", "dondevi", "eeeeeeeason", "zzw918"]
},
"Web/API/console/time": {
"Web/API/console/time_static": {
"modified": "2020-10-15T21:27:17.192Z",
"contributors": [
"zhangchen",
Expand All @@ -16251,23 +16251,23 @@
"freemen"
]
},
"Web/API/console/timeEnd": {
"Web/API/console/timeend_static": {
"modified": "2020-10-15T21:50:04.648Z",
"contributors": ["luisleee", "hhxxhg", "Dcfm", "regiondavid"]
},
"Web/API/console/timeLog": {
"Web/API/console/timelog_static": {
"modified": "2020-10-15T22:16:19.657Z",
"contributors": ["lifankohome", "Reaper622"]
},
"Web/API/console/timeStamp": {
"Web/API/console/timestamp_static": {
"modified": "2019-03-23T22:08:57.552Z",
"contributors": ["tsingwong", "ershing"]
},
"Web/API/console/trace": {
"Web/API/console/trace_static": {
"modified": "2020-10-15T21:04:54.511Z",
"contributors": ["zhangchen", "airt", "teoli", "jsx", "ziyunfei"]
},
"Web/API/console/warn": {
"Web/API/console/warn_static": {
"modified": "2019-03-23T22:12:15.122Z",
"contributors": ["pluwen", "choukin"]
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Console.assert()
slug: Web/API/console/assert
title: console:assert() 静态方法
slug: Web/API/console/assert_static
---

{{APIRef("Console API")}}
Expand All @@ -9,7 +9,7 @@ slug: Web/API/console/assert

{{AvailableInWorkers}}

`console.assert()`方法在 Node.js 中的实现和浏览器中可用的`console.assert()`方法实现是不同的。在浏览器中当`console.assert()`方法接受到一个值为假断言的时候,会向控制台输出传入的内容,但是并不会中断代码的执行,而在 Node.js v10.0.0 之前,一个值为假的断言也将会导致一个`AssertionError`被抛出,使得代码执行被打断。v10.0.0 修复了此差异,所以现在`console.assert()`在 Node 和浏览器中执行行为相同。
`console.assert()` 方法在 Node.js 中的实现和浏览器中可用的 `console.assert()` 方法实现是不同的。在浏览器中当 `console.assert()` 方法接受到一个值为假断言的时候,会向控制台输出传入的内容,但是并不会中断代码的执行,而在 Node.js v10.0.0 之前,一个值为假的断言也将会导致一个 `AssertionError` 被抛出,使得代码执行被打断。v10.0.0 修复了此差异,所以现在 `console.assert()` 在 Node 和浏览器中执行行为相同。

## 语法

Expand Down Expand Up @@ -57,7 +57,7 @@ console.log("the word is %s try number %d", "foo", 123);
// 输出:the word is foo try number 123
```

`但是 console.assert` 在不同浏览器中可能获得不同的效果:
但是 `console.assert` 在不同浏览器中可能获得不同的效果:

```js
console.assert(false, "the word is %s", "foo");
Expand All @@ -69,7 +69,7 @@ console.assert(false, "the word is %s", "foo");
// Assertion failed: the word is %s foo
```

有关详细信息,请参阅 {{Domxref("console")}} 文档中的 [输出文本到控制台](/zh-CN/docs/Web/API/Console#%E8%BE%93%E5%87%BA%E6%96%87%E6%9C%AC%E5%88%B0%E6%8E%A7%E5%88%B6%E5%8F%B0)
有关详细信息,请参阅 {{Domxref("console")}} 文档中的 [输出文本到控制台](/zh-CN/docs/Web/API/console#输出文本到控制台)

## 规范

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: clear()
slug: Web/API/console/clear
title: console:clear() 静态方法
slug: Web/API/console/clear_static
---

{{APIRef("Console API")}}
Expand All @@ -19,7 +19,7 @@ clear();

### 返回值

({{jsxref("undefined")}})
{{jsxref("undefined")}}

## 规范

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: console:count() 方法
slug: Web/API/console/count
title: console:count() 静态方法
slug: Web/API/console/count_static
---

{{APIRef("Console API")}}
Expand All @@ -23,7 +23,7 @@ count(label)

### 返回值

({{jsxref("undefined")}})
{{jsxref("undefined")}}

## 示例

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Console.countReset()
slug: Web/API/console/countReset
title: console:countReset() 静态方法
slug: Web/API/console/countreset_static
---

{{APIRef("Console API")}}
Expand All @@ -15,8 +15,9 @@ slug: Web/API/console/countReset

## 语法

```
console.countReset([label]);
```js-nolint
countReset()
countReset(label)
```

### 参数
Expand All @@ -41,7 +42,7 @@ default: 0

### 异常情况

若传入一个不存在的 `label`, `countReset` 返回下面的警告信息:
若传入一个不存在的 `label``countReset` 返回下面的警告信息:

```
Counter "counter-name" doesn’t exist.
Expand Down Expand Up @@ -119,10 +120,10 @@ console.count("alice");

调用 countReset("bod") 只是重置了 "bob" 的计数器值 而 "alice" 的计数器值没有改变。

## Specifications
## 规范

{{Specifications}}

## Browser compatibility
## 浏览器兼容性

{{Compat}}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Console.debug()
slug: Web/API/console/debug
title: console:debug() 静态方法
slug: Web/API/console/debug_static
---

{{APIRef("Console API")}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: console.dir
slug: Web/API/console/dir
title: consoledir() 静态方法
slug: Web/API/console/dir_static
---

{{APIRef("Console API")}}
Expand All @@ -26,7 +26,7 @@ dir(object);

### 返回值

({{jsxref("undefined")}})
{{jsxref("undefined")}}

## 规范

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Console.dirxml()
slug: Web/API/console/dirxml
title: console:dirxml() 静态方法
slug: Web/API/console/dirxml_static
---

{{APIRef("Console API")}}{{Non-standard_header}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
title: Console.error()
slug: Web/API/console/error
title: console:error() 静态方法
slug: Web/API/console/error_static
original_slug: Web/API/console/error
---

{{APIRef("Console API")}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: console.group()
slug: Web/API/console/group
title: consolegroup() 静态方法
slug: Web/API/console/group_static
---

{{APIRef("Console API")}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: console.groupCollapsed()
slug: Web/API/console/groupCollapsed
title: consolegroupCollapsed() 静态方法
slug: Web/API/console/groupcollapsed_static
---

{{APIRef("Console API")}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Console.groupEnd()
slug: Web/API/console/groupEnd
title: console:groupEnd() 静态方法
slug: Web/API/console/groupend_static
---

{{APIRef("Console API")}}
Expand All @@ -11,22 +11,22 @@ slug: Web/API/console/groupEnd

## 语法

```plain
console.groupEnd();
```js-nolint
groupEnd()
```

## 参数

None.
无。

## Specifications
## 规范

{{Specifications}}

## 浏览器兼容性

{{Compat}}

## See also
## 参见

- [Opera Dragonfly documentation: Console](http://www.opera.com/dragonfly/documentation/console/)
Loading