Skip to content

Translations update from Boost-Weblate#2

Open
whisper67265 wants to merge 7 commits into
local-zh_Hansfrom
translation-zh_Hans-boost-1.91.0
Open

Translations update from Boost-Weblate#2
whisper67265 wants to merge 7 commits into
local-zh_Hansfrom
translation-zh_Hans-boost-1.91.0

Conversation

@whisper67265

@whisper67265 whisper67265 commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Translations update from Boost-Weblate for Boost Beast Translation (zh_Hans)/Doc / Qbk / Version (qbk).

It also includes following components:

Current translation status:

Weblate translation status

Summary by CodeRabbit

  • Documentation
    • Expanded and localized multiple Quickbook guides and concept references into Simplified Chinese.
    • Clarified content around asynchronous models, CompletionToken behavior, WebSocket message/frame guidance, HTTP Body, BufferSequence, and File requirements.
    • Updated HTTP message design explanations, including request/response container modeling and header construction details.
    • Preserved the original document structure while improving clarity and readability for Chinese-speaking readers.

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: bd1c23ab-6433-4817-9b11-3384ec0d685b

📥 Commits

Reviewing files that changed from the base of the PR and between 44c8888 and 895f225.

📒 Files selected for processing (7)
  • doc/qbk/01_intro/_intro_zh_Hans.qbk
  • doc/qbk/03_core/1_refresher_zh_Hans.qbk
  • doc/qbk/06_websocket/04_messages_zh_Hans.qbk
  • doc/qbk/07_concepts/Body_zh_Hans.qbk
  • doc/qbk/07_concepts/BufferSequence_zh_Hans.qbk
  • doc/qbk/07_concepts/File_zh_Hans.qbk
  • doc/qbk/08_design/1_http_message_zh_Hans.qbk
✅ Files skipped from review due to trivial changes (7)
  • doc/qbk/01_intro/_intro_zh_Hans.qbk
  • doc/qbk/07_concepts/Body_zh_Hans.qbk
  • doc/qbk/03_core/1_refresher_zh_Hans.qbk
  • doc/qbk/07_concepts/BufferSequence_zh_Hans.qbk
  • doc/qbk/06_websocket/04_messages_zh_Hans.qbk
  • doc/qbk/08_design/1_http_message_zh_Hans.qbk
  • doc/qbk/07_concepts/File_zh_Hans.qbk

📝 Walkthrough

Walkthrough

Simplified Chinese translations replace English prose across the intro, core refresher, WebSocket messages, HTTP concept docs, and HTTP message design chapter, while preserving the existing structure, tables, and references.

Changes

Simplified Chinese QuickBook documentation updates

Layer / File(s) Summary
Intro and core refresher
doc/qbk/01_intro/_intro_zh_Hans.qbk, doc/qbk/03_core/1_refresher_zh_Hans.qbk
Intro note text and the refresher sections are translated to Simplified Chinese, including the async-operation model and the networking-library table.
WebSocket messages
doc/qbk/06_websocket/04_messages_zh_Hans.qbk
The WebSocket messages and frames sections are rewritten in Simplified Chinese while preserving the existing tables and links.
Body and BufferSequence concepts
doc/qbk/07_concepts/Body_zh_Hans.qbk, doc/qbk/07_concepts/BufferSequence_zh_Hans.qbk
The HTTP Body concept, its size requirements, and the BufferSequence introduction are translated to Simplified Chinese.
File concept requirements
doc/qbk/07_concepts/File_zh_Hans.qbk
The File concept description, associated types, requirements table, and headings are rewritten in Simplified Chinese.
HTTP message setup
doc/qbk/08_design/1_http_message_zh_Hans.qbk
The opening design sections translate the HTTP message modeling problem, initial container forms, and request/response specialization setup.
HTTP message headers
doc/qbk/08_design/1_http_message_zh_Hans.qbk
The middle design sections translate the shared message interface, header abstraction, constructor support, and allocator-related discussion.
HTTP message wrap-up
doc/qbk/08_design/1_http_message_zh_Hans.qbk
The closing design sections translate the template-parameter changes, request/response aliases, examples, and design summary.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • CppDigest/beast#1: Shares the same zh-Hans QuickBook documentation targets, including the refresher, WebSocket, concept, and HTTP design chapters.

Poem

兔耳一抖,月光照书页,
英文段落悄悄换成中文诗。
我啃着胡萝卜,读着消息帧,
还看见 HTTP 设计在闪烁。
啾,文档亮晶晶,真开心呀!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: a translation update sourced from Boost-Weblate.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch translation-zh_Hans-boost-1.91.0

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 9

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@doc/qbk/01_intro/_intro_zh_Hans.qbk`:
- Around line 39-41: The zh_Hans translation block is incomplete because the
localized [important] note still contains English text. Update the
mixed-language sentence in this intro section so the entire paragraph is fully
translated into Simplified Chinese, keeping the meaning aligned with the
existing Asio-focused wording and the guidance about asynchronous interfaces,
callbacks, and coroutines.

In `@doc/qbk/03_core/1_refresher_zh_Hans.qbk`:
- Around line 147-151: The async_result/use_future description is reversing the
API contract: update the wording around `net::async_result`,
`net::async_initiate`, and the internal completion handler so it says the caller
receives a `std::future` while an internal `std::promise` is fulfilled by the
handler. Adjust the sentence near the `use_future` example to match this
relationship and avoid stating that the initiating function returns a promise.

In `@doc/qbk/06_websocket/04_messages_zh_Hans.qbk`:
- Around line 18-21: The caution block in the translated websocket messages doc
still contains leftover English text; remove the stray sentence from the block
in the qbk content and keep only the Chinese wording. Check the existing caution
section around the untranslated fragment and ensure the final block is fully
localized with no duplicate English meaning left behind.
- Line 67: Restore the QuickBook macro syntax for MutableBufferSequence in the
translated message text by using the same __...__ delimiters as the English
source. Update the content in the messages document so the reference to
MutableBufferSequence is written as a QuickBook type/link macro rather than
plain text, ensuring the markup is consistent with other symbols in this
section.

In `@doc/qbk/07_concepts/Body_zh_Hans.qbk`:
- Around line 25-26: The `m` bullet in the zh_Hans Body page is only partially
translated, leaving the `F` requirement clause in English. Update the
`message<b,B,F>` bullet so the entire requirement description is in Chinese,
preserving the meaning of the `F`/`__Fields__` condition while keeping the
existing terminology consistent with the surrounding translation.

In `@doc/qbk/07_concepts/BufferSequence_zh_Hans.qbk`:
- Line 12: The inline concept identifier in the BufferSequence concept page is
localized incorrectly; keep the canonical concept name unchanged while
localizing only the surrounding prose. Update the `[*缓冲区序列]` reference in this
section to use `[*BufferSequence]` so it matches the upstream concept name and
stays consistent with the other zh_Hans concept pages.

In `@doc/qbk/07_concepts/File_zh_Hans.qbk`:
- Around line 23-24: The `p` definition in the `File` requirements list is only
partially translated, with the “null terminated utf-8 encoded string” tail still
left in English. Update the wording in the `File_zh_Hans.qbk` section for `p` so
the entire definition is fully translated into Chinese, keeping the meaning of
the original `char const*` description intact.

In `@doc/qbk/08_design/1_http_message_zh_Hans.qbk`:
- Around line 26-37: The formal definitions block in the HTTP message design
section is only partially translated, leaving the `x`, `S(m)`, and `P(x)`
definitions in English and `P(x)` incomplete; update this block in the same
section so all bullets are fully translated into Chinese while preserving the
mathematical meaning and the references to `m`, `x`, `S(m)`, and `P(x)`.
- Line 94: Correct the translated API declarations so they match the actual type
shapes in the C++ reference: update the `message<false, Fields, Body>`
specialization to remove the stray `bool isRequest` template parameter, restore
the missing `template<class Fields>` on `header<false, Fields>`, and remove the
incorrect `Body` parameter from the `header` declaration since `header` only
depends on `isRequest` and `Fields`. Keep the surrounding `message` and `header`
snippets consistent with the corresponding symbols in the doc.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f01bfc9b-b8f7-4cdd-8bdb-81799fccbe77

📥 Commits

Reviewing files that changed from the base of the PR and between 05c703b and 44c8888.

📒 Files selected for processing (7)
  • doc/qbk/01_intro/_intro_zh_Hans.qbk
  • doc/qbk/03_core/1_refresher_zh_Hans.qbk
  • doc/qbk/06_websocket/04_messages_zh_Hans.qbk
  • doc/qbk/07_concepts/Body_zh_Hans.qbk
  • doc/qbk/07_concepts/BufferSequence_zh_Hans.qbk
  • doc/qbk/07_concepts/File_zh_Hans.qbk
  • doc/qbk/08_design/1_http_message_zh_Hans.qbk

Comment on lines +39 to 41
该库面向熟悉 __Asio__的程序员。用户
wish to use asynchronous interfaces should already know how to
create concurrent network programs using callbacks or coroutines.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Complete this zh_Hans translation block.

Line 40-Line 41 are still in English inside the localized [important] note, so this section reads as a partial translation.

Suggested fix
 [important
-    该库面向熟悉 __Asio__的程序员。用户
-    wish to use asynchronous interfaces should already know how to
-    create concurrent network programs using callbacks or coroutines.
+    该库面向熟悉 __Asio__ 的程序员。希望使用异步接口的用户,
+    应当已经了解如何使用回调或协程来编写并发网络程序。
 ]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
该库面向熟悉 __Asio__的程序员。用户
wish to use asynchronous interfaces should already know how to
create concurrent network programs using callbacks or coroutines.
[important
该库面向熟悉 __Asio__ 的程序员。希望使用异步接口的用户,
应当已经了解如何使用回调或协程来编写并发网络程序。
]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@doc/qbk/01_intro/_intro_zh_Hans.qbk` around lines 39 - 41, The zh_Hans
translation block is incomplete because the localized [important] note still
contains English text. Update the mixed-language sentence in this intro section
so the entire paragraph is fully translated into Simplified Chinese, keeping the
meaning aligned with the existing Asio-focused wording and the guidance about
asynchronous interfaces, callbacks, and coroutines.

Comment thread doc/qbk/03_core/1_refresher_zh_Hans.qbk
Comment thread doc/qbk/06_websocket/04_messages_zh_Hans.qbk
][
Read part of a message into a __MutableBufferSequence__.
]
][将消息的部分内容读入 MutableBufferSequence。]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Restore QuickBook macro syntax for MutableBufferSequence.

Line 67 uses bare MutableBufferSequence without the required __ delimiters. The English original uses __MutableBufferSequence__, which QuickBook expands to a link/type reference. Removing the underscores breaks macro expansion and may render incorrect output.

-    ][将消息的部分内容读入 MutableBufferSequence。]
+    ][将消息的部分内容读入 __MutableBufferSequence__。]
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
][将消息的部分内容读入 MutableBufferSequence。]
][将消息的部分内容读入 __MutableBufferSequence__。]
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@doc/qbk/06_websocket/04_messages_zh_Hans.qbk` at line 67, Restore the
QuickBook macro syntax for MutableBufferSequence in the translated message text
by using the same __...__ delimiters as the English source. Update the content
in the messages document so the reference to MutableBufferSequence is written as
a QuickBook type/link macro rather than plain text, ensuring the markup is
consistent with other symbols in this section.

Comment on lines +25 to 26
* `m` 是类型为 `message<b,B,F>` 的值,其中 `b` `bool` 类型的值。
and `F` is a type meeting the requirements of __Fields__.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Finish translating the m bullet.

Lines 25-26 still leave the F clause in English, so this requirement reads as mixed-language in the zh_Hans page.

Suggested fix
-* `m` 是类型为 `message<b,B,F>` 的值,其中 `b` 为 `bool` 类型的值。
-  and `F` is a type meeting the requirements of __Fields__.
+* `m` 是类型为 `message<b,B,F>` 的值,其中 `b` 为 `bool` 类型的值,且 `F` 是满足 __Fields__ 要求的类型。
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* `m` 是类型为 `message<b,B,F>` 的值,其中 `b` 为 `bool` 类型的值。
and `F` is a type meeting the requirements of __Fields__.
* `m` 是类型为 `message<b,B,F>` 的值,其中 `b` 为 `bool` 类型的值,且 `F` 是满足 __Fields__ 要求的类型。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@doc/qbk/07_concepts/Body_zh_Hans.qbk` around lines 25 - 26, The `m` bullet in
the zh_Hans Body page is only partially translated, leaving the `F` requirement
clause in English. Update the `message<b,B,F>` bullet so the entire requirement
description is in Chinese, preserving the meaning of the `F`/`__Fields__`
condition while keeping the existing terminology consistent with the surrounding
translation.

[section:BufferSequence 缓冲区序列]

A [*BufferSequence] is a type meeting either of the following requirements:
[*缓冲区序列] 是指满足以下任一要求的类型:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Keep the canonical concept name as BufferSequence.

The section title can be localized, but the inline concept identifier should stay [*BufferSequence] to match the upstream concept name and the surrounding zh_Hans concept pages.

Suggested fix
-[*缓冲区序列] 是指满足以下任一要求的类型:
+[*BufferSequence] 是指满足以下任一要求的类型:
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
[*缓冲区序列] 是指满足以下任一要求的类型:
[*BufferSequence] 是指满足以下任一要求的类型:
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@doc/qbk/07_concepts/BufferSequence_zh_Hans.qbk` at line 12, The inline
concept identifier in the BufferSequence concept page is localized incorrectly;
keep the canonical concept name unchanged while localizing only the surrounding
prose. Update the `[*缓冲区序列]` reference in this section to use
`[*BufferSequence]` so it matches the upstream concept name and stays consistent
with the other zh_Hans concept pages.

Comment thread doc/qbk/07_concepts/File_zh_Hans.qbk
Comment on lines +26 to 37
在本节中,我们将探讨 HTTP 消息建模所面临的挑战,并阐述该库是如何推导出最终解决方案的,同时也会深入剖析这些设计选择的利弊。构建消息模型的核心目标,是打造一个具备值语义(value semantics)的容器(支持移动和/或复制),使其能够囊括序列化所需的全部信息,或是完整保留解析过程中捕获的所有数据。从更严谨的层面来说,给定:

* `m` is an instance of an HTTP message container
* `m` HTTP 消息容器的一个实例

* `x` is a series of octets describing a valid HTTP message in
* `x` 是一系列字节(octets),用于描述一个有效的 HTTP 消息
the serialized format described in __rfc7230__.

* `S(m)` is a serialization function which produces a series of octets
* `S(m)` 是一个序列化函数,用于生成一系列字节(octets
from a message container.

* `P(x)` is a parsing function which produces a message container from
* `P(x)` 是一个解析函数,用于从……生成一个消息容器
a series of octets.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Finish translating the formal definitions block.

Line 31, Line 34, and Line 37 are still English, so this section reads half-translated and the P(x) item is left as 用于从……生成一个消息容器.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@doc/qbk/08_design/1_http_message_zh_Hans.qbk` around lines 26 - 37, The
formal definitions block in the HTTP message design section is only partially
translated, leaving the `x`, `S(m)`, and `P(x)` definitions in English and
`P(x)` incomplete; update this block in the same section so all bullets are
fully translated into Chinese while preserving the mathematical meaning and the
references to `m`, `x`, `S(m)`, and `P(x)`.

Comment thread doc/qbk/08_design/1_http_message_zh_Hans.qbk
Boost-tran added 7 commits June 26, 2026 20:24
Currently translated at 100.0% (53 of 53 strings)

Translation: Boost Beast Translation (zh_Hans)/Doc / Qbk / 03 Core / 1 Refresher (qbk)
Translate-URL: https://insights.cppalliance.org/weblate/projects/boost-beast-documentation-zh_Hans/doc-qbk-03-core-1-refresher-qbk/zh_Hans/
Currently translated at 100.0% (50 of 50 strings)

Translation: Boost Beast Translation (zh_Hans)/Doc / Qbk / 08 Design / 1 Http Message (qbk)
Translate-URL: https://insights.cppalliance.org/weblate/projects/boost-beast-documentation-zh_Hans/doc-qbk-08-design-1-http-message-qbk/zh_Hans/
Currently translated at 100.0% (23 of 23 strings)

Translation: Boost Beast Translation (zh_Hans)/Doc / Qbk / 07 Concepts / Body (qbk)
Translate-URL: https://insights.cppalliance.org/weblate/projects/boost-beast-documentation-zh_Hans/doc-qbk-07-concepts-body-qbk/zh_Hans/
Currently translated at 100.0% (30 of 30 strings)

Translation: Boost Beast Translation (zh_Hans)/Doc / Qbk / 01 Intro /  Intro (qbk)
Translate-URL: https://insights.cppalliance.org/weblate/projects/boost-beast-documentation-zh_Hans/doc-qbk-01-intro--intro-qbk/zh_Hans/
Currently translated at 100.0% (3 of 3 strings)

Translation: Boost Beast Translation (zh_Hans)/Doc / Qbk / 07 Concepts / Buffersequence (qbk)
Translate-URL: https://insights.cppalliance.org/weblate/projects/boost-beast-documentation-zh_Hans/doc-qbk-07-concepts-buffersequence-qbk/zh_Hans/
Currently translated at 100.0% (40 of 40 strings)

Translation: Boost Beast Translation (zh_Hans)/Doc / Qbk / 07 Concepts / File (qbk)
Translate-URL: https://insights.cppalliance.org/weblate/projects/boost-beast-documentation-zh_Hans/doc-qbk-07-concepts-file-qbk/zh_Hans/
Currently translated at 100.0% (31 of 31 strings)

Translation: Boost Beast Translation (zh_Hans)/Doc / Qbk / 06 Websocket / 04 Messages (qbk)
Translate-URL: https://insights.cppalliance.org/weblate/projects/boost-beast-documentation-zh_Hans/doc-qbk-06-websocket-04-messages-qbk/zh_Hans/
@whisper67265 whisper67265 force-pushed the translation-zh_Hans-boost-1.91.0 branch from 44c8888 to 895f225 Compare June 26, 2026 20:25
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.

1 participant