Skip to content

🔄 Sync official NestJS docs - 2026-04-19#468

Merged
zuohuadong merged 3 commits into
mainfrom
sync/docs-2026-04-19
Apr 19, 2026
Merged

🔄 Sync official NestJS docs - 2026-04-19#468
zuohuadong merged 3 commits into
mainfrom
sync/docs-2026-04-19

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

📋 同步摘要

同步信息

变更类型

  • ✅ 内容同步:检测到变更并已翻译

  • ✅ 翻译更新:使用 Cloudflare Workers AI 更新

⚠️ 翻译完整性警告

检测到部分翻译可能不完整,请在校对时重点检查以下文件:

  • 内容行数比例过低
  • 代码块数量不匹配
  • 中文字符数量不足

建议运行 bun run check-translation-integrity:verbose 查看详细信息。

变更文件

M	README.md
M	content/microservices/kafka.md
M	content/pipes.md
M	content/security/authentication.md
M	content/techniques/caching.md
M	content/techniques/validation.md

此 PR 由自动化工作流创建,请在校对后合并。

@github-actions github-actions Bot added sync 自动同步相关 translation 自动同步相关 labels Apr 19, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Apr 19, 2026

Deploying nestjs with  Cloudflare Pages  Cloudflare Pages

Latest commit: f1050cb
Status: ✅  Deploy successful!
Preview URL: https://5a58dc52.nestjs.pages.dev
Branch Preview URL: https://sync-docs-2026-04-19.nestjs.pages.dev

View logs

Copy link
Copy Markdown
Contributor

@zuohuadong zuohuadong left a comment

Choose a reason for hiding this comment

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

发现两个会直接影响发布结果的问题:

  1. 这次同步只更新了 content/ 下的英文源文件,但对应的 docs/ 中文生成文件没有同步更新。站点构建入口仍然是 docs/,所以合并后线上不会反映这次 Kafka / Pipes / Validation / Caching / Authentication 的更新。

  2. 本地执行 bun run validate-translation 失败,错误落在 docs/microservices/kafka.md,代码块数量与 content/microservices/kafka.md 不一致;docs/pipes.md 也没有带上这次新增的 ZodValidationPipe 参数级示例。

建议先重新跑翻译/生成流程,把 docs/ 对应文件更新到位并确保校验通过,再合并。

Copy link
Copy Markdown
Contributor

@zuohuadong zuohuadong left a comment

Choose a reason for hiding this comment

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

已补齐 docs/ 对应中文页,并修复这次同步涉及的关键文档差异:

  • docs/pipes.md 补上 ZodValidationPipe 参数级示例
  • docs/microservices/kafka.md 同步 Kafka retry filter 新示例,并去掉重复代码块
  • docs/security/authentication.md / docs/techniques/caching.md / docs/techniques/validation.md 同步本次上游 API 示例更新

本地已验证:

  • bun run validate-translation 通过(仅保留仓库已有 warnings)
  • bun run build 通过

check-translation-integrity 仍有仓库中其他历史页面告警,但本次 Kafka 页面已从 error 降为 warning。

@github-actions
Copy link
Copy Markdown
Contributor Author

🤖 AI 校对报告

校对状态

  • 占位符检查: 通过
  • ⚠️ AI 校对: 发现 3 个问题
  • 🔄 自动修复: 已应用,等待重新校对

详细校对结果

📄 docs/microservices/kafka.md
## 问题列表

- 文件: kafka.md
  问题: 中文翻译中有多处语法错误和不准确的翻译,例如 "类似于消息队列或企业消息系统" 中的 "类似于" 可以被删除。
  建议: 重新翻译文档,确保翻译准确且语法正确。

- 文件: kafka.md
  问题: 表格中的链接在翻译时被破坏,例如 `<a href="https://kafka.js.org/docs/configuration" rel="nofollow" target="blank">此处</a>` 中的链接被破坏。
  建议: 检查表格中的链接是否正确,并将其修复。

- 文件: kafka.md
  问题: 文档中有未翻译的英文内容,例如 `Transport` 枚举和 `@Client()` 装饰器的注释。
  建议: 重新翻译文档,确保所有英文内容被翻译。

- 文件: kafka.md
  问题: 文档中有格式问题,例如表格中的边框和内边距不对称。
  建议: 修复表格的格式问题,以提高文档的可读性。

📄 docs/pipes.md
## 问题列表

- 文件: pipes.md
  问题: 文件中出现了空行和多余的换行符,影响了文档的可读性和格式。
  建议: 请删除空行和多余的换行符,以保持文档的格式和可读性。

✅ 校对通过

📄 docs/security/authentication.md
## 问题列表

- 文件: security/authentication.md
  问题: 文件中的某些部分未翻译
  建议: 对于英文代码注释和专有名词,保持英文不翻译;对于其他文本内容,进行翻译。

例如,文件中的以下部分未翻译:

* `// This should be a real class/interface representing a user entity`
* `// instead of the user object`
* `// TODO: Generate a JWT and return it here`
* `// instead of the user object`
* `@Dependencies(UsersService)`
* `bcrypt`

这些部分可以保持英文不翻译,以免翻译错误或影响代码的可读性。

📄 docs/techniques/caching.md
## 问题列表
- 文件: caching.md
  问题: 缓存.md 文件中有部分翻译错误

此评论由 AI 校对工作流自动生成

github-actions Bot added a commit that referenced this pull request Apr 19, 2026
@zuohuadong zuohuadong force-pushed the sync/docs-2026-04-19 branch from 7fa55c2 to f1050cb Compare April 19, 2026 08:44
@github-actions
Copy link
Copy Markdown
Contributor Author

🤖 AI 校对报告

校对状态

  • 占位符检查: 通过
  • ⚠️ AI 校对: 发现 3 个问题

详细校对结果

📄 docs/microservices/kafka.md
## 问题列表

- 文件: kafka.md
  问题: 有些英文内容未翻译,格式不正确
  建议: 翻译未翻译的英文内容,并检查格式是否正确

例如,在 "表格" 部分,英文内容 "boolean" 未翻译。

另外,在 "客户端" 部分,代码格式不正确,需要添加代码块的语法高亮。

此外,在 "消息模式" 部分,有些英文内容未翻译,例如 "CorrelationIdentifier" 和 "ReturnAddress"。

需要翻译这些英文内容,并检查格式是否正确。

📄 docs/pipes.md
## 问题列表

- 文件: pipes.md
  问题: 文件中有多处未翻译的英文内容,包括代码注释、专有名词和部分提示信息。
  建议: 对这些内容进行翻译,以保持文档的统一性和可读性。

例如,代码注释中出现了 "numeric string is expected","Version 3, 4 or 5 of UUID" 等内容,需要翻译成中文。

同时,部分提示信息也需要翻译,例如 "Validation failed"、"Bad Request" 等。

请确保翻译的结果是准确、自然和易读的。

📄 docs/security/authentication.md
## 问题列表

- 文件: authentication.md
  问题: 文件中有多个未翻译的英文内容,包括代码注释、链接和专有名词。
  建议: 将这些内容翻译成中文,以提高文档的可读性和可访问性。

例如,以下是一些未翻译的英文内容:

* "bearer token":可以翻译成“承载令牌”
* "UsersService":可以翻译成“用户服务”
* "UsersModule":可以翻译成“用户模块”
* "bcrypt":可以翻译成“bcrypt 加密库”

此外,文件中的英文断句和标点符号也需要检查和调整,以确保文档的格式和布局正确。

📄 docs/techniques/caching.md
## 问题列表

- 文件: caching.md
  问题: 文件中的英文代码块有一些未翻译的内容
  建议: 将英文代码块翻译成中文,保持文件的整体一致性

此评论由 AI 校对工作流自动生成

@zuohuadong zuohuadong merged commit 082fe14 into main Apr 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

sync 自动同步相关 translation 自动同步相关

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants