[Docs] Fix English punctuation in Chinese API documentation#7794
Merged
SigureMo merged 1 commit intoPaddlePaddle:developfrom Feb 28, 2026
Conversation
Replace English commas (,) and parentheses/colons with Chinese punctuation in Chinese API documentation files, per the documentation standards: - docs/api/paddle/diagonal_scatter_cn.rst: Fix (int, 可选) → (int,可选) - docs/api/paddle/distributed/DistModel_cn.rst: Fix multiple parameters using English comma before 可选 → Chinese comma - docs/api/paddle/distributed/LocalLayer_cn.rst: Fix English commas, parentheses, and colons in Chinese prose text Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7794.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html |
Echo-Nie
approved these changes
Feb 28, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
该 PR 按照仓库中文文档规范,修复了部分中文 API 文档中混用英文标点的问题,以提升中文文档的排版一致性与可读性。
Changes:
- 修正
LocalLayer_cn.rst正文中的英文逗号/括号/冒号为中文标点。 - 统一
DistModel_cn.rst中参数类型标注里 “可选” 前的标点格式。 - 统一
diagonal_scatter_cn.rst中若干参数类型标注的可选标点格式。
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| docs/api/paddle/distributed/LocalLayer_cn.rst | 将正文描述与列表中的部分英文标点替换为中文标点,提升中文排版一致性 |
| docs/api/paddle/distributed/DistModel_cn.rst | 统一多个参数类型标注中 “可选” 的标点格式 |
| docs/api/paddle/diagonal_scatter_cn.rst | 统一 offset/axis1/axis2 参数类型标注中 “可选” 的标点格式 |
Comments suppressed due to low confidence (1)
docs/api/paddle/distributed/LocalLayer_cn.rst:16
- 本段上一行已改为中文标点(如“包含:”),但下面两行仍使用英文标点(
,、:)。建议将“计算设备网格,定义…”等处的英文逗号替换为中文逗号“,”,并将“ProcessMesh:”/“list[Placement]:”的英文冒号替换为中文冒号“:”,保持同一段落内风格一致。
- **out_dist_attrs** (list[tuple[ProcessMesh, list[Placement]]]) - 指定输出张量的分布策略。每个元素是一个元组,包含:
- ProcessMesh: 计算设备网格,定义计算资源的拓扑结构
- list[Placement]: 张量分布方式的列表,描述如何将局部计算结果转换回分布式张量
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题描述
根据文档规范,中文文档中应使用中文标点符号(如逗号
,、括号()、冒号:),而非英文标点(如,、()、:)。本 PR 修复了 3 个 API 文档文件中的英文标点问题。修复内容
docs/api/paddle/diagonal_scatter_cn.rst,替换为中文逗号,:(int, 可选)→(int,可选)(影响offset、axis1、axis2三个参数)docs/api/paddle/distributed/DistModel_cn.rst,替换为中文逗号,:(Loss|Callable|None, 可选)→(Loss|Callable|None,可选)(paddle.optimizer.Optimizer|None, 可选)→(paddle.optimizer.Optimizer|None,可选)(paddle.distributed.Strategy|None, 可选)→(paddle.distributed.Strategy|None,可选)(str|None, 可选)→(str|None,可选)(多处)docs/api/paddle/distributed/LocalLayer_cn.rst,→ 中文逗号,()→ 中文括号():→ 中文冒号:相关规范
根据
.github/copilot-instructions.md中的文档规范: