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": "思考",
"thoughtForSeconds": "思考"
},
"linkSafety": {
"localFileTitle": "開啟本地檔案?",
"externalLinkTitle": "開啟外部連結?",
"localFileDescription": "即將在檔案面板中開啟一個本地檔案。",
"externalLinkDescription": "即將訪問一個外部網站。",
"cancel": "取消",
"opening": "正在開啟…",
"openFile": "開啟檔案",
"openLink": "開啟連結",
"errorCannotOpen": "無法開啟本地檔案",
"errorNoWorkspace": "目前沒有活躍的工作區資料夾。",
"errorOutsideWorkspace": "該檔案不在目前的工作區資料夾內。",
"errorFailedOpen": "開啟本地檔案失敗",
"errorFailedLink": "開啟連結失敗"
},
"messageList": {
"attachedResources": "附加資源",
"loading": "載入中...",