From 998a18db5cff73c3f016e6a1c5df6a2a06401e0a Mon Sep 17 00:00:00 2001 From: chriswang521 Date: Thu, 16 May 2024 10:01:11 +0800 Subject: [PATCH] =?UTF-8?q?Fixed:=E5=B7=A5=E4=BD=9C=E5=8C=BA=E4=BF=A1?= =?UTF-8?q?=E4=BB=BB=E5=8A=9F=E8=83=BD=E4=B8=AD=EF=BC=8C=E5=BA=94=E7=A7=BB?= =?UTF-8?q?=E9=99=A4=E5=A4=96=E9=93=BE"=E4=BA=86=E8=A7=A3=E8=AF=A6?= =?UTF-8?q?=E7=BB=86=E4=BF=A1=E6=81=AF"=E5=92=8C=E2=80=9D=E6=88=91?= =?UTF-8?q?=E4=BB=AC=E7=9A=84=E6=96=87=E6=A1=A3=E2=80=9C.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../translations/main.i18n.json | 8 ++++---- .../workspace/browser/workspace.contribution.ts | 10 +++------- .../contrib/workspace/browser/workspaceTrustEditor.ts | 2 +- 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/extensions/vscode-language-pack-zh-hans/translations/main.i18n.json b/extensions/vscode-language-pack-zh-hans/translations/main.i18n.json index e3ebf642..fc89d118 100644 --- a/extensions/vscode-language-pack-zh-hans/translations/main.i18n.json +++ b/extensions/vscode-language-pack-zh-hans/translations/main.i18n.json @@ -12169,14 +12169,14 @@ "folderTrust": "是否信任此文件夹中的文件的作者?", "grantFolderTrustButton": "信任文件夹并继续(&&T)", "grantWorkspaceTrustButton": "信任工作区并继续(&&T)", - "immediateTrustRequestLearnMore": "如果不信任这些文件的作者,则建议不要继续,因为这些文件可能是恶意文件。请参阅[我们的文档](https://aka.ms/vscode-workspace-trust),了解详细信息。", + "immediateTrustRequestLearnMore": "如果不信任这些文件的作者,则建议不要继续,因为这些文件可能是恶意文件。", "immediateTrustRequestMessage": "如果不信任当前打开的文件或文件夹的源,则尝试使用的功能可能会带来安全风险。", "manageWorkspaceTrust": "管理工作区信任", "manageWorkspaceTrustButton": "管理(&&M)", "newWindow": "在受限模式中打开(&&R)", "no": "否", "open": "打开(&&O)", - "openLooseFileLearnMore": "如果不想打开不受信任的文件,则建议在新窗口中通过受限模式打开它们,因为这些文件可能是恶意文件。请参阅[我们的文档](https://aka.ms/vscode-workspace-trust),了解详细信息。", + "openLooseFileLearnMore": "如果不想打开不受信任的文件,则建议在新窗口中通过受限模式打开它们,因为这些文件可能是恶意文件。", "openLooseFileWindowDetails": "你尝试在受信任的窗口中打开不受信任的文件。", "openLooseFileWindowMesssage": "是否要在此窗口中允许不受信任的文件?", "openLooseFileWorkspaceCheckbox": "记住我对所有工作区的决定", @@ -12190,7 +12190,7 @@ "restrictedModeBannerMessageFolder": "受限模式旨在实现安全地浏览代码。信任此文件夹以启用所有功能。", "restrictedModeBannerMessageWindow": "受限模式旨在实现安全地浏览代码。信任此窗口以启用所有功能。", "restrictedModeBannerMessageWorkspace": "受限模式旨在实现安全地浏览代码。信任此工作区以启用所有功能。", - "startupTrustRequestLearnMore": "如果不信任这些文件的作者,则建议继续使用限制模式,因为这些文件可能是恶意文件。请参阅[我们的文档](https://aka.ms/vscode-workspace-trust),了解详细信息。", + "startupTrustRequestLearnMore": "如果不信任这些文件的作者,则建议继续使用限制模式,因为这些文件可能是恶意文件。", "status.WorkspaceTrust": "工作区信任", "status.ariaTrustedFolder": "此文件夹受信任。", "status.ariaTrustedWindow": "此窗口受信任。", @@ -12281,7 +12281,7 @@ "untrustedWorkspace": "在受限模式下", "untrustedWorkspaceReason": "此工作区通过以下受信任文件夹中的加粗条目得到信任。", "untrustedWorkspaceSubtitle": "你不信任当前工作区中文件的作者。已禁用以下功能:", - "workspaceTrustEditorHeaderActions": "[配置设置]({0}) 或 [了解详细信息](https://aka.ms/vscode-workspace-trust)。", + "workspaceTrustEditorHeaderActions": "[配置设置]({0})。", "xListIcon": "工作区信任编辑器中十字形的图标。" }, "vs/workbench/contrib/workspace/common/workspace": { diff --git a/src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts b/src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts index 91a22f09..c8e727cf 100644 --- a/src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts +++ b/src/vs/workbench/contrib/workspace/browser/workspace.contribution.ts @@ -110,7 +110,7 @@ export class WorkspaceTrustRequestHandler extends Disposable implements IWorkben this.workspaceContextService.getWorkbenchState() !== WorkbenchState.EMPTY ? localize('openLooseFileWorkspaceDetails', "You are trying to open untrusted files in a workspace which is trusted.") : localize('openLooseFileWindowDetails', "You are trying to open untrusted files in a window which is trusted."), - localize('openLooseFileLearnMore', "If you don't want to open untrusted files, we recommend to open them in Restricted Mode in a new window as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more.") + localize('openLooseFileLearnMore', "If you don't want to open untrusted files, we recommend to open them in Restricted Mode in a new window as the files may be malicious.") ]; // Dialog @@ -173,7 +173,7 @@ export class WorkspaceTrustRequestHandler extends Disposable implements IWorkben icon: Codicon.shield, markdownDetails: [ { markdown: new MarkdownString(details) }, - { markdown: new MarkdownString(localize('immediateTrustRequestLearnMore', "If you don't trust the authors of these files, we do not recommend continuing as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more.")) } + { markdown: new MarkdownString(localize('immediateTrustRequestLearnMore', "If you don't trust the authors of these files, we do not recommend continuing as the files may be malicious.")) } ] }, buttons: buttons.filter(b => b.type !== 'Cancel').map(button => { @@ -346,7 +346,7 @@ export class WorkspaceTrustUXHandler extends Disposable implements IWorkbenchCon !isSingleFolderWorkspace ? localize('workspaceStartupTrustDetails', "{0} provides features that may automatically execute files in this workspace.", this.productService.nameShort) : localize('folderStartupTrustDetails', "{0} provides features that may automatically execute files in this folder.", this.productService.nameShort), - learnMoreString ?? localize('startupTrustRequestLearnMore', "If you don't trust the authors of these files, we recommend to continue in restricted mode as the files may be malicious. See [our docs](https://aka.ms/vscode-workspace-trust) to learn more."), + learnMoreString ?? localize('startupTrustRequestLearnMore', "If you don't trust the authors of these files, we recommend to continue in restricted mode as the files may be malicious."), !isEmptyWindow ? `\`${this.labelService.getWorkspaceLabel(workspaceIdentifier, { verbose: Verbosity.LONG })}\`` : '', ], @@ -496,10 +496,6 @@ export class WorkspaceTrustUXHandler extends Disposable implements IWorkbenchCon { label: localize('restrictedModeBannerManage', "Manage"), href: 'command:' + MANAGE_TRUST_COMMAND_ID - }, - { - label: localize('restrictedModeBannerLearnMore', "Learn More"), - href: 'https://aka.ms/vscode-workspace-trust' } ]; diff --git a/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts b/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts index ffa01f3a..7184db3e 100644 --- a/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts +++ b/src/vs/workbench/contrib/workspace/browser/workspaceTrustEditor.ts @@ -854,7 +854,7 @@ export class WorkspaceTrustEditor extends EditorPane { localize('untrustedDescription', "{0} is in a restricted mode intended for safe code browsing.", this.productService.nameShort); const headerDescriptionActions = append(this.headerDescription, $('div')); - const headerDescriptionActionsText = localize({ key: 'workspaceTrustEditorHeaderActions', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] }, "[Configure your settings]({0}) or [learn more](https://aka.ms/vscode-workspace-trust).", `command:workbench.trust.configure`); + const headerDescriptionActionsText = localize({ key: 'workspaceTrustEditorHeaderActions', comment: ['Please ensure the markdown link syntax is not broken up with whitespace [text block](link block)'] }, "[Configure your settings]({0}).", `command:workbench.trust.configure`); for (const node of parseLinkedText(headerDescriptionActionsText).nodes) { if (typeof node === 'string') { append(headerDescriptionActions, document.createTextNode(node));