-
Notifications
You must be signed in to change notification settings - Fork 8k
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
Conversation
Preview URLs External URLs (1)URL:
(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`。 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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`**。 |
There was a problem hiding this comment.
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?
如果在给定的字符串中找到了被搜索到字符串(包括 `searchString` 为空字符串的情况),则返回 **`true`**,否则返回 **`false`**。 | |
如果在给定的字符串中找到了搜索字符串(包括 `searchString` 为空字符串的情况),则返回 **`true`**,否则返回 **`false`**。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里的主被动语态容易造成混淆,我再修改一下
files/zh-cn/web/javascript/reference/global_objects/string/includes/index.md
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Description
Same as the title.
Motivation
Ditto.
Additional details
None.
Related issues and pull requests
#13975