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

[zh-cn]: Update translation of String.includes() #14142

Merged
merged 2 commits into from
Jul 12, 2023

Conversation

JasonLamv-t
Copy link
Member

Description

Same as the title.

Motivation

Ditto.

Additional details

None.

Related issues and pull requests

#13975

@JasonLamv-t JasonLamv-t requested a review from a team as a code owner July 11, 2023 06:46
@JasonLamv-t JasonLamv-t requested review from t7yang and removed request for a team July 11, 2023 06:46
@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Jul 11, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Jul 11, 2023

Preview URLs

External URLs (1)

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/String/includes
Title: String.prototype.includes()

(comment last updated: 2023-07-12 01:13:29)

@@ -5,7 +5,7 @@ slug: Web/JavaScript/Reference/Global_Objects/String/includes

{{JSRef}}

**`includes()`** 方法执行区分大小写的搜索,以确定是否可以在另一个字符串中找到一个字符串,并根据情况返回 `true` 或 `false`。
**`includes()`** 方法执行区分大小写的搜索,以确定是否可以在一个字符串中找到另一个字符串,并根据情况返回 `true` 或 `false`。
Copy link
Member

Choose a reason for hiding this comment

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

I have no objection to the modification here

Copy link
Member Author

@JasonLamv-t JasonLamv-t Jul 12, 2023

Choose a reason for hiding this comment

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

原文的 ‘another’ 用于修饰后一个 ‘string’ 以令其区别于前一个 ‘string’,如果强行按照原文翻译,由于语序的问题,‘另一个’ 在 ‘一个’ 前面,这不符合习惯,而且没有裨益

### 返回值

如果当前字符串包含被搜寻的字符串,就返回 **`true`**,否则返回 **`false`**。
如果在给定的字符串中找到了被搜索到字符串(包括 `searchString` 为空字符串的情况),则返回 **`true`**,否则返回 **`false`**。
Copy link
Member

Choose a reason for hiding this comment

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

Should str be the searched string and searchString be the search string?

Suggested change
如果在给定的字符串中找到了被搜索到字符串(包括 `searchString` 为空字符串的情况),则返回 **`true`**,否则返回 **`false`**
如果在给定的字符串中找到了搜索字符串(包括 `searchString` 为空字符串的情况),则返回 **`true`**,否则返回 **`false`**

Copy link
Member Author

Choose a reason for hiding this comment

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

这里的主被动语态容易造成混淆,我再修改一下

Copy link
Member

@yin1999 yin1999 left a comment

Choose a reason for hiding this comment

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

Thanks

@yin1999 yin1999 merged commit ad55451 into mdn:main Jul 12, 2023
7 checks passed
@JasonLamv-t JasonLamv-t deleted the string-includes branch July 12, 2023 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
l10n-zh Issues related to Chinese content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants