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 RegisteredUserScript.unregister() #24964

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

Conversation

PassionPenguin
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the l10n-zh Issues related to Chinese content. label Dec 6, 2024
Copy link
Contributor

github-actions bot commented Dec 6, 2024

Preview URLs

Flaws (13)

URL: /zh-CN/docs/Mozilla/Add-ons/WebExtensions/API/userScripts/RegisteredUserScript/unregister
Title: RegisteredUserScript.unregister()
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

(comment last updated: 2024-12-21 13:07:01)

@PassionPenguin PassionPenguin marked this pull request as ready for review December 6, 2024 13:55
@PassionPenguin PassionPenguin requested a review from a team as a code owner December 6, 2024 13:55
@PassionPenguin PassionPenguin requested review from JasonLamv-t and removed request for a team December 6, 2024 13:55
{{WebExtAPIRef("userScripts.RegisteredUserScript","RegisteredUserScript")}} 对象的 `unregister()` 方法注销由该对象表示的用户脚本(用户脚本是使用 {{WebExtAPIRef("userScripts.register","userScripts.register()")}} 注册的)。

> [!NOTE]
> 当相关的扩展页面(从中注册了用户脚本)卸载时,用户脚本会被自动注销,因此你应该从一个至少持续到你希望用户脚本保持注册的扩展页面中注册用户脚本。
Copy link
Member

Choose a reason for hiding this comment

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

“因此”后面的翻译还须修改

@yin1999
Copy link
Member

yin1999 commented Dec 17, 2024

请再修改一下前面提到的那句话

@PassionPenguin
Copy link
Contributor Author

请再修改一下前面提到的那句话

仍然不是很确定,这句话直接译出来估计会很臃肿……

> 当相关的扩展页面(注册了用户脚本的页面)被卸载时,用户脚本会被自动注销。因此,如果你希望你的用户脚本能够一段时间内不会被注销,那么你应该在存活时间比用户脚本注册时间还长的扩展页面中注册这一用户脚本。

@jasonren0403
Copy link
Contributor

请再修改一下前面提到的那句话

仍然不是很确定,这句话直接译出来估计会很臃肿……

> 当相关的扩展页面(注册了用户脚本的页面)被卸载时,用户脚本会被自动注销。因此,如果你希望你的用户脚本能够一段时间内不会被注销,那么你应该在存活时间比用户脚本注册时间还长的扩展页面中注册这一用户脚本。

at least as long as you want... 应该是“至少(持续时间)相同”的意思

@jasonren0403 jasonren0403 requested a review from yin1999 January 8, 2025 01:12
@PassionPenguin
Copy link
Contributor Author

请再修改一下前面提到的那句话

仍然不是很确定,这句话直接译出来估计会很臃肿……

> 当相关的扩展页面(注册了用户脚本的页面)被卸载时,用户脚本会被自动注销。因此,如果你希望你的用户脚本能够一段时间内不会被注销,那么你应该在存活时间比用户脚本注册时间还长的扩展页面中注册这一用户脚本。

at least as long as you want... 应该是“至少(持续时间)相同”的意思

yes,但是要直接揉进去这个句子里面的话,会有点怪异……或者就意译

之前也尝试让LLM给了十几个参考,都没有找到一个比较好的(都怪怪的,要么就干脆改变意思了)

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
Status: Review requested
Development

Successfully merging this pull request may close these issues.

3 participants