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: create sidebarAction.setTitle() #24903

Merged
merged 14 commits into from
Dec 13, 2024
Merged

Conversation

PassionPenguin
Copy link
Contributor

No description provided.

@PassionPenguin PassionPenguin requested a review from a team as a code owner December 2, 2024 05:14
@PassionPenguin PassionPenguin requested review from irvin and removed request for a team December 2, 2024 05:14
@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Dec 2, 2024
Copy link
Contributor

github-actions bot commented Dec 2, 2024

Preview URLs

Flaws (13)

URL: /zh-CN/docs/Mozilla/Add-ons/WebExtensions/API/sidebarAction/setTitle
Title: sidebarAction.setTitle()
Flaw count: 13

  • macros:
    • /zh-CN/docs/Mozilla/Add-ons/WebExtensions/Background_scripts does not exist but fell back to /en-US/docs/Mozilla/Add-ons/WebExtensions/Background_scripts
    • /zh-CN/docs/Mozilla/Add-ons/WebExtensions/Working_with_files does not exist but fell back to /en-US/docs/Mozilla/Add-ons/WebExtensions/Working_with_files
    • /zh-CN/docs/Mozilla/Add-ons/WebExtensions/Differences_between_API_implementations does not exist but fell back to /en-US/docs/Mozilla/Add-ons/WebExtensions/Differences_between_API_implementations
    • /zh-CN/docs/Mozilla/Add-ons/WebExtensions/user_interface/Sidebars does not exist but fell back to /en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Sidebars
    • /zh-CN/docs/Mozilla/Add-ons/WebExtensions/user_interface/Context_menu_items does not exist but fell back to /en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Context_menu_items
    • and 8 more flaws omitted
External URLs (1)

URL: /zh-CN/docs/Mozilla/Add-ons/WebExtensions/API/sidebarAction/setTitle
Title: sidebarAction.setTitle()

(comment last updated: 2024-12-13 14:41:59)

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.

下次遇到这类问题可以联系我们,有些做法我们并不推荐。但如果只看预览网页的话又会发现不了,容易把我们不希望看到的表示方法引入到中文文档中。

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.

还有一个上游的拼写错误:mdn/content#37095

@yin1999
Copy link
Member

yin1999 commented Dec 4, 2024

打错了,翻译成“清单” :/

@PassionPenguin
Copy link
Contributor Author

打错了,翻译成“清单” :/

ohno其他地方全改成“manifest”了


## 标题类型

你的附加组件应该在 [sidebar_action](/zh-CN/docs/Mozilla/Add-ons/WebExtensions/manifest.json/sidebar_action) 清单键中指定侧边栏的标题(这被称为“_清单标题_”)。如果你没有指定清单标题,它将使用默认值即附加组件名。
Copy link
Member

@yin1999 yin1999 Dec 7, 2024

Choose a reason for hiding this comment

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

Suggested change
你的附加组件应该在 [sidebar_action](/zh-CN/docs/Mozilla/Add-ons/WebExtensions/manifest.json/sidebar_action) 清单键中指定侧边栏的标题(这被称为“_清单标题_”)。如果你没有指定清单标题,它将使用默认值即附加组件名
你的扩展应该在 [sidebar_action](/zh-CN/docs/Mozilla/Add-ons/WebExtensions/manifest.json/sidebar_action) 清单键中指定侧边栏的标题(这被称为“_清单标题_”)。如果你没有指定清单标题,它将默认使用扩展名


你的附加组件应该在 [sidebar_action](/zh-CN/docs/Mozilla/Add-ons/WebExtensions/manifest.json/sidebar_action) 清单键中指定侧边栏的标题(这被称为“_清单标题_”)。如果你没有指定清单标题,它将使用默认值即附加组件名。

如果你使用 `setTitle()` 设置新标题,并包含 `tabId` 选项,那么标题仅为给定的标签设置。这个标题称为“_标签特定标题_”。
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
如果你使用 `setTitle()` 设置新标题,并包含 `tabId` 选项,那么标题仅为给定的标签设置。这个标题称为“_标签特定标题_”。
如果你使用 `setTitle()` 设置新标题,并包含 `tabId` 选项,那么标题仅为给定的标签页设置。这个标题称为“_标签页特定标题_”。


如果你使用 `setTitle()` 设置新标题,并包含 `windowId` 选项,那么标题仅为给定的窗口设置。这个标题称为“_窗口特定标题_”,并将出现在该窗口的所有标签中,这些标签没有设置标签特定标题。

如果你使用 `setTitle()` 设置新标题,并省略 `tabId` 和 `windowId` 选项,那么这将设置“_全局标题_”。全局标题将出现在所有没有设置标签特定标题的标签中,且其窗口没有设置窗口特定标题的标签中。
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
如果你使用 `setTitle()` 设置新标题,并省略 `tabId``windowId` 选项,那么这将设置“_全局标题_”。全局标题将出现在所有没有设置标签特定标题的标签中,且其窗口没有设置窗口特定标题的标签中
如果你使用 `setTitle()` 设置新标题,并省略 `tabId``windowId` 选项,那么这将设置“_全局标题_”。全局标题将出现在所有没有设置标签页特定标题的标签中,且其窗口没有设置窗口特定标题的标签页中


- `details`

- : `object`。新标题和可选的目标标签页或窗口 ID。
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- : `object`新标题和可选的目标标签页或窗口 ID。
- : `object`具有以下属性的对象:


- `title`

- : `string` 或 `null`。鼠标悬停时浏览器操作应显示的字符串。
Copy link
Member

Choose a reason for hiding this comment

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

串台了?上面和这边都错了


- : `string` 或 `null`。鼠标悬停时浏览器操作应显示的字符串。

如果 `title` 是空字符串,则使用附加组件名作为标题,但 {{WebExtAPIRef("sidebarAction.getTitle")}} 仍会提供空字符串。
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
如果 `title` 是空字符串,则使用附加组件名作为标题,但 {{WebExtAPIRef("sidebarAction.getTitle")}} 仍会提供空字符串。
如果 `title` 是空字符串,则使用扩展名作为标题,但 {{WebExtAPIRef("sidebarAction.getTitle")}} 仍会提供空字符串。


如果 `title` 是空字符串,则使用附加组件名作为标题,但 {{WebExtAPIRef("sidebarAction.getTitle")}} 仍会提供空字符串。

如果 `title` 为 `null`:
Copy link
Member

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.

又翻译成“拓展”了

@yin1999 yin1999 merged commit 2f1711f into mdn:main Dec 13, 2024
7 checks passed
@PassionPenguin PassionPenguin deleted the sidebaraction-4 branch December 14, 2024 01:18
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
Development

Successfully merging this pull request may close these issues.

2 participants