Skip to content

zh-cn: update web/api/indexeddb_api/using_indexeddb#35198

Open
PassionPenguin wants to merge 4 commits intomdn:mainfrom
PassionPenguin:update-zh-cn-bcSc9ThQ
Open

zh-cn: update web/api/indexeddb_api/using_indexeddb#35198
PassionPenguin wants to merge 4 commits intomdn:mainfrom
PassionPenguin:update-zh-cn-bcSc9ThQ

Conversation

@PassionPenguin
Copy link
Copy Markdown
Contributor

@PassionPenguin PassionPenguin commented Apr 15, 2026

fix #35090

@PassionPenguin PassionPenguin requested a review from a team as a code owner April 15, 2026 08:16
@PassionPenguin PassionPenguin requested review from jasonren0403 and removed request for a team April 15, 2026 08:16
@PassionPenguin PassionPenguin marked this pull request as draft April 15, 2026 08:17
@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Apr 15, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

Preview URLs (1 page)

Flaws (2)

Found an unexpected or unresolvable flaw? Please report it here.

URL: /zh-CN/docs/Web/API/IndexedDB_API/Using_IndexedDB
Title: 使用 IndexedDB
Flaw count: 2

  • macros:
    • Macro defaultapisidebar produces link /zh-CN/docs/Web/API/IndexedDB_API/Basic_Concepts_Behind_IndexedDB which doesn't resolve
    • Macro defaultapisidebar produces link /zh-CN/docs/Web/API/IndexedDB_API/Browser_storage_limits_and_eviction_criteria which is a redirect
External URLs (18)

URL: /zh-CN/docs/Web/API/IndexedDB_API/Using_IndexedDB
Title: 使用 IndexedDB

(comment last updated: 2026-04-15 14:48:42)

@PassionPenguin PassionPenguin marked this pull request as ready for review April 15, 2026 09:18
Comment on lines +590 to +592
console.log(
"本页面的一个新版本已就绪,请刷新网页以加载!",
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[mdn-linter] reported by reviewdog 🐶

Suggested change
console.log(
"本页面的一个新版本已就绪,请刷新网页以加载!",
);
console.log("本页面的一个新版本已就绪,请刷新网页以加载!");

// 当所有数据都添加到数据库后执行某些操作。
transaction.oncomplete = (event) => {
console.log("全部完成了!");
console.log("All done!");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

这里是不是要翻译,按照前面的revier 习惯?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

感谢,已修改

## 关于本文档

本篇教程将指导你如何使用 IndexedDB 的异步 API。如果你对 IndexedDB 还不熟悉,你应该首先阅读文章:[IndexedDB 的关键特性和基本术语](/zh-CN/docs/Web/API/IndexedDB_API/Basic_Terminology)。
本教程将带你了解如何使用 IndexedDB 的异步 API。如果你还不熟悉 IndexedDB,建议先阅读 [IndexedDB 的关键特性和基本术语](/zh-CN/docs/Web/API/IndexedDB_API/Basic_Terminology)一文
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

这里中文对应的文档没有,是不是要改成这个: Basic_Terminology 中文页面不存在
。 特别是对应的片段这些都不能用

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

rari会自动处理好不存在的页面的提示或直接重定向到en-US页面去的

如果请求成功,会触发 {{domxref("IDBRequest.success_event", "success")}} 事件,并调用赋给 `onsuccess` 参数的函数。请求失败时,会触发 {{domxref("IDBRequest.error_event", "error")}} 事件,并调用赋给 `onerror` 参数的函数

IndexedDB API 以满足尽可能地减少对错误处理的需求而设计,所以你可能不会看到有很多的错误事件(至少,不会在你已经习惯了这些 API 之后!)。然而在打开数据库的情况下,还是有一些会产生错误事件的常见情况。最有可能出现的问题是用户决定不允许你的 web 应用创建数据库。IndexedDB 的主要设计目标之一就是允许大量数据可以被存储以供离线使用。(要了解关于针对每个浏览器你可以有多少存储空间的更多内容,请参见[浏览器存储限制和清理标准页面的数据存储限制](/zh-CN/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria#数据存储限制))。
IndexedDB API 的设计目标之一是尽量减少你对错误处理的需求,因此你通常不会频繁遇到错误事件(至少在你熟悉 API 后是这样)。但在打开数据库时,确实有一些常见情况会触发错误事件。最常见的问题是:用户不允许你的 Web 应用创建数据库。IndexedDB 的核心设计目标之一,就是允许为离线使用存储大量数据。(关于各浏览器可用存储量,参见“浏览器存储配额与清理标准”中的[可存储多少数据?](/zh-CN/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria#how_much_data_can_be_stored)一文。)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

佬, 这个 可存储多少数据?, 好像对应是:
[数据存储在哪里?]的数据存储限制的片段标识,不过,这个文档也明显过时了。cc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

漏了:(

Co-authored-by: Totoro-jam <moqiuchen66@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

l10n-zh Issues related to Chinese content.

Projects

Status: Review requested

Development

Successfully merging this pull request may close these issues.

页面中的"Firefox"单词存在拼写错误

2 participants