Skip to content

Conversation

@KaranocaVe
Copy link
Contributor

@KaranocaVe KaranocaVe commented Sep 12, 2024

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

  • Translated the entire Chrome DevTools Protocol documentation page from English to Chinese.
  • Removed the translation notice as the page is now fully translated.
  • Included detailed explanations and examples in Chinese about using CDP with Selenium.

Changes walkthrough 📝

Relevant files
Documentation
_index.zh-cn.md
Translate Chrome DevTools Protocol documentation to Chinese

website_and_docs/content/documentation/webdriver/bidi/cdp/_index.zh-cn.md

  • Translated the title and description to Chinese.
  • Removed the translation notice.
  • Translated detailed content about CDP and WebDriver BiDi to Chinese.
  • Provided examples and explanations in Chinese.
  • +18/-39 

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @netlify
    Copy link

    netlify bot commented Sep 12, 2024

    👷 Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    🔨 Latest commit be99df5

    @CLAassistant
    Copy link

    CLAassistant commented Sep 12, 2024

    CLA assistant check
    All committers have signed the CLA.

    @qodo-merge-pro qodo-merge-pro bot added documentation Improvements or additions to documentation Review effort [1-5]: 2 labels Sep 12, 2024
    @qodo-merge-pro
    Copy link
    Contributor

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Translation Accuracy
    The PR involves a full translation of the Chrome DevTools Protocol documentation from English to Chinese. A thorough review by a native Chinese speaker is recommended to ensure accuracy and natural language flow.

    @qodo-merge-pro
    Copy link
    Contributor

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Clarity
    Provide a brief explanation of WebDriver BiDi when introducing it

    Consider adding a brief explanation of what WebDriver BiDi is when it's first
    mentioned. This will provide context for Chinese readers who may not be familiar
    with this term.

    website_and_docs/content/documentation/webdriver/bidi/cdp/_index.zh-cn.md [22]

    -Selenium 正在致力于实现一种基于标准的、跨浏览器的、稳定的 CDP 替代方案,称为 [WebDriver BiDi]。在对该新协议的支持完成之前,Selenium 计划在适用的地方提供对 CDP 功能的访问。
    +Selenium 正在致力于实现一种基于标准的、跨浏览器的、稳定的 CDP 替代方案,称为 [WebDriver BiDi](WebDriver 双向协议)。这是一个新的协议,旨在提供更一致和强大的浏览器自动化功能。在对该新协议的支持完成之前,Selenium 计划在适用的地方提供对 CDP 功能的访问。
     
    • Apply this suggestion
    Suggestion importance[1-10]: 8

    Why: Including an explanation of WebDriver BiDi helps readers understand its significance and context, improving comprehension of the document.

    8
    Add the full English name of CDP when introducing the acronym

    Consider adding a brief explanation of what CDP stands for when it's first mentioned
    in the Chinese text. This will help Chinese readers who may not be familiar with the
    acronym.

    website_and_docs/content/documentation/webdriver/bidi/cdp/_index.zh-cn.md [20]

    -许多浏览器提供"开发者工具"(DevTools),这是与浏览器集成的一组工具,开发人员可以使用它们来调试网页应用程序并探索网页的性能。Google Chrome 的开发者工具使用一种称为 Chrome DevTools 协议(简称 "CDP")的协议。
    +许多浏览器提供"开发者工具"(DevTools),这是与浏览器集成的一组工具,开发人员可以使用它们来调试网页应用程序并探索网页的性能。Google Chrome 的开发者工具使用一种称为 Chrome DevTools 协议(Chrome DevTools Protocol,简称 "CDP")的协议。
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Adding the full English name of CDP provides clarity and context for readers unfamiliar with the acronym, enhancing the readability of the document.

    7
    Provide an example of bidirectional communication to clarify its meaning

    Consider adding a brief explanation or example of what "bidirectional communication"
    means in this context. This will help readers better understand the limitations of
    basic CDP commands.

    website_and_docs/content/documentation/webdriver/bidi/cdp/_index.zh-cn.md [26-27]

     Chrome 和 Edge 提供了发送基本 CDP 命令的方法。
    -但对于需要双向通信的功能,这种方法无效。你需要知道在何时启用哪些域,以及域、方法和参数的确切名称和类型。
    +但对于需要双向通信的功能(例如,实时监听浏览器事件),这种方法无效。你需要知道在何时启用哪些域,以及域、方法和参数的确切名称和类型。
     
    • Apply this suggestion
    Suggestion importance[1-10]: 7

    Why: Adding an example of bidirectional communication clarifies the concept for readers, making the limitations of basic CDP commands more understandable.

    7
    Enhancement
    Explain why IP-based geolocation is preferred over browser-reported location

    Consider adding a brief explanation of why IP-based geolocation is more common and
    reliable than browser-reported geolocation. This will help readers understand why
    the CDP geolocation feature might not be as useful as they expect.

    website_and_docs/content/documentation/webdriver/bidi/cdp/_index.zh-cn.md [59]

    -* **地理位置** ——几乎所有网站都使用 IP 地址来确定物理位置,因此设置模拟地理位置很少能达到预期效果。
    +* **地理位置** ——几乎所有网站都使用 IP 地址来确定物理位置,而不是依赖浏览器报告的位置。这是因为 IP 地理位置更难被伪造,因此设置模拟地理位置很少能达到预期效果。
     
    • Apply this suggestion
    Suggestion importance[1-10]: 6

    Why: Providing an explanation of why IP-based geolocation is more reliable helps readers understand the limitations of the CDP geolocation feature, enhancing the document's informative value.

    6

    @harsha509 harsha509 requested a review from alaahong September 16, 2024 23:19
    Copy link
    Member

    @alaahong alaahong left a comment

    Choose a reason for hiding this comment

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

    Thanks for your commit @KaranocaVe , LGTM!

    @alaahong alaahong merged commit 97537ea into SeleniumHQ:trunk Sep 19, 2024
    3 checks passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    documentation Improvements or additions to documentation Review effort [1-5]: 2

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.

    3 participants