Skip to content

Conversation

yourgithobismygithob
Copy link

@yourgithobismygithob yourgithobismygithob commented Sep 3, 2025

User description

Thanks for contributing to the Selenium site and documentation!
A PR well described will help maintainers to review and merge it quickly

Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, and help reviewers by making them as simple and short as possible.

Description

Motivation and Context

Types of changes

  • Change to the site (I have double-checked the Netlify deployment, and my changes look good)
  • Code example added (and I also added the example to all translated languages)
  • Improved translation
  • Added new translation (and I also added a notice to each document missing translation)

Checklist

  • I have read the contributing document.
  • I have used hugo to render the site/docs locally and I am sure it works.

PR Type

Documentation


Description

  • Complete Chinese translation of Grid architecture documentation

  • Translated all component descriptions and technical concepts

  • Converted tables and technical specifications to Chinese

  • Maintained original structure and formatting


Diagram Walkthrough

flowchart LR
  EN["English Documentation"] --> TR["Translation Process"] --> CN["Chinese Documentation"]
  TR --> COMP["Component Descriptions"]
  TR --> TECH["Technical Concepts"]
  TR --> TAB["Tables & Specifications"]
Loading

File Walkthrough

Relevant files
Documentation
architecture.zh-cn.md
Complete Chinese translation of Grid architecture guide   

website_and_docs/content/documentation/grid/architecture.zh-cn.md

  • Translated entire Grid architecture documentation from English to
    Chinese
  • Converted all component descriptions (Event Bus, Distributor, Node,
    etc.)
  • Translated technical concepts like slots, stereotypes, and Grid Model
  • Converted dependency tables and node status specifications to Chinese
+85/-139

Copy link

netlify bot commented Sep 3, 2025

👷 Deploy request for selenium-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 9f5d4c1

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Contributor

qodo-merge-pro bot commented Sep 3, 2025

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Terminology Consistency

Ensure key terms like "stereotype", "capabilities", and "Grid Model" are consistently translated and, where first introduced, optionally retain the English term in parentheses to aid readers familiar with the original docs.

 * 槽(slot)是会话可以运行的地方。
 * 每个槽有一个能力集(stereotype)。这是一个最小能力集,传入的会话请求必须匹配,然后分配器才会将请求发送到拥有该槽的节点。
 * 分配器跟踪 Grid 的状态。顾名思义,有时可能会因为现实(也许分配器刚刚启动)而出现同步问题。如果优先查询每个节点,以便分配器可以快速为新会话请求分配槽。

## 同步和异步调用

Grid 中使用了两种主要的通信机制:

 1. 通过 HTTP 请求的同步“REST-ish” JSON。
 2. 发送到事件总线的异步事件。

我们如何选择同步机制(例如,大多数 WebDriver 调用)或异步机制?之后,我们可以将整个 Grid 建模为事件驱动的,它将正常工作。

答案是,如果响应丢失将是问题,我们希望将信息广播给任何感兴趣的人,或者我们不在乎响应,我们更喜欢使用事件总线。

一个有趣的现象是,同步调用比异步调用更解耦。

## 组件间的启动顺序和依赖关系
Table Formatting

Verify the Markdown tables render correctly (headers, alignment, code formatting for literals like up/draining/down, and backticks) after translation; some cells might need inline code formatting to match original semantics.

|               | 事件总线| 分配器 | 节点 | 路由器 | 会话映射 | 会话队列 |  
|---------------|-----------|-------------|------|--------|-------------|---------------|
| Event Bus     |    X      |             |      |        |             |               |
| Distributor   ||      X      ||        |             ||
| Node          ||             |  X   |        |             |               |
| Router        |           |             ||   X    ||               |
| Session Map   |           |             |      |        |     X       |               |
| Session Queue ||             |      |        |             |      X        |
Link Context

For references like new session and capabilities, confirm the surrounding Chinese text preserves the original link intent and uses consistent anchor text; consider adding backticks or brackets where appropriate.

|------|------|-------------|
| capabilities | object | 会话提供的实际功能。将与 new session 命令的返回值匹配。 |
| startTime | string |会话的开始时间,ISO-8601 格式。 |
| stereotype | object | 此槽将匹配的最小能力集。一个最小示例是 {"browserName": "firefox"} |
| uri | string | 节点用于与会话通信的 URI。 |

[capabilities]: https://w3c.github.io/webdriver/#dfn-merging-capabilities
[new session]: https://w3c.github.io/webdriver/#new-session

Copy link
Contributor

qodo-merge-pro bot commented Sep 3, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
纠正 Grid 模型描述

这句话反转了原文含义,导致“Grid 模型”的用途被误解。应明确“Grid 模型”是用来替代逐个查询节点,以便快速分配槽。请按下述修正以恢复正确语义。

website_and_docs/content/documentation/grid/architecture.zh-cn.md [53]

-* 分配器跟踪 Grid 的状态。顾名思义,有时可能会因为现实(也许分配器刚刚启动)而出现同步问题。如果优先查询每个节点,以便分配器可以快速为新会话请求分配槽。
+* Grid 模型(Grid Model)是分配器用来跟踪 Grid 状态的方式。顾名思义,它有时可能会与实际情况不同步(例如分配器刚刚启动时)。为了让分配器能够快速为新会话请求分配槽,Grid 模型被用来替代逐个查询每个节点。
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly identifies a significant mistranslation that reverses the meaning of the Grid Model's purpose, and the proposed change accurately reflects the original technical documentation.

Medium
修正同步/异步选择标准

此处将同步/异步选择标准混淆,结论与原文相反。请说明:若丢失响应会带来问题则使用同步;广播或丢失响应无关紧要时使用事件总线。以下为精确表述。

website_and_docs/content/documentation/grid/architecture.zh-cn.md [62-64]

-我们如何选择同步机制(例如,大多数 WebDriver 调用)或异步机制?之后,我们可以将整个 Grid 建模为事件驱动的,它将正常工作。
+我们如何选择使用哪种通信机制?毕竟,我们完全可以把整个 Grid 设计成基于事件的方式,也同样能正常工作。
 
-答案是,如果响应丢失将是问题,我们希望将信息广播给任何感兴趣的人,或者我们不在乎响应,我们更喜欢使用事件总线。
+答案是:如果执行的操作是同步的(例如大多数 WebDriver 调用),或者丢失响应会带来问题,Grid 使用同步调用。相反,如果我们只是想向所有感兴趣的组件广播信息,或者丢失响应无关紧要,那么我们更倾向于使用事件总线。
  • Apply / Chat
Suggestion importance[1-10]: 8

__

Why: The suggestion correctly points out a confusing and inaccurate translation of the criteria for choosing between synchronous and asynchronous communication, and the proposed fix clarifies the distinction.

Medium
纠正解耦性比较方向

这句话与原文相反,应为“异步调用更解耦”。请调整表述以避免误导读者对架构耦合度的理解。

website_and_docs/content/documentation/grid/architecture.zh-cn.md [66]

-一个有趣的现象是,同步调用比异步调用更解耦。
+一个有趣的现象是,异步调用比同步调用更与其监听器解耦。
  • Apply / Chat
Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies a mistranslation that reverses the comparison of decoupling between synchronous and asynchronous calls, which is an important architectural concept.

Medium
  • More

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants