fix(windows): normalize Windows file paths with leading slash and add i18n to link safety dialog

Strip spurious leading slash from Windows drive-letter paths (/D:/foo → D:/foo) in parseLocalFileTarget so that workspace-relative comparison succeeds and local files can be opened correctly. Display the normalized path in the confirmation dialog. Internationalize all link safety dialog and toast strings across 10 locales.
This commit is contained in:
xintaofei
2026-04-13 22:47:14 +08:00
parent b76dc63e77
commit 0a39e1daf4
11 changed files with 184 additions and 19 deletions

View File

@@ -1556,6 +1556,21 @@
"thoughtForFewSeconds": "Thought",
"thoughtForSeconds": "Thought"
},
"linkSafety": {
"localFileTitle": "Open local file?",
"externalLinkTitle": "Open external link?",
"localFileDescription": "You're about to open a local file in the Files panel.",
"externalLinkDescription": "You're about to visit an external website.",
"cancel": "Cancel",
"opening": "Opening...",
"openFile": "Open file",
"openLink": "Open link",
"errorCannotOpen": "Cannot open local file",
"errorNoWorkspace": "No workspace folder is currently active.",
"errorOutsideWorkspace": "The file is outside the current workspace folder.",
"errorFailedOpen": "Failed to open local file",
"errorFailedLink": "Failed to open link"
},
"messageList": {
"attachedResources": "Attached resources",
"loading": "Loading...",