Skip to content

Conversation

@jasonren0403
Copy link
Contributor

@jasonren0403 jasonren0403 commented Nov 8, 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

Update translation of "print page" in zh-cn.

Motivation and Context

Provide localized text and make the selenium website more consistent

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

  • Completed the translation of the 'Print Page' documentation into Chinese, including the title, headings, and content.
  • Provided localized descriptions for various printing configuration options such as orientation, range, size, margins, scale, background, and shrink-to-fit.
  • Updated method descriptions and examples to reflect the Chinese language, ensuring consistency and accessibility for Chinese-speaking users.

Changes walkthrough 📝

Relevant files
Documentation
print_page.zh-cn.md
Complete Chinese translation of the 'Print Page' documentation

website_and_docs/content/documentation/webdriver/interactions/print_page.zh-cn.md

  • Translated the title and headings to Chinese.
  • Translated the content of the document to Chinese.
  • Updated method descriptions and examples to Chinese.
  • Provided localized text for printing configuration options.
  • +28/-32 

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    @netlify
    Copy link

    netlify bot commented Nov 8, 2024

    👷 Deploy request for selenium-dev pending review.

    Visit the deploys page to approve it

    Name Link
    🔨 Latest commit c06a98b

    @qodo-merge-pro
    Copy link
    Contributor

    qodo-merge-pro bot commented Nov 8, 2024

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

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

    Translation Error
    The shrinkToFit section incorrectly uses getBackground() and setBackground() methods instead of getShrinkToFit() and setShrinkToFit()

    @qodo-merge-pro
    Copy link
    Contributor

    qodo-merge-pro bot commented Nov 8, 2024

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Possible bug
    ✅ Fix incorrect method names that were incorrectly copied from the Background section
    Suggestion Impact:The suggestion corrected the method names from getBackground()/setBackground() to getShrinkToFit()/setShrinkToFit().

    code diff:

    -通过 `getBackground()` 和 `setBackground()` 方法,可以获取/设置页面是否会根据页面内容缩小,其为布尔值 `true` 或 `false`。
    +通过 `getShrinkToFit()` 和 `setShrinkToFit()` 方法,可以获取/设置页面是否会根据页面内容缩小,其为布尔值 `true` 或 `false`。

    Fix incorrect method names in the "缩放至合适大小" (ShrinkToFit) section. The methods
    should be getShrinkToFit() and setShrinkToFit() instead of getBackground() and
    setBackground().

    website_and_docs/content/documentation/webdriver/interactions/print_page.zh-cn.md [160-161]

     ### 缩放至合适大小
    -通过 `getBackground()` 和 `setBackground()` 方法,可以获取/设置页面是否会根据页面内容缩小,其为布尔值 `true` 或 `false`。
    +通过 `getShrinkToFit()` 和 `setShrinkToFit()` 方法,可以获取/设置页面是否会根据页面内容缩小,其为布尔值 `true` 或 `false`。
    • Apply this suggestion
    Suggestion importance[1-10]: 9

    Why: This is a critical bug fix as the documentation incorrectly lists getBackground()/setBackground() methods for the ShrinkToFit functionality, which would lead to incorrect implementation. Using the correct getShrinkToFit()/setShrinkToFit() methods is essential for proper functionality.

    9

    💡 Need additional feedback ? start a PR chat

    @jasonren0403 jasonren0403 changed the title docs(zh-cn): finish translation of 'printing page' docs(zh-cn): update typo and finish translation of 'printing page' Nov 8, 2024
    @shbenzer
    Copy link
    Contributor

    shbenzer commented Nov 9, 2024

    @jasonren0403 Great contribution, thank you!

    Copy link
    Member

    @harsha509 harsha509 left a comment

    Choose a reason for hiding this comment

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

    Thank you @jasonren0403 !

    @harsha509 harsha509 merged commit 36de515 into SeleniumHQ:trunk Nov 11, 2024
    3 checks passed
    @jasonren0403 jasonren0403 deleted the patch-3 branch November 12, 2024 08:53
    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.

    3 participants