Skip to content

zh-cn(update): sync toStringTag #10338

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

Merged
merged 8 commits into from
Dec 4, 2022
Merged

zh-cn(update): sync toStringTag #10338

merged 8 commits into from
Dec 4, 2022

Conversation

fwqaaq
Copy link
Contributor

@fwqaaq fwqaaq commented Nov 30, 2022

Description

Motivation

Additional details

Related issues and pull requests

@fwqaaq fwqaaq requested a review from a team as a code owner November 30, 2022 05:59
@fwqaaq fwqaaq requested review from t7yang and removed request for a team November 30, 2022 05:59
@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Nov 30, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 30, 2022

Preview URLs

External URLs (2)

URL: /zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag
Title: Symbol.toStringTag

(comment last updated: 2022-12-04 07:38:10)

@yin1999 yin1999 requested review from yin1999 and removed request for t7yang November 30, 2022 12:10
@@ -5,13 +5,15 @@ slug: Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag

{{JSRef}}

**`Symbol.toStringTag`** 是一个内置 symbol,它通常作为对象的属性键使用,对应的属性值应该为字符串类型,这个字符串用来表示该对象的自定义类型标签,通常只有内置的 {{jsxref("Object.prototype.toString()")}} 方法会去读取这个标签并把它包含在自己的返回值里
已知的 **`Symbol.toStringTag`** symbol 是一个字符串值属性,用于创建对象的默认字符串描述。它由 {{jsxref("Object.prototype.toString()")}} 方法内部访问
Copy link
Member

Choose a reason for hiding this comment

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

MDN 英文文档有给出对 well-known symbol 的解释,我觉得直接使用“已知”并不是很合适。中文文档之前将其翻译为“众所周知的 symbol”我觉得也需斟酌。

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol#well-known_symbols

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@yin1999 https://262.ecma-international.org/6.0/#sec-well-known-symbols, 我觉得不翻译,它是 javascript 内部实现的一些特殊 symbol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

我问了一下,well-known 有通用的意思,然后这些 symbol 都是内置的,建议翻译 内置通用

Copy link
Member

Choose a reason for hiding this comment

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

我问了一下,well-known 有通用的意思,然后这些 symbol 都是内置的,建议翻译 内置通用

well-known 的确是众所周知的意思,但在中文语境下,这么翻译并不合适。我赞同使用“内置通用”这一翻译,若有时间,请另开PR更新其它的页面中对该词的翻译(附加英文 well-known)。感谢

…tringtag/index.md

Co-authored-by: A1lo <yin199909@aliyun.com>
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 dae76b9 into mdn:main Dec 4, 2022
@fwqaaq fwqaaq deleted the stringTag branch December 8, 2022 04:53
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