Skip to content

docs: translate pen and mouse as Chinese #2413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 9, 2025

Conversation

alaahong
Copy link
Member

@alaahong alaahong commented Aug 9, 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

translate pen and mouse as Chinese

Motivation and Context

translate pen and mouse as Chinese

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

  • Translate mouse and pen documentation to Chinese

  • Remove translation needed flags from completed files

  • Update titles, descriptions and content sections


Diagram Walkthrough

flowchart LR
  A["English Documentation"] --> B["Chinese Translation"]
  B --> C["Mouse Actions (鼠标操作)"]
  B --> D["Pen Actions (笔操作)"]
  C --> E["Remove needsTranslation flag"]
  D --> F["Translate content sections"]
Loading

File Walkthrough

Relevant files
Documentation
mouse.zh-cn.md
Translate mouse actions documentation to Chinese                 

website_and_docs/content/documentation/webdriver/actions_api/mouse.zh-cn.md

  • Translate title from "Mouse actions" to "鼠标操作"
  • Translate linkTitle from "Mouse" to "鼠标"
  • Remove needsTranslation: true flag
  • Translate description to Chinese
+3/-4     
pen.zh-cn.md
Translate pen actions documentation to Chinese                     

website_and_docs/content/documentation/webdriver/actions_api/pen.zh-cn.md

  • Translate title from "Pen actions" to "笔操作"
  • Translate linkTitle from "Pen" to "笔"
  • Translate description and all content sections
  • Translate button state descriptions and usage instructions
+11/-11 

Copy link

netlify bot commented Aug 9, 2025

👷 Deploy request for selenium-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 8e8c709

Copy link
Contributor

qodo-merge-pro bot commented Aug 9, 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

Translation Accuracy

Confirm the Chinese description preserves nuance of "any pointer device" and punctuation style; consider using a full-width period or no trailing punctuation per existing docs style.

  任何用于与网页进行交互的指针设备的表示形式.
aliases: [
Terminology Consistency

Validate that terms like “桶形按钮” and “触摸接触” match existing zh-CN glossary across docs for pointer events and align with W3C specs.

* 0 - 触摸接触(默认设置;相当于左键单击)
* 2 - 桶形按钮(相当于右键点击)
* 5 - 橡皮擦按钮(当前驱动程序不支持)
Heading Style

Ensure translated headings like “使用笔” and “添加指针事件属性” follow site’s Chinese heading conventions and anchor link generation (IDs) remain consistent if referenced elsewhere.

## 使用笔

Copy link
Contributor

qodo-merge-pro bot commented Aug 9, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Correct mistranslated button term
Suggestion Impact:The commit updated the term to include “侧键” alongside “桶形按钮,” partially implementing the suggestion (though it used “桶形按钮/侧键” and did not add the English in parentheses as proposed).

code diff:

 * 0 - 触摸接触(默认设置;相当于左键单击)
-* 2 - 桶形按钮(相当于右键点击)
+* 2 - 桶形按钮/侧键(相当于右键点击)
 * 5 - 橡皮擦按钮(当前驱动程序不支持)

Align terminology with standard zh-CN input device terms. Replace “桶形按钮” with
“侧键(Barrel Button)” to avoid mistranslation and add the English term in
parentheses for clarity.

website_and_docs/content/documentation/webdriver/actions_api/pen.zh-cn.md [15-17]

 * 0 - 触摸接触(默认设置;相当于左键单击)
-* 2 - 桶形按钮(相当于右键点击)
+* 2 - 侧键(Barrel Button)(相当于右键单击)
 * 5 - 橡皮擦按钮(当前驱动程序不支持)

[Suggestion processed]

Suggestion importance[1-10]: 6

__

Why: The suggestion improves the translation by replacing a literal translation 桶形按钮 with a more standard and understandable term 侧键 for "Barrel Button", enhancing clarity for the target audience.

Low
Use precise device naming
Suggestion Impact:The commit updated the page metadata from “笔操作”/“笔” to “触控笔操作”/“触控笔” and further replaced occurrences of “笔” with “触控笔” throughout the document.

code diff:

-title: "笔操作"
-linkTitle: "笔"
+title: "触控笔操作"
+linkTitle: "触控笔"
 weight: 5
 description: >
   一种用于与网页交互的类似笔尖的指针输入设备的表示.
@@ -8,15 +8,15 @@
 
 {{< badge-browser browser=Chromium wpt="perform_actions/pointer.py" >}}
 
-笔是一种指针输入设备,其行为大多与鼠标相同,
+触控笔是一种指针输入设备,其行为大多与鼠标相同,
 但也可以具有触控笔特有的事件属性。
-此外,鼠标有 5 个按钮,而笔有 3 种等效的按钮状态:
+此外,鼠标有 5 个按钮,而触控笔有 3 种等效的按钮状态:
 
 * 0 - 触摸接触(默认设置;相当于左键单击)
-* 2 - 桶形按钮(相当于右键点击)
+* 2 - 桶形按钮/侧键(相当于右键点击)
 * 5 - 橡皮擦按钮(当前驱动程序不支持)
 
-## 使用笔
+## 使用触控笔

Ensure consistency with other device pages and avoid ambiguity; use “触控笔”
instead of “笔” to clearly indicate stylus input and improve searchability in
docs.

website_and_docs/content/documentation/webdriver/actions_api/pen.zh-cn.md [2-3]

-title: "笔操作"
-linkTitle: "笔"
+title: "触控笔操作"
+linkTitle: "触控笔"

[Suggestion processed]

Suggestion importance[1-10]: 6

__

Why: The suggestion correctly points out that (pen) is ambiguous and proposes 触控笔 (stylus), which is a more precise and accurate translation in this technical context, improving clarity and searchability.

Low
Fix Chinese punctuation consistency

Use the full-width Chinese period consistently and avoid trailing punctuation
changes that may break sentence extraction or i18n consistency. Replace the
ASCII period with a full-width one used elsewhere in zh-CN docs.

website_and_docs/content/documentation/webdriver/actions_api/mouse.zh-cn.md [5-6]

 description: >
-  任何用于与网页进行交互的指针设备的表示形式.
+  任何用于与网页进行交互的指针设备的表示形式。
  • Apply / Chat
Suggestion importance[1-10]: 5

__

Why: The suggestion correctly identifies an incorrect ASCII period and suggests replacing it with the proper full-width Chinese period , which improves typographic consistency and correctness for Chinese documentation.

Low
  • Update

@alaahong alaahong merged commit fae7b1e into SeleniumHQ:trunk Aug 9, 2025
3 checks passed
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.

1 participant