Skip to content

Commit

Permalink
Ensure the internal links point to zh-CN (Part 4) (#8405)
Browse files Browse the repository at this point in the history
  • Loading branch information
yin1999 authored Sep 10, 2022
1 parent 0faa84f commit 64e2912
Show file tree
Hide file tree
Showing 203 changed files with 414 additions and 419 deletions.
8 changes: 4 additions & 4 deletions files/zh-cn/learn/forms/form_validation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ original_slug: Learn/HTML/Forms/Data_form_validation
<tr>
<th scope="row">预备知识:</th>
<td>
计算机基础能力,对 <a href="/en-US/docs/Learn/HTML">HTML</a>、<a
href="/en-US/docs/Learn/CSS"
计算机基础能力,对 <a href="/zh-CN/docs/Learn/HTML">HTML</a>、<a
href="/zh-CN/docs/Learn/CSS"
>CSS</a
>
和 <a href="/en-US/docs/Learn/JavaScript">JavaScript</a> 有一定的理解。
和 <a href="/zh-CN/docs/Learn/JavaScript">JavaScript</a> 有一定的理解。
</td>
</tr>
<tr>
Expand Down Expand Up @@ -362,7 +362,7 @@ HTML5 提供 [constraint validation API](http://www.w3.org/TR/html5/forms.html#t
</form>
```

在 JavaScript 中,你调用 [`setCustomValidity()`](</en-US/docs/HTML/HTML5/Constraint_validation#Constraint_API's_element.setCustomValidity()>) 方法:
在 JavaScript 中,你调用 [`setCustomValidity()`](/zh-CN/docs/Web/API/HTMLObjectElement/setCustomValidity) 方法:

```js
var email = document.getElementById("mail");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function handleOrientation(orientData) {

### 相关值解释

关于每一个轴的记录值表示的是相对于标准的坐标系,设备在某一个给定轴上的旋转量。[Orientation and motion data explained](/en-US/DOM/Orientation_and_motion_data_explained) 这篇文章有更详细的描述,下面是对这篇文章的总结。
关于每一个轴的记录值表示的是相对于标准的坐标系,设备在某一个给定轴上的旋转量。[Orientation and motion data explained](/zh-CN/DOM/Orientation_and_motion_data_explained) 这篇文章有更详细的描述,下面是对这篇文章的总结。

- {{ domxref("DeviceOrientationEvent.alpha") }} 表示设备沿 z 轴上的旋转角度,范围为 0\~360。
- {{ domxref("DeviceOrientationEvent.beta") }} 表示设备在 x 轴上的旋转角度,范围为-180\~180。它描述的是设备由前向后旋转的情况。
Expand Down Expand Up @@ -153,21 +153,21 @@ window.addEventListener("devicemotion", handleMotion, true);

### 相关值解释

{{ domxref("DeviceMotionEvent") }}对象提供给 web 开发者设备在位置和方向上的改变速度的相关信息。这些变化信息是通过三个轴来体现的。([Orientation and motion data explained](/en-US/docs/Web/Guide/DOM/Events/Orientation_and_motion_data_explained)有更详细的说明。)
{{ domxref("DeviceMotionEvent") }}对象提供给 web 开发者设备在位置和方向上的改变速度的相关信息。这些变化信息是通过三个轴来体现的。([Orientation and motion data explained](/zh-CN/docs/Web/Guide/DOM/Events/Orientation_and_motion_data_explained)有更详细的说明。)

[`acceleration`](/en-US/docs/Web/API/DeviceMotionEvent.acceleration)[`accelerationIncludingGravity`](/en-US/docs/Web/API/DeviceMotionEvent.accelerationIncludingGravity),都包含下面三个轴:
[`acceleration`](/zh-CN/docs/Web/API/DeviceMotionEvent.acceleration)[`accelerationIncludingGravity`](/zh-CN/docs/Web/API/DeviceMotionEvent.accelerationIncludingGravity),都包含下面三个轴:

- `x`: 西向东
- `y`: 南向北
- `z`: 垂直地面

对于 [`rotationRate`](/en-US/docs/Web/API/DeviceMotionEvent.rotationRate) ,情况有点不同;三个轴的信息对应着以下三种情况:
对于 [`rotationRate`](/zh-CN/docs/Web/API/DeviceMotionEvent.rotationRate) ,情况有点不同;三个轴的信息对应着以下三种情况:

- `alpha`: 设备沿着垂直于屏幕(对于桌面设备则是垂直于键盘)的轴的旋转速率
- `beta`: 设备沿着屏幕(对于桌面设备则是键盘)左至右方向的轴的旋转速率 (桌面设备相对于键盘)
- `gamma`: 设备沿着屏幕(对于桌面设备则是键盘)下至上方向的轴的旋转速率

最后,[`interval`](/en-US/docs/Web/API/DeviceMotionEvent.interval) 表示的是从设备获取数据的间隔时间,单位是毫秒。
最后,[`interval`](/zh-CN/docs/Web/API/DeviceMotionEvent.interval) 表示的是从设备获取数据的间隔时间,单位是毫秒。

## 规范

Expand All @@ -181,6 +181,6 @@ window.addEventListener("devicemotion", handleMotion, true);

- {{domxref("DeviceOrientationEvent")}}
- {{domxref("DeviceMotionEvent")}}
- The legacy [`MozOrientation`](/en-US/DOM/MozOrientation) event.
- [Orientation and motion data explained](/en-US/docs/Web/Guide/DOM/Events/Orientation_and_motion_data_explained)
- [Using deviceorientation in 3D Transforms](/en-US/docs/Web/Guide/DOM/Events/Using_device_orientation_with_3D_transforms)
- The legacy [`MozOrientation`](/zh-CN/DOM/MozOrientation) event.
- [Orientation and motion data explained](/zh-CN/docs/Web/Guide/DOM/Events/Orientation_and_motion_data_explained)
- [Using deviceorientation in 3D Transforms](/zh-CN/docs/Web/Guide/DOM/Events/Using_device_orientation_with_3D_transforms)
9 changes: 2 additions & 7 deletions files/zh-cn/web/api/geolocation/watchposition/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,21 +55,16 @@ options = {
id = navigator.geolocation.watchPosition(success, error, options);
```

## 注意

如果你的应用程序运行在 firefox OS 上,请参考下 [geolocation wake lock](</en-US/docs/Web/API/Geolocation/navigator.requestWakeLock()>) ,以便在屏幕关闭的时候,程序可以运行在后台以继续监听位置的变化。

## 规范

{{Specifications}}

## 浏览器兼容性

{{Compat("api.Geolocation.watchPosition")}}
{{Compat}}

## 相关链接
## 参见

- [geolocation wake lock](</en-US/docs/Web/API/Geolocation/navigator.requestWakeLock()>)
- [使用地理位置定位](/zh-CN/docs/WebAPI/Using_geolocation)
- 该方法属于 {{domxref("Geolocation")}},可以通过 {{domxref("NavigatorGeolocation.geolocation")}} 访问。
- 取消监听的方法: {{domxref("Geolocation.clearWatch()")}}
Expand Down
4 changes: 2 additions & 2 deletions files/zh-cn/web/api/payment_request_api/concepts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ paymentRequest.onmerchantvalidation = function(event) {
## 相关文档

- [支付请求 API](/zh-CN/docs/Web/API/Payment_Request_API)
- [Using the Payment Request API](/en-US/docs/Web/API/Payment_Request_API/Using_the_Payment_Request_API)
- [Payment processing concepts](/en-US/docs/Web/API/Payment_Request_API/Concepts)
- [Using the Payment Request API](/zh-CN/docs/Web/API/Payment_Request_API/Using_the_Payment_Request_API)
- [Payment processing concepts](/zh-CN/docs/Web/API/Payment_Request_API/Concepts)
- [Introducing the Payment Request API for Apple Pay](https://webkit.org/blog/8182/introducing-the-payment-request-api-for-apple-pay/)
- [Google Pay API PaymentRequest Tutorial](https://developers.google.com/pay/api/web/guides/paymentrequest/tutorial)
2 changes: 1 addition & 1 deletion files/zh-cn/web/api/paymentaddress/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ slug: Web/API/PaymentAddress
---
{{SeeCompatTable}}{{APIRef("Payment Request API")}}

The **`PaymentAddress`** interface of the [Payment Request API](/en-US/docs/Web/API/Payment_Request_API) stores address information.
The **`PaymentAddress`** interface of the [Payment Request API](/zh-CN/docs/Web/API/Payment_Request_API) stores address information.

## Properties

Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/web/api/performance_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ slug: Web/API/Performance_API
- {{domxref('PerformanceMeasure')}}
- : 条目类型为"`measure`"的{{domxref('PerformanceEntry')}}抽象接口,该类型的条目通过调用{{domxref("Performance.measure","measure()")}}在浏览器的性能时间轴的两个标记之间添加一个命名的{{domxref("DOMHighResTimeStamp")}}(measure)来创建。
- {{domxref('PerformanceNavigationTiming')}}
- : 提供方法和属性,用于存储和检索有关浏览器文档导航事件的[高采样率时间戳](/en-US/docs/Web/API/DOMHighResTimeStamp)或其他指标。
- : 提供方法和属性,用于存储和检索有关浏览器文档导航事件的[高采样率时间戳](/zh-CN/docs/Web/API/DOMHighResTimeStamp)或其他指标。
- {{domxref('PerformanceObserver')}}
- : 提供方法和属性,用于观察性能测量事件,并在浏览器的性能时间轴中记录新的{{domxref('PerformanceEntry')}}时进行通知。
- {{domxref('PerformanceResourceTiming')}}
Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/web/api/performance_property/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: Window.performance
slug: Web/API/performance_property
---
{{APIREf}}Web Performance API 允许网页访问某些函数来测量网页和 Web 应用程序的性能,包括 [Navigation Timing](/en-US/docs/Navigation_timing) API 和高分辨率时间数据。
{{APIREf}}Web Performance API 允许网页访问某些函数来测量网页和 Web 应用程序的性能,包括 [Navigation Timing](/zh-CN/docs/Navigation_timing) API 和高分辨率时间数据。

## 方法

Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/web/api/performancetiming/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ _`PerformanceTiming` 接口不包含任何继承属性。_
**`Performance` **接口不包含任何方法。

- {{domxref("PerformanceTiming.toJSON()")}} {{non-Standard_Inline}}
- : 是一个 JSON 格式化工具,返回一个 [JSON 对象](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON),代表具体的 `PerformanceTiming` 对象。
- : 是一个 JSON 格式化工具,返回一个 [JSON 对象](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON),代表具体的 `PerformanceTiming` 对象。

## 规范

Expand Down
2 changes: 1 addition & 1 deletion files/zh-cn/web/api/periodicwave/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ _None; 而且,`PeriodicWave` 继承任何属性。_

## 参见

- [Using the Web Audio API](/en-US/docs/Web_Audio_API/Using_Web_Audio_API)
- [Using the Web Audio API](/zh-CN/docs/Web_Audio_API/Using_Web_Audio_API)
14 changes: 7 additions & 7 deletions files/zh-cn/web/api/permissions_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ The **Permissions API** provides a consistent programmatic way to query the stat

## Concepts and usage

Historically different APIs handle their own permissions inconsistently — for example the [Notifications API](/en-US/docs/Web/API/Notifications_API) allows for explicit checking of permission status and requesting permission, whereas the [Geolocation API](/en-US/docs/Web/API/Geolocation) doesn't (which causes problems if the user denied the initial permission request). The Permissions API provides the tools to allow developers to implement a better user experience as far as permissions are concerned.
Historically different APIs handle their own permissions inconsistently — for example the [Notifications API](/zh-CN/docs/Web/API/Notifications_API) allows for explicit checking of permission status and requesting permission, whereas the [Geolocation API](/zh-CN/docs/Web/API/Geolocation) doesn't (which causes problems if the user denied the initial permission request). The Permissions API provides the tools to allow developers to implement a better user experience as far as permissions are concerned.

The `permissions` property has been made available on the {{domxref("Navigator")}} object, both in the standard browsing context and the worker context ({{domxref("WorkerNavigator")}} — so permission checks are available inside workers), and returns a {{domxref("Permissions")}} object that provides access to the Permissions API functionality.

Once you have this object you can then perform permission-related tasks, for example querying a permission using the {{domxref("Permissions.query()")}} method to return a promise that resolves with the {{domxref("PermissionStatus")}} for a specific API.

Not all APIs' permission statuses can be queried using the Permissions API. Notable APIs that are Permissions-aware include:

- [Clipboard API](/en-US/docs/Web/API/Clipboard_API)
- [Notifications API](/en-US/docs/Web/API/Notifications_API)
- [Push API](/en-US/docs/Web/API/Push_API)
- [Clipboard API](/zh-CN/docs/Web/API/Clipboard_API)
- [Notifications API](/zh-CN/docs/Web/API/Notifications_API)
- [Push API](/zh-CN/docs/Web/API/Push_API)
- Web MIDI API

More APIs will gain Permissions API support over time.
Expand All @@ -27,7 +27,7 @@ More APIs will gain Permissions API support over time.

We have made a simple example available called Location Finder. You can [run the example live](https://chrisdavidmills.github.io/location-finder-permissions-api/), or [view the source code on Github](https://github.com/chrisdavidmills/location-finder-permissions-api/tree/gh-pages).

Read more about how it works in our article [Using the Permissions API](/en-US/docs/Web/API/Permissions_API/Using_the_Permissions_API).
Read more about how it works in our article [Using the Permissions API](/zh-CN/docs/Web/API/Permissions_API/Using_the_Permissions_API).

## Interfaces

Expand All @@ -50,7 +50,7 @@ Read more about how it works in our article [Using the Permissions API](/en-US/d

## See also

- [Using the Permissions API](/en-US/docs/Web/API/Permissions_API/Using_the_Permissions_API)
- [Using the Permissions API](/zh-CN/docs/Web/API/Permissions_API/Using_the_Permissions_API)
- [Using the Permissions API to Detect How Often Users Allow or Deny Camera Access](https://blog.addpipe.com/using-permissions-api-to-detect-getusermedia-responses/)
- {{DOMxRef("Notification.permission")}}
- [Privacy, permissions, and information security](/en-US/docs/Web/Privacy)
- [Privacy, permissions, and information security](/zh-CN/docs/Web/Privacy)
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ handlePermission();

### 权限描述符

{{domxref("Permissions.query()")}} 方法接受一个 `PermissionDescriptor` 字典作为参数 — 它包含你感兴趣的 API 的名称。一些 API 有继承自默认的 `PermissionDescriptor` 的更加复杂的 `PermissionDescriptor`s 以包含更多额外的信息。例如,`PushPermissionDescriptor` 也包含一个比尔值指定 [`userVisibleOnly`](https://developer.mozilla.org/en-US/docs/Web/API/PushManager/subscribe#Parameters)`true` 还是 `false`.
{{domxref("Permissions.query()")}} 方法接受一个 `PermissionDescriptor` 字典作为参数 — 它包含你感兴趣的 API 的名称。一些 API 有继承自默认的 `PermissionDescriptor` 的更加复杂的 `PermissionDescriptor`s 以包含更多额外的信息。例如,`PushPermissionDescriptor` 也包含一个比尔值指定 [`userVisibleOnly`](/zh-CN/docs/Web/API/PushManager/subscribe#Parameters)`true` 还是 `false`.

### 重置权限

Expand Down
6 changes: 3 additions & 3 deletions files/zh-cn/web/api/pointer_lock_api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ slug: Web/API/Pointer_Lock_API

## 基本概念

指针锁定和[鼠标捕获](/en/DOM/element.setCapture)有关。鼠标捕获在一个鼠标被拖曳时可以向一个目标元素持续传递有关事件,但是当鼠标按钮被放开时就会停止。指针锁定和鼠标捕获在以下方面有所不同:
指针锁定和[鼠标捕获](/zh-CN/DOM/element.setCapture)有关。鼠标捕获在一个鼠标被拖曳时可以向一个目标元素持续传递有关事件,但是当鼠标按钮被放开时就会停止。指针锁定和鼠标捕获在以下方面有所不同:

- 它是持久性的。指针锁定不释放鼠标,直到作出一个显式的 API 调用或是用户使用一个专门的释放手势。
- 它不局限于浏览器或者屏幕边界。
Expand Down Expand Up @@ -185,7 +185,7 @@ partial interface MouseEvent {

> **备注:** movement 属性目前在 Firefox 中被加上前缀为 `.mozMovementX``.mozMovementY` , 在 Chrome 中为`.webkitMovementX``.webkitMovementY`
鼠标事件的两个新参数—`movementX``movementY`—提供了鼠标位置的变化情况。这两个参数的值,等于两个[`MouseEvent`](/en/DOM/MouseEvent) 属性( `screenX``screenY)`之间值的变化程度,这些 MouseEvent 属性被存储在两个连续的鼠标移动事件( `eNow``ePrevious`)中。换言之,指针锁定参数 `movementX = eNow.screenX - ePrevious.screenX`。(译注:不存在名为 eNow 或 ePrevious 的事件或属性,eNow 代指当前的鼠标移动事件,ePrevious 代指前一个鼠标移动事件)
鼠标事件的两个新参数—`movementX``movementY`—提供了鼠标位置的变化情况。这两个参数的值,等于两个[`MouseEvent`](/zh-CN/DOM/MouseEvent) 属性( `screenX``screenY)`之间值的变化程度,这些 MouseEvent 属性被存储在两个连续的鼠标移动事件( `eNow``ePrevious`)中。换言之,指针锁定参数 `movementX = eNow.screenX - ePrevious.screenX`。(译注:不存在名为 eNow 或 ePrevious 的事件或属性,eNow 代指当前的鼠标移动事件,ePrevious 代指前一个鼠标移动事件)

### 锁定状态

Expand All @@ -211,4 +211,4 @@ partial interface MouseEvent {

[W3C Pointer Lock API Specification](http://dvcs.w3.org/hg/pointerlock/raw-file/default/index.html)

[MouseEvent](/en/DOM/MouseEvent)
[MouseEvent](/zh-CN/DOM/MouseEvent)
8 changes: 4 additions & 4 deletions files/zh-cn/web/api/pushmessagedata/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ slug: Web/API/PushMessageData
---
{{APIRef("Push API")}}{{SeeCompatTable()}}

The **`PushMessageData`** interface of the [Push API](/en-US/docs/Web/API/Push_API) provides methods which let you retrieve the push data sent by a server in various formats.
The **`PushMessageData`** interface of the [Push API](/zh-CN/docs/Web/API/Push_API) provides methods which let you retrieve the push data sent by a server in various formats.

Unlike the similar methods in the [Fetch API](/en-US/docs/Web/API/Fetch_API), which only allow the method to be invoked once, these methods can be called multiple times.
Unlike the similar methods in the [Fetch API](/zh-CN/docs/Web/API/Fetch_API), which only allow the method to be invoked once, these methods can be called multiple times.

## Properties

Expand All @@ -19,7 +19,7 @@ None.
- {{domxref("PushMessageData.blob()")}}
- : Extracts the data as a {{domxref("Blob")}} object.
- {{domxref("PushMessageData.json()")}}
- : Extracts the data as a [JSON](/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON) object.
- : Extracts the data as a [JSON](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON) object.
- {{domxref("PushMessageData.text()")}}
- : Extracts the data as a plain text string.

Expand Down Expand Up @@ -60,4 +60,4 @@ self.addEventListener('push', function(event) {

## See also

- [Using the Push API](/en-US/docs/Web/API/Push_API/Using_the_Push_API)
- [Using the Push API](/zh-CN/docs/Web/API/Push_API/Using_the_Push_API)
6 changes: 3 additions & 3 deletions files/zh-cn/web/api/pushmessagedata/json/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ slug: Web/API/PushMessageData/json
---
{{APIRef("Push API")}}{{SeeCompatTable()}}

{{domxref("PushMessageData")}} 接口的 **`json()`**方法将推送消息数据提取为 一个 [JSON](/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON) 对象。
{{domxref("PushMessageData")}} 接口的 **`json()`**方法将推送消息数据提取为 一个 [JSON](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON) 对象。

## Syntax

Expand All @@ -18,7 +18,7 @@ None.

### Returns

A [JSON](/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON) object.
A [JSON](/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/JSON) object.

## Examples

Expand All @@ -40,4 +40,4 @@ self.addEventListener('push', function(event) {

## See also

- [Using the Push API](/en-US/docs/Web/API/Push_API/Using_the_Push_API)
- [Using the Push API](/zh-CN/docs/Web/API/Push_API/Using_the_Push_API)
Loading

0 comments on commit 64e2912

Please sign in to comment.