Skip to content

i18n(zh-cn):translate concept/Inter-Process Communication/isolation.md #3347

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

Closed
wants to merge 13 commits into from

Conversation

qwer252
Copy link
Contributor

@qwer252 qwer252 commented Jun 8, 2025

Description

  • translate concept/Inter-Process Communication/isolation.md

@qwer252 qwer252 requested a review from a team as a code owner June 8, 2025 16:13
@github-project-automation github-project-automation bot moved this to 🪵 Backlog in Documentation Jun 8, 2025
Copy link

netlify bot commented Jun 8, 2025

Deploy Preview for tauri-v2 ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 24936bd
🔍 Latest deploy log https://app.netlify.com/projects/tauri-v2/deploys/6846f54874609d0008a937e3
😎 Deploy Preview https://deploy-preview-3347--tauri-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 99 (🔴 down 1 from production)
Accessibility: 100 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 80 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

@github-actions github-actions bot added i18n Is this related to translations? i18n: zh-cn Is this related to zh-cn translations? labels Jun 8, 2025
隔离模式在设计时考虑的最大的威胁模型是**开发威胁**(Development Threats)。除了许多前端构建时工具所包括的数十(甚至数百)个通常是深度嵌套的依赖,一个复杂的应用也还可能捆绑大量(通常也是深度嵌套的)依赖到最终输出。
## 何时需要

Tauri 强烈推荐只要有可能就使用隔离模式。因为隔离应用程序截获来自前端的***所有***信息,它*始终*可以被使用。
Copy link
Contributor

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.

我一开始使用的是_** **_,但是发现这样必须让两边空一格,问了一下AI,它告诉我***也可以实现加粗斜体。

Copy link
Contributor

Choose a reason for hiding this comment

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

那可能是markdown标准不太一样


Tauri 同时也强烈推荐在使用外部 Tauri API 时加强应用的安全性。作为开发者,你可以使用安全隔离应用程序尝试验证 IPC 输入,以确保它们在某些预期参数范围内。例如,你可能需要检查读取或写入文件的调用是否尝试访问应用程序预期位置之外的路径。另一个例子是确保 Tauri API 的 HTTP 获取调用仅将 Origin 标头设置为应用程序预期的值。

也就是说,它会拦截来自前端的***所有***消息,因此它甚至可以与始终在线的 API(例如 [事件] ) 配合使用。由于某些事件可能会导致你自己的 Rust 代码执行操作,因此可以对它们使用相同类型的验证技术。
Copy link
Contributor

Choose a reason for hiding this comment

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

这个地方也是一样的


```javascript
window.__TAURI_ISOLATION_HOOK__ = (payload) => {
// let's not verify or modify anything, just print the content from the hook
Copy link
Contributor

Choose a reason for hiding this comment

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

代码块中的英文注释也需要翻译

@github-project-automation github-project-automation bot moved this from 🪵 Backlog to 🏗️ In progress in Documentation Jun 9, 2025
@KikkiZ
Copy link
Contributor

KikkiZ commented Jun 9, 2025

你提 pr 要在新的分支里提 commit ,如果在之前提 pr 的分支里交新的 commit ,会让之前的 pr 更新。而你需要提一个新的 pr ,而不是在原来的 pr 上修改。这个 pr 最好改回原来的标题,然后 close ,后面的 commit 再新分支里提交。

@qwer252
Copy link
Contributor Author

qwer252 commented Jun 9, 2025

你提 pr 要在新的分支里提 commit ,如果在之前提 pr 的分支里交新的 commit ,会让之前的 pr 更新。而你需要提一个新的 pr ,而不是在原来的 pr 上修改。这个 pr 最好改回原来的标题,然后 close ,后面的 commit 再新分支里提交。

您的意思是说每次提交一个新文件时开一个新的pr吗?我之前的pr好像被合并了,本来想让这个文件也提交到上一个pr里的。

@KikkiZ
Copy link
Contributor

KikkiZ commented Jun 10, 2025

你提 pr 要在新的分支里提 commit ,如果在之前提 pr 的分支里交新的 commit ,会让之前的 pr 更新。而你需要提一个新的 pr ,而不是在原来的 pr 上修改。这个 pr 最好改回原来的标题,然后 close ,后面的 commit 再新分支里提交。

您的意思是说每次提交一个新文件时开一个新的pr吗?我之前的pr好像被合并了,本来想让这个文件也提交到上一个pr里的。

是的,你的上一个 pr 被合并了,本来应该是关闭的。但是你又在上一个 pr 里添加了新的东西,导致它没有关闭。对于已经合并的 pr,我的建议是让它关闭,你需要将你新提交的文件新开一个 pr。通常我们是在所有修改完成后再打开 pr,当 review 通过并合并后该 pr 就自然关闭。不太建议你隔一段时间追加一个新的修改,至少你需要在 pr 中声明还有需要追加的修改,否则仓库维护者无法判断是否应当合并。

Copy link
Member

@dreyfus92 dreyfus92 left a comment

Choose a reason for hiding this comment

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

Thank you peeps! 😁

@github-project-automation github-project-automation bot moved this from 🏗️ In progress to 🪵 Backlog in Documentation Jun 10, 2025
@qwer252 qwer252 closed this Jun 10, 2025
@github-project-automation github-project-automation bot moved this from 🪵 Backlog to ✅ Done in Documentation Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n: zh-cn Is this related to zh-cn translations? i18n Is this related to translations?
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

4 participants