rewrite-rustdoc
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRewrite Rustdoc
重写Rustdoc
Ensure all Rust documentation and comments are exclusively written in English, following rustdoc guidelines.
确保所有Rust文档和注释均完全使用英文编写,遵循rustdoc指南。
Steps
步骤
-
Determine which files to process:
- If the user provides a method to find files, use that method.
- Otherwise, assume files are in the directory.
src/ - Proceed immediately to the next steps after acquiring file information.
-
Conduct a comprehensive review to ensure all documentation and comments are in English.
- Any Chinese text in documentation or code comments must be identified and corrected.
- Chinese characters in test case strings are permissible and do not require modification.
- Chinese report files should not be modified — focus on Rust source code files only.
-
Search for Chinese characters in the source code:bash
rg -n "[\u4e00-\u9fff]" src/Check for missing documentation:bashcd src/ && cargo clippy -- -W missing_docsReplacewith the user-specified location if provided.src/ -
Refer tofor documentation structure and style standards.
./docs/rustdoc-guidelines.md -
Ensure all corrections adhere strictly to the documentation guidelines.
-
Repeat the search and revision process iteratively until no further occurrences require modification.
- Do not prompt for confirmation before proceeding to the next item.
- Complete all necessary changes before reporting back.
-
确定要处理的文件:
- 如果用户提供了查找文件的方法,请使用该方法。
- 否则,默认文件位于目录下。
src/ - 获取文件信息后立即进入下一步。
-
进行全面检查,确保所有文档和注释均为英文。
- 必须识别并修正文档或代码注释中的任何中文文本。
- 测试用例字符串中的中文字符是允许的,无需修改。
- 中文报告文件不应修改——仅关注Rust源代码文件。
-
在源代码中搜索中文字符:bash
rg -n "[\u4e00-\u9fff]" src/检查缺失的文档:bashcd src/ && cargo clippy -- -W missing_docs如果用户指定了位置,请将替换为用户指定的路径。src/ -
参考获取文档结构和样式标准。
./docs/rustdoc-guidelines.md -
确保所有修正严格遵循文档指南。
-
反复执行搜索和修订流程,直到没有需要修改的内容为止。
- 在处理下一项之前无需确认。
- 完成所有必要修改后再反馈结果。