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 translation for Web Locks API and Barcode Detection API #23628

Merged
merged 2 commits into from
Sep 18, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: BarcodeDetector:getSupportedFormats() 静态方法
slug: Web/API/BarcodeDetector/getSupportedFormats_static
l10n:
sourceCommit: 37299890c7fe7e4d92c1a86a5fa264afc13467e8
sourceCommit: 20c51db7895b1b6f41d4fa90e71830f4b6678eea
---

{{securecontext_header}}{{APIRef("Barcode Detector API")}}{{AvailableInWorkers}}{{SeeCompatTable}}
Expand All @@ -17,7 +17,7 @@ BarcodeDetector.getSupportedFormats()

### 参数

该方法不接收任何参数

### 返回值

Expand Down
10 changes: 5 additions & 5 deletions files/zh-cn/web/api/lockmanager/request/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: LockManager:request() 方法
slug: Web/API/LockManager/request
l10n:
sourceCommit: e4c0939929e1b3e1fa3fd3da82b827fca3ed4c79
sourceCommit: cfb7587e3e3122630ad6cbd94d834ecadbe0a746
---

{{APIRef("Web Locks API")}}{{securecontext_header}} {{AvailableInWorkers}}
Expand Down Expand Up @@ -36,7 +36,7 @@ request(name, options, callback)

- `mode` {{optional_inline}}

- : `"exclusive"` 或 `"shared"` 之一。默认值是· `"exclusive"`。
- : `"exclusive"` 或 `"shared"` 之一。默认值是 `"exclusive"`。

- `ifAvailable` {{optional_inline}}

Expand All @@ -57,7 +57,7 @@ request(name, options, callback)

### 返回值

一个 {{jsxref('Promise')}},在锁释放后解析(或拒绝)回调结果,或者拒绝若请求中止
一个 {{jsxref('Promise')}},在锁释放后兑现(或拒绝)回调结果,或者在请求中止时拒绝

### 异常

Expand All @@ -68,9 +68,9 @@ request(name, options, callback)
- `SecurityError` {{domxref("DOMException")}}
- : 如果无法获取当前环境的锁管理器,则抛出该异常。
- `NotSupportedError` {{domxref("DOMException")}}
- : 如果 `name` 以连字符(`-`)开头,或选项 `steal` 和 `ifAvailable` 均为 `true`,或者选项 `signal` 存在且选项 `steal` 或 `ifAvailable` `true`。
- : 如果 `name` 以连字符(`-`)开头且 `steal` 和 `ifAvailable` 选项均为 `true`,或选项 `signal` 存在且 `steal` 或 `ifAvailable` 选项为 `true` 时,则抛出该异常
- `AbortError` {{domxref("DOMException")}}
- : 如果选项 `signal` 存在并且被中止,则抛出该异常。
- : 如果 `signal` 选项存在并且被中止,则抛出该异常。

## 示例

Expand Down
4 changes: 2 additions & 2 deletions files/zh-cn/web/api/workernavigator/locks/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
title: WorkerNavigator:locks 属性
slug: Web/API/WorkerNavigator/locks
l10n:
sourceCommit: 955d8d3b31be8c89efea86265b0e26a401186dbc
sourceCommit: e8fe043f7d2ad7cd9804d1bf96e0310949f1dac7
---

{{APIRef("Web Locks API")}}{{securecontext_header}}
{{APIRef("Web Locks API")}}{{securecontext_header}}{{AvailableInWorkers("worker")}}

{{domxref("WorkerNavigator")}} 接口的 **`locks`** 只读属性返回一个 {{domxref("LockManager")}} 对象,该对象提供了请求新的 {{domxref('Lock')}} 对象和查询现有的 `Lock` 对象的方法。

Expand Down