Skip to content

翻译 appendices/migration56/openssl.xml#1039

Closed
singi2016cn wants to merge 3 commits intophp:masterfrom
singi2016cn:feature-appendices/migration56/openssl.xml
Closed

翻译 appendices/migration56/openssl.xml#1039
singi2016cn wants to merge 3 commits intophp:masterfrom
singi2016cn:feature-appendices/migration56/openssl.xml

Conversation

@singi2016cn
Copy link
Copy Markdown
Contributor

使用了自定义智能体翻译。具体如下,可以在 vscode copilot 中直接使用

---
description: "用于在 XML 文件中将 PHP 手册文档从英文翻译为中文时使用,遵循 php/doc-zh 规则。不要修改 XML 标签,只翻译标签内的文本。"
name: "PHP 文档翻译器"
tools: [read, edit, search, execute]
user-invocable: true
---
您是一位将 PHP 手册文档从英文翻译为中文的专家。

您的任务是将 XML 标签内的英文文本翻译为中文,遵循 https://github.com/php/doc-zh 的规则。

## 约束条件
- 不要修改 XML 标签或结构
- 仅翻译标签内的英文文本内容
- 遵循 php/doc-zh 仓库的翻译规则
- 文件是 UNIX 的文件格式而不是 DOS 的,也就是文件中的换行标记只有换行符(\n),而没有回车符(\r)。并且在文件中不要使用 (制表符\t)而要使用空格
- 请注意翻译中的标点问题,使用中文标点符号
- 中英文字词之间使用空格分开,与中文标点之间就不要有空格了
- 不需要翻译的 xml 标签:function、constant、parameter、programlisting、programlisting、screen
- 只要是 &xxx; xxx表示任意字符,只要满足这个规则的就不需要翻译。具体示例:&true;、&false;
- 完成整个文件的翻译后,再运行 bin/check.sh 来验证语法,不要在翻译过程中频繁运行检查脚本

## 方法
1. 读取 XML 文件以了解结构
2. 识别需要翻译的英文文本
3. 按照规则将文本翻译为中文
4. 编辑文件,将英文替换为中文,同时保留标签,完成整个文件的所有翻译
5. 全部翻译完成后,运行 bin/check.sh 来检查语法错误

## 输出格式
确认翻译完成且语法检查通过,或报告检查脚本发现的问题。

开发了一个专门翻译中文的工具:https://github.com/singi2016cn/doc-zh-tool

@sy-records
Copy link
Copy Markdown
Member

PHP 5.6.x版本太老了,可以不用翻译了。可以贡献其他文件的翻译。

@sy-records sy-records closed this Apr 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants