Skip to content
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

translate file finders.zh-cn #1432

Open
wants to merge 5 commits into
base: trunk
Choose a base branch
from
Open

Conversation

skyfackr
Copy link

@skyfackr skyfackr commented Jul 13, 2023

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.

translate file finders.zh-cn

Description

translate the file /webdriver/elements/finders.zh-cn.md to Chinese

Effective at /zh-cn/documentation/webdriver/elements/finders/

Motivation and Context

The original finder.zh-cn.md was still written in English. This PR translates it.

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.

@netlify
Copy link

netlify bot commented Jul 13, 2023

👷 Deploy request for selenium-dev pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 82150fb

@CLAassistant
Copy link

CLAassistant commented Jul 13, 2023

CLA assistant check
All committers have signed the CLA.

@diemol diemol requested a review from alaahong July 13, 2023 07:46
translate the file /webdriver/elements/finders.zh-cn.md to Chinese
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, we're happy to see you as the first-time contributor.
Can you help to update as the comment?

And meanwhile ,as community guide, it's better to add line break [reference]

The first line should be around 50 characters or less and contain a short description of the change.
Keep the second line blank.
Wrap all other lines at 72 columns.
Include Fixes #N, where N is the issue number the commit fixes, if any.

### 在整个DOM中查找元素

当在驱动实例上调用`find element`方法时,它会返回DOM中与所提供的定位器匹配的第一个元素的引用。这个引用可以被保存用于之后对此元素的操作。
在上面的HTML示例中,有两个元素的类名都是 "tomatoes",他们分别在两个列表中。以下代码将返回第一个列表,即 "vegetables "列表中的"tomatos"元素引用。
Copy link
Member

Choose a reason for hiding this comment

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

Seems it will fetch below element, please revise your additional word
image

Copy link
Author

Choose a reason for hiding this comment

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

Hello,

Sorry but I cannot understand what you mean. This paragraph fetches the element in this picture, but I don't know what you mean for additional word?

Copy link
Member

Choose a reason for hiding this comment

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

Hi , you just highlight one element which is not from original content or element source.

Copy link
Author

Choose a reason for hiding this comment

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

hello,

Do you mean "tomato" is not from the original content? However, I just checked them, and I think there is no additional content in my transaction. I just highlighted "the return element is from the first list." Do you think it is spare?

### Evaluating a subset of the DOM
### 在部分DOM中查找元素

以上代码无法获取在样例第二个列表中的"tomato"元素。如果知道目标元素所属位置且希望获取指定范围里的元素而不是整个上下文中的第一个,可以进行部分搜索。
Copy link
Member

Choose a reason for hiding this comment

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

Did you miss content here?

Copy link
Author

Choose a reason for hiding this comment

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

Hello,

If you mean Rather than finding a unique locator in the entire DOM, it is often useful to narrow the search to the scope of another located element.

I translated it as the sentence on line 66. The original sentence wants to say that "search in subset DOM" is better. I use the sentence 如果知道目标元素所属位置且希望获取指定范围里的元素而不是整个上下文中的第一个,可以进行部分搜索。 , which is more clear for Chinese audiences reading.

If you think it is better leaving a direct transaction, please let me know.

Thanks

Copy link
Member

Choose a reason for hiding this comment

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

This is the same issue as tomatoes...

@skyfackr
Copy link
Author

Hello,

I didn't find any existing issue relating to this document translation. And I think this is not complex work, so I didn't create a new issue and just submitted this PR without noting the issue number in the PR comment. If there does have one issue or you think I better create one first, please let me know. Thanks!

@alaahong
Copy link
Member

Hello,

I didn't find any existing issue relating to this document translation. And I think this is not complex work, so I didn't create a new issue and just submitted this PR without noting the issue number in the PR comment. If there does have one issue or you think I better create one first, please let me know. Thanks!

Hi,no need create issue for such translation, it's better to follow "Wrap all other lines at 72 columns." which means do not put all into one line.

For your translated parts, please check the comment on previous commit.

skyfackr and others added 3 commits July 15, 2023 21:08
update as comment SeleniumHQ#2 and SeleniumHQ#4

add `DOM子集` as transaction of `subset of DOM`

change `CSS定位器` to `CSS选择器`
update as comment SeleniumHQ#5
SeleniumHQ#5 -> change to transaction without proofreading
@harsha509
Copy link
Member

Hi @skyfackr ,

Did you get a chance to look into the above comments?

@skyfackr
Copy link
Author

skyfackr commented Nov 1, 2023 via email

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

Successfully merging this pull request may close these issues.

None yet

4 participants