fix(workspace): clarify system app open label

The workspace action was labeled as opening with the default application, which did not clearly describe that the operating system chooses the handler. Update the Chinese and English labels, accessibility text, tests, and feature documentation to refer to the system application.

Release note: 将工作区文件和目录操作中的“使用默认应用打开”改为“使用系统应用打开”,让系统应用选择行为更清晰。
This commit is contained in:
mesalogo
2026-10-13 00:44:56 +08:00
parent b22be5146b
commit a70fb2c13b
5 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -8056,9 +8056,9 @@ describe("App", () => {
fireEvent.click(screen.getByLabelText("切换助手工作栏"));
fireEvent.click(await screen.findByRole("tab", { name: "工作区" }));
fireEvent.click(await screen.findByLabelText("docs 的更多操作"));
fireEvent.click(within(screen.getByRole("menu", { name: "docs" })).getByRole("menuitem", { name: "使用默认应用打开" }));
fireEvent.click(within(screen.getByRole("menu", { name: "docs" })).getByRole("menuitem", { name: "使用系统应用打开" }));
fireEvent.click(screen.getByLabelText("README.md 的更多操作"));
fireEvent.click(within(screen.getByRole("menu", { name: "README.md" })).getByRole("menuitem", { name: "使用默认应用打开" }));
fireEvent.click(within(screen.getByRole("menu", { name: "README.md" })).getByRole("menuitem", { name: "使用系统应用打开" }));
await waitFor(() =>
expect(api.workspace.openPath).toHaveBeenCalledWith(
projectId,
@@ -501,10 +501,10 @@ describe('WorkspaceFilesPanel', () => {
expect(onListDirectory).toHaveBeenCalledWith('docs')
expect(onOpenFile).toHaveBeenCalledWith('docs/guide.md')
fireEvent.click(screen.getByLabelText('guide.md 的更多操作'))
fireEvent.click(within(screen.getByRole('menu', { name: 'guide.md' })).getByRole('menuitem', { name: '使用默认应用打开' }))
fireEvent.click(within(screen.getByRole('menu', { name: 'guide.md' })).getByRole('menuitem', { name: '使用系统应用打开' }))
expect(onOpenEntry).toHaveBeenCalledWith('docs/guide.md', 'file')
fireEvent.click(screen.getByLabelText('docs 的更多操作'))
fireEvent.click(within(screen.getByRole('menu', { name: 'docs' })).getByRole('menuitem', { name: '使用默认应用打开' }))
fireEvent.click(within(screen.getByRole('menu', { name: 'docs' })).getByRole('menuitem', { name: '使用系统应用打开' }))
expect(onOpenEntry).toHaveBeenCalledWith('docs', 'directory')
expect(screen.getAllByText('M')).not.toHaveLength(0)
})
@@ -39,7 +39,7 @@ export const workspace = {
importFiles: 'Import files', importing: 'Importing…', importTarget: 'Destination: {{path}}', imported: 'Imported {{count}} files into {{path}}.', created: 'Created',
gitWorkspace: 'Git Workspace', more: 'More actions for {{name}}', browse: 'Browse directory', parent: 'Parent directory',
createFile: 'New file', createDirectory: 'New directory', rename: 'Rename', move: 'Move', delete: 'Delete', properties: 'Properties',
defaultOpen: 'Open with default application', name: 'Name', nameOnly: 'Name cannot contain path separators', destination: 'Destination directory',
defaultOpen: 'Open with system application', name: 'Name', nameOnly: 'Name cannot contain path separators', destination: 'Destination directory',
chooseDirectory: 'Choose directory', moveHelp: 'Choose a directory inside the current workspace. The file or folder keeps its name.',
destinationOutside: 'Choose a directory inside the current workspace: {{root}}. Moving outside this workspace is not supported.',
destinationUnavailable: 'The project directory is unavailable. Reopen the workspace and try again.',
@@ -530,7 +530,7 @@ export const workspace = {
},
openFolderAriaLabel: 'Open folder {{name}} in the system file manager',
openFolder: 'Open folder',
openFileAriaLabel: 'Open file {{name}} with the default app',
openFileAriaLabel: 'Open file {{name}} with the system app',
openFile: 'Open file',
reading: 'Reading…',
directoryTruncated:
@@ -36,7 +36,7 @@ export const workspace = {
importFiles: '导入文件', importing: '正在导入…', importTarget: '目标目录:{{path}}', imported: '已导入 {{count}} 个文件到 {{path}}。', created: '创建时间',
gitWorkspace: 'Git 工作区', more: '{{name}} 的更多操作', browse: '浏览此目录', parent: '返回父目录',
createFile: '新建文件', createDirectory: '新建目录', rename: '重命名', move: '移动', delete: '删除', properties: '属性',
defaultOpen: '使用默认应用打开', name: '名称', nameOnly: '名称不能包含路径分隔符', destination: '目标目录',
defaultOpen: '使用系统应用打开', name: '名称', nameOnly: '名称不能包含路径分隔符', destination: '目标目录',
chooseDirectory: '选择目录', moveHelp: '请选择当前工作区内的目录,移动后保留文件或目录原名。',
destinationOutside: '请选择当前工作区 {{root}} 内的目录,暂不支持移动到此工作区之外。',
destinationUnavailable: '项目目录不可用,请重新打开工作区后重试。',
@@ -519,7 +519,7 @@ export const workspace = {
},
openFolderAriaLabel: '在系统资源管理器中打开文件夹 {{name}}',
openFolder: '打开文件夹',
openFileAriaLabel: '使用默认应用打开文件 {{name}}',
openFileAriaLabel: '使用系统应用打开文件 {{name}}',
openFile: '打开文件',
reading: '正在读取…',
directoryTruncated: '目录项目超过 500 项,仅显示前 500 项。',