Skip to content

docs(zh-cn): update design strategies documentation for clarity - #2587

Merged
diemol merged 2 commits into
SeleniumHQ:trunkfrom
alaahong:feature/design_strategies_202602
Jul 18, 2026
Merged

docs(zh-cn): update design strategies documentation for clarity#2587
diemol merged 2 commits into
SeleniumHQ:trunkfrom
alaahong:feature/design_strategies_202602

Conversation

@alaahong

@alaahong alaahong commented Feb 17, 2026

Copy link
Copy Markdown
Member

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

Revised the design strategies documentation in Chinese to enhance clarity and accuracy. Key sections were translated and restructured to improve readability and understanding for Chinese-speaking users.

Motivation and Context

  • Updated overview and examples
  • Enhanced explanations of design patterns and strategies
  • Improved formatting for better presentation

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

  • Translated design strategies documentation from English to Chinese

  • Removed outdated translation warning banner

  • Restructured content for improved clarity and readability

  • Enhanced Chinese terminology and phrasing throughout


Diagram Walkthrough

flowchart LR
  A["English Documentation"] -- "Full Translation" --> B["Chinese Documentation"]
  B -- "Remove Warning Banner" --> C["Cleaner Layout"]
  B -- "Restructure Sections" --> D["Better Organization"]
  B -- "Improve Terminology" --> E["Enhanced Clarity"]
Loading

File Walkthrough

Relevant files
Documentation
design_strategies.zh-cn.md
Complete Chinese translation of design strategies guide   

website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md

  • Removed outdated English-only warning banner at document start
  • Translated all English content to Chinese including overview, section
    headers, and explanations
  • Restructured overview section with improved formatting and line breaks
  • Enhanced Chinese terminology for technical concepts (e.g., "页面对象" for
    Page Objects, "领域驱动设计" for Domain-Driven Design)
  • Translated all descriptive text, code comments context, and example
    descriptions to Chinese
  • Improved readability by adding proper spacing and formatting
    throughout the document
+95/-94 

Revised the design strategies documentation in Chinese to enhance
clarity and accuracy. Key sections were translated and restructured
to improve readability and understanding for Chinese-speaking users.

- Updated overview and examples
- Enhanced explanations of design patterns and strategies
- Improved formatting for better presentation
@netlify

netlify Bot commented Feb 17, 2026

Copy link
Copy Markdown

Deploy Preview for selenium-dev ready!

Name Link
🔨 Latest commit deb9163
🔍 Latest deploy log https://app.netlify.com/projects/selenium-dev/deploys/6a5bedac70c7e90008274645
😎 Deploy Preview https://deploy-preview-2587--selenium-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@qodo-code-review

qodo-code-review Bot commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review

qodo-code-review Bot commented Feb 17, 2026

Copy link
Copy Markdown
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Improve translation consistency for technical terms

To improve terminological consistency, change the translation for "object-based
approach" from "对象化方法" to "基于对象的方法", aligning it with the translation of "Page
Objects" ("页面对象").

website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md [19-25]

 [领域驱动设计]({{< ref "encouraged/domain_specific_language.md" >}}): 以最终用户的语言来表达测试.
 
 [页面对象]({{< ref "encouraged/page_object_models.md" >}}): 对 Web 应用 UI 的一种简单抽象. 
 
 LoadableComponent: 把页面对象建模为可加载的组件. 
 
-BotStyleTests: 使用以命令为导向的自动化测试方式, 而不是页面对象更偏向的对象化方法
+BotStyleTests: 使用以命令为导向的自动化测试方式, 而不是页面对象更偏向的基于对象的方法

[Suggestion processed]

Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies a minor terminological inconsistency in the Chinese translation and proposes a valid improvement for clarity and consistency, which is relevant to a PR focused on translation.

Low
  • Update

@qodo-code-review

Copy link
Copy Markdown
Contributor

Code Review by Qodo

🐞 Bugs (1) 📘 Rule violations (1) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 10 rules

Grey Divider


Action required

1. LoadableComponent mentions Java/JUnit 📘 Rule violation ✧ Quality
Description
The updated Chinese prose introduces binding-specific terminology (e.g., Java, JUnit) in general
descriptive sections rather than keeping references language-independent. This conflicts with the
documentation style guide and the requirement to keep documentation prose language-agnostic.
Code

website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md[R36-37]

+目前在 Selenium 中包含了一个 Java 实现, 
+但该方法足够简单, 可在任何语言中实现.
Evidence
The style guide explicitly states that references to code should be language independent, and the
prose language-agnostic rule disallows singling out specific bindings in normative/descriptive text.
The modified lines explicitly mention Java and JUnit in the general explanation of
LoadableComponent behavior/usage.

Rule 2141344: Documentation changes must follow the central style guide file
Rule 2141345: Keep documentation prose language-agnostic, avoiding binding-specific terminology
website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md[36-37]
website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md[147-153]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The updated documentation prose uses binding-specific terminology (e.g., `Java`, `JUnit`) in general explanatory text, but the style guide and compliance checklist require language-independent references in prose.

## Issue Context
This file is a general documentation page; binding-specific details should be expressed in language-neutral terms, or moved into clearly language-scoped example/tab sections.

## Fix Focus Areas
- website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md[36-37]
- website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md[147-153]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Untranslated text without banner 🐞 Bug ⚙ Maintainability
Description
The PR removes the zh-cn translation warning banner, but the document still contains English prose
outside code blocks (e.g., fixture/test-case descriptions), leaving readers with mixed-language
content without any notice. This is user-visible and contradicts the intent of a fully
clarified/translated page.
Code

website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md[L7-15]

-{{% pageinfo color="warning" %}}
-<p class="lead">
-   <i class="fas fa-language d-4"></i> 
-   Most of the documentation found in this section is still in English.
-   Please note we are not accepting pull requests to translate this content
-   as translating documentation of legacy components does not add value to
-   the community nor the project.
-</p>
-{{% /pageinfo %}}
Evidence
The PR removes the warning banner near the top of the file, and the current zh-cn document still
includes English prose lines outside code fences, demonstrating mixed-language content without any
disclaimer.

website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md[1-15]
website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md[462-470]
website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md[561-567]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The zh-cn page no longer shows the translation warning banner, but it still contains English sentences outside code blocks. This produces mixed-language documentation without any disclaimer.

## Issue Context
After the banner removal, at least two English prose lines remain in the rendered page (not inside fenced code blocks).

## Fix Focus Areas
- website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md[8-15]
- website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md[462-470]
- website_and_docs/content/documentation/test_practices/design_strategies.zh-cn.md[561-567]

## Suggested fix
Either:
1) Translate the remaining English prose lines into Chinese, or
2) Reintroduce a (narrower) `pageinfo` notice stating the page is partially untranslated until the remaining English prose is translated.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

@diemol
diemol merged commit b1745da into SeleniumHQ:trunk Jul 18, 2026
6 checks passed
selenium-ci added a commit that referenced this pull request Jul 18, 2026
Revised the design strategies documentation in Chinese to enhance
clarity and accuracy. Key sections were translated and restructured
to improve readability and understanding for Chinese-speaking users.

- Updated overview and examples
- Enhanced explanations of design patterns and strategies
- Improved formatting for better presentation

Co-authored-by: Diego Molina <diemol@users.noreply.github.com>

[deploy site] b1745da
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