Skip to content

将 SDK/ 下所有代码注释翻译为中文#42

Merged
nevstop merged 4 commits intoDev_2026Q2from
copilot/update-comments-to-chinese
Apr 27, 2026
Merged

将 SDK/ 下所有代码注释翻译为中文#42
nevstop merged 4 commits intoDev_2026Q2from
copilot/update-comments-to-chinese

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 27, 2026

SDK/ 目录下三种语言 SDK 的所有代码注释从英文改为中文,每种语言使用独立 commit 提交。

变更内容

  • C SDK (SDK/c/) — 翻译完成

    • include/csm_tcp_router_client.hsrc/csm_tcp_router_client.c
    • examples/basic_usage.cexamples/subscribe_status.c
    • tests/ 下全部测试及辅助文件
  • C# SDK (SDK/csharp/) — 翻译完成

    • src/CsmTcpRouter/CsmTcpRouter.cs(含 XML doc <summary>/<param>/<returns> 等标签内容)
    • examples/BasicUsage/Program.cs
    • tests/CsmTcpRouter.Tests/ 下全部测试文件
  • Python SDK (SDK/python/) — 部分完成

    • src/csm_tcp_router_client.py:协议层、异常类、数据模型、_TransportTcpRouterClient/AsyncTcpRouterClient 类文档主体已翻译
    • examples/tests/ 下各文件的注释尚未完成

翻译原则

  • 仅修改注释和文档字符串,代码逻辑、变量名、函数名、字符串字面量均保持不变
  • 专有名词(CSM-TCP-Router、TCP、Winsock2、pthreads 等)保留英文
  • C# XML doc 标签结构(<summary>@param 等)保持原样,仅翻译描述文本

Copilot AI and others added 4 commits April 27, 2026 14:11
Translated all code comments in 11 C SDK files from English to Chinese,
preserving all code logic, variable names, function names, string literals,
Doxygen tags (@param, @return, etc.) and technical proper names (TCP, CSM,
WSA, POSIX, BSD, Win32, Winsock2, pthreads, CMake, NUL, DLL, etc.).

Files translated:
- SDK/c/include/csm_tcp_router_client.h
- SDK/c/src/csm_tcp_router_client.c
- SDK/c/examples/basic_usage.c
- SDK/c/examples/subscribe_status.c
- SDK/c/tests/test_harness.h
- SDK/c/tests/mock_server.h
- SDK/c/tests/mock_server.c
- SDK/c/tests/test_main.c
- SDK/c/tests/test_client.c
- SDK/c/tests/test_protocol.c
- SDK/c/tests/test_integration.c

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: nevstop <8196752+nevstop@users.noreply.github.com>
@nevstop nevstop marked this pull request as ready for review April 27, 2026 14:35
@nevstop nevstop merged commit 6fc5eff into Dev_2026Q2 Apr 27, 2026
@nevstop nevstop deleted the copilot/update-comments-to-chinese branch April 27, 2026 14:35
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