From 1ce062dce439195dd398a39b04a323afe7a908fd Mon Sep 17 00:00:00 2001 From: xintaofei Date: Fri, 20 Mar 2026 22:23:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=B3=E4=BE=A7=E8=BE=B9=E6=A0=8F=E5=8F=98?= =?UTF-8?q?=E6=9B=B4=E5=8C=BA=E5=9F=9F=E6=94=AF=E6=8C=81=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E6=93=8D=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../layout/aux-panel-git-changes-tab.tsx | 211 +++++++++++++++++- src/i18n/messages/ar.json | 17 +- src/i18n/messages/de.json | 17 +- src/i18n/messages/en.json | 17 +- src/i18n/messages/es.json | 17 +- src/i18n/messages/fr.json | 17 +- src/i18n/messages/ja.json | 17 +- src/i18n/messages/ko.json | 17 +- src/i18n/messages/pt.json | 17 +- src/i18n/messages/zh-CN.json | 17 +- src/i18n/messages/zh-TW.json | 17 +- 11 files changed, 349 insertions(+), 32 deletions(-) diff --git a/src/components/layout/aux-panel-git-changes-tab.tsx b/src/components/layout/aux-panel-git-changes-tab.tsx index 8fb8672..4c67dbb 100644 --- a/src/components/layout/aux-panel-git-changes-tab.tsx +++ b/src/components/layout/aux-panel-git-changes-tab.tsx @@ -38,6 +38,7 @@ import { useAuxPanelContext } from "@/contexts/aux-panel-context" import { useFolderContext } from "@/contexts/folder-context" import { useWorkspaceContext } from "@/contexts/workspace-context" import { + deleteFileTreeEntry, gitDiff, gitAddFiles, gitRollbackFile, @@ -80,7 +81,11 @@ interface GitActionTarget { name: string } -type DirectoryGitAction = "add" | "rollback" +type DirectoryGitAction = + | "add" + | "rollback" + | "delete-tracked" + | "delete-untracked" interface DirectoryGitCandidateEntry { path: string @@ -188,6 +193,10 @@ function scopeGitStatusEntriesForDirectory( ) } +function isDeleteAction(action: DirectoryGitAction): boolean { + return action === "delete-tracked" || action === "delete-untracked" +} + function filterDirectoryGitCandidates( entries: DirectoryGitCandidateEntry[], action: DirectoryGitAction @@ -196,6 +205,20 @@ function filterDirectoryGitCandidates( return entries.filter((entry) => entry.status.trim().length > 0) } + if (action === "delete-tracked") { + return entries.filter((entry) => { + const fileState = classifyGitFileState(entry.status) + return fileState !== null && fileState !== "untracked" + }) + } + + if (action === "delete-untracked") { + return entries.filter((entry) => { + const fileState = classifyGitFileState(entry.status) + return fileState === "untracked" + }) + } + return entries.filter((entry) => { const fileState = classifyGitFileState(entry.status) return fileState !== "untracked" @@ -446,6 +469,8 @@ export function GitChangesTab() { null ) const [rollingBack, setRollingBack] = useState(false) + const [deleteTarget, setDeleteTarget] = useState(null) + const [deleting, setDeleting] = useState(false) const [directoryGitActionType, setDirectoryGitActionType] = useState(null) const [directoryGitActionTarget, setDirectoryGitActionTarget] = @@ -726,7 +751,9 @@ export function GitChangesTab() { toast.info( action === "add" ? t("toasts.noAddableFilesInDir") - : t("toasts.noRollbackFilesInDir") + : isDeleteAction(action) + ? t("toasts.noDeletableFilesInDir") + : t("toasts.noRollbackFilesInDir") ) return } @@ -793,6 +820,37 @@ export function GitChangesTab() { } }, [fetchChanges, folder?.path, rollbackTarget, t]) + const handleRequestDelete = useCallback( + (target: GitActionTarget, scope: "tracked" | "untracked") => { + if (target.kind === "dir") { + void openDirectoryGitActionDialog( + scope === "tracked" ? "delete-tracked" : "delete-untracked", + target + ) + return + } + setDeleteTarget(target) + }, + [openDirectoryGitActionDialog] + ) + + const handleDeleteConfirm = useCallback(async () => { + if (!folder?.path || !deleteTarget) return + + setDeleting(true) + try { + await deleteFileTreeEntry(folder.path, deleteTarget.path) + toast.success(t("toasts.deleted", { name: deleteTarget.name })) + setDeleteTarget(null) + await fetchChanges({ inline: true }) + } catch (error) { + const message = error instanceof Error ? error.message : String(error) + toast.error(t("toasts.deleteFailed"), { description: message }) + } finally { + setDeleting(false) + } + }, [deleteTarget, fetchChanges, folder?.path, t]) + const directoryGitAllFilePaths = useMemo( () => directoryGitCandidates.map((entry) => entry.path), [directoryGitCandidates] @@ -848,6 +906,15 @@ export function GitChangesTab() { count: selectedPaths.length, }) ) + } else if (isDeleteAction(directoryGitActionType)) { + for (const filePath of selectedPaths) { + await deleteFileTreeEntry(folder.path, filePath) + } + toast.success( + t("toasts.deletedFiles", { + count: selectedPaths.length, + }) + ) } else { for (const filePath of selectedPaths) { await gitRollbackFile(folder.path, filePath) @@ -867,7 +934,9 @@ export function GitChangesTab() { toast.error( directoryGitActionType === "add" ? t("toasts.addToVcsFailed") - : t("toasts.rollbackFailed"), + : isDeleteAction(directoryGitActionType) + ? t("toasts.deleteFailed") + : t("toasts.rollbackFailed"), { description: message, } @@ -941,6 +1010,14 @@ export function GitChangesTab() { > {t("actions.addToVcs")} + { + handleRequestDelete(target, "tracked") + }} + variant="destructive" + > + {t("actions.delete")} + ) @@ -1021,6 +1098,14 @@ export function GitChangesTab() { > {t("actions.addToVcs")} + { + handleRequestDelete(target, "tracked") + }} + variant="destructive" + > + {t("actions.delete")} + ) @@ -1028,6 +1113,7 @@ export function GitChangesTab() { [ handleOpenCommitWindow, handleAddToVcs, + handleRequestDelete, handleRequestRollback, openFilePreview, openWorkingTreeDiff, @@ -1088,6 +1174,14 @@ export function GitChangesTab() { > {t("actions.addToVcs")} + { + handleRequestDelete(target, "untracked") + }} + variant="destructive" + > + {t("actions.delete")} + ) @@ -1158,6 +1252,14 @@ export function GitChangesTab() { > {t("actions.addToVcs")} + { + handleRequestDelete(target, "untracked") + }} + variant="destructive" + > + {t("actions.delete")} + ) @@ -1165,6 +1267,7 @@ export function GitChangesTab() { [ handleOpenCommitWindow, handleAddToVcs, + handleRequestDelete, handleRequestRollback, openFilePreview, openWorkingTreeDiff, @@ -1290,6 +1393,21 @@ export function GitChangesTab() { > {t("actions.addToVcs")} + { + handleRequestDelete( + { + kind: "dir", + path: "", + name: folderName, + }, + "tracked" + ) + }} + variant="destructive" + > + {t("actions.delete")} + @@ -1383,6 +1501,21 @@ export function GitChangesTab() { > {t("actions.addToVcs")} + { + handleRequestDelete( + { + kind: "dir", + path: "", + name: folderName, + }, + "untracked" + ) + }} + variant="destructive" + > + {t("actions.delete")} + @@ -1404,7 +1537,10 @@ export function GitChangesTab() { {directoryGitActionType === "add" ? t("actions.addToVcs") - : t("actions.rollback")} + : directoryGitActionType && + isDeleteAction(directoryGitActionType) + ? t("actions.delete") + : t("actions.rollback")} {directoryGitActionTarget @@ -1412,9 +1548,14 @@ export function GitChangesTab() { ? t("directoryDialog.descriptionAdd", { path: directoryGitActionTarget.path, }) - : t("directoryDialog.descriptionRollback", { - path: directoryGitActionTarget.path, - }) + : directoryGitActionType && + isDeleteAction(directoryGitActionType) + ? t("directoryDialog.descriptionDelete", { + path: directoryGitActionTarget.path, + }) + : t("directoryDialog.descriptionRollback", { + path: directoryGitActionTarget.path, + }) : t("directoryDialog.descriptionFallback")} @@ -1474,9 +1615,11 @@ export function GitChangesTab() { {entry.path} - - {entry.status} - + {entry.status !== UNTRACKED_STATUS && ( + + {entry.status} + + )} ) })} @@ -1499,7 +1642,9 @@ export function GitChangesTab() { @@ -1559,6 +1707,45 @@ export function GitChangesTab() { + + { + if (open) return + setDeleteTarget(null) + }} + > + + + {t("deleteConfirm.title")} + + {deleteTarget + ? t("deleteConfirm.descriptionWithTarget", { + kind: + deleteTarget.kind === "dir" + ? t("deleteConfirm.kindDirectory") + : t("deleteConfirm.kindFile"), + name: deleteTarget.name, + }) + : t("deleteConfirm.descriptionFallback")} + + + + + {tCommon("cancel")} + + { + void handleDeleteConfirm() + }} + > + {t("actions.delete")} + + + + ) } diff --git a/src/i18n/messages/ar.json b/src/i18n/messages/ar.json index cf5e02b..0fe3e58 100644 --- a/src/i18n/messages/ar.json +++ b/src/i18n/messages/ar.json @@ -1001,7 +1001,8 @@ "actions": { "commitCode": "التزام الكود", "rollback": "تراجع", - "addToVcs": "إضافة إلى VCS" + "addToVcs": "إضافة إلى VCS", + "delete": "حذف" }, "toasts": { "noAddableFilesInDir": "لا توجد ملفات متغيرة في هذا الدليل يمكن إضافتها إلى VCS", @@ -1012,11 +1013,16 @@ "rolledBack": "تم التراجع عن {name}", "rollbackFailed": "فشل التراجع", "addedFilesToVcs": "تمت إضافة {count, plural, one {# ملف} other {# ملفات}} إلى VCS", - "rolledBackFiles": "تم التراجع عن {count, plural, one {# ملف} other {# ملفات}}" + "rolledBackFiles": "تم التراجع عن {count, plural, one {# ملف} other {# ملفات}}", + "deleted": "تم حذف {name}", + "deleteFailed": "فشل الحذف", + "deletedFiles": "تم حذف {count} ملفات", + "noDeletableFilesInDir": "لا توجد ملفات معدّلة في هذا الدليل يمكن حذفها" }, "directoryDialog": { "descriptionAdd": "اختر ملفات داخل الدليل {path} لإضافتها إلى VCS.", "descriptionRollback": "اختر ملفات داخل الدليل {path} للتراجع عنها.", + "descriptionDelete": "اختر ملفات داخل الدليل {path} لحذفها. لا يمكن التراجع عن هذا الإجراء.", "descriptionFallback": "اختر ملفات للمتابعة.", "selectionCount": "تم تحديد {selected} / {total} ملف", "selectAll": "تحديد الكل", @@ -1030,6 +1036,13 @@ "descriptionFallback": "التراجع عن التغييرات المحلية؟", "kindDirectory": "الدليل", "kindFile": "الملف" + }, + "deleteConfirm": { + "title": "تأكيد الحذف", + "descriptionWithTarget": "حذف {kind} \"{name}\"؟ لا يمكن التراجع عن هذا الإجراء.", + "descriptionFallback": "لا يمكن التراجع عن هذا الإجراء.", + "kindDirectory": "الدليل", + "kindFile": "الملف" } }, "tabContext": { diff --git a/src/i18n/messages/de.json b/src/i18n/messages/de.json index b0ce5c2..2227e89 100644 --- a/src/i18n/messages/de.json +++ b/src/i18n/messages/de.json @@ -1001,7 +1001,8 @@ "actions": { "commitCode": "Code committen", "rollback": "Zurücksetzen", - "addToVcs": "Zu VCS hinzufügen" + "addToVcs": "Zu VCS hinzufügen", + "delete": "Löschen" }, "toasts": { "noAddableFilesInDir": "Keine geänderten Dateien in diesem Verzeichnis können zu VCS hinzugefügt werden", @@ -1012,11 +1013,16 @@ "rolledBack": "{name} zurückgesetzt", "rollbackFailed": "Rollback fehlgeschlagen", "addedFilesToVcs": "{count, plural, one {# Datei} other {# Dateien}} zu VCS hinzugefügt", - "rolledBackFiles": "{count, plural, one {# Datei zurückgesetzt} other {# Dateien zurückgesetzt}}" + "rolledBackFiles": "{count, plural, one {# Datei zurückgesetzt} other {# Dateien zurückgesetzt}}", + "deleted": "{name} gelöscht", + "deleteFailed": "Löschen fehlgeschlagen", + "deletedFiles": "{count} Dateien gelöscht", + "noDeletableFilesInDir": "In diesem Verzeichnis gibt es keine löschbaren geänderten Dateien" }, "directoryDialog": { "descriptionAdd": "Dateien unter Verzeichnis {path} auswählen, um sie zu VCS hinzuzufügen.", "descriptionRollback": "Dateien unter Verzeichnis {path} auswählen, um sie zurückzusetzen.", + "descriptionDelete": "Dateien unter Verzeichnis {path} auswählen, um sie zu löschen. Diese Aktion kann nicht rückgängig gemacht werden.", "descriptionFallback": "Dateien auswählen, um fortzufahren.", "selectionCount": "{selected} / {total} Dateien ausgewählt", "selectAll": "Alle auswählen", @@ -1030,6 +1036,13 @@ "descriptionFallback": "Lokale Änderungen zurücksetzen?", "kindDirectory": "Verzeichnis", "kindFile": "Datei" + }, + "deleteConfirm": { + "title": "Löschen bestätigen", + "descriptionWithTarget": "{kind} \"{name}\" löschen? Diese Aktion kann nicht rückgängig gemacht werden.", + "descriptionFallback": "Diese Aktion kann nicht rückgängig gemacht werden.", + "kindDirectory": "Verzeichnis", + "kindFile": "Datei" } }, "tabContext": { diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json index f862749..35120d1 100644 --- a/src/i18n/messages/en.json +++ b/src/i18n/messages/en.json @@ -1001,7 +1001,8 @@ "actions": { "commitCode": "Commit code", "rollback": "Rollback", - "addToVcs": "Add to VCS" + "addToVcs": "Add to VCS", + "delete": "Delete" }, "toasts": { "noAddableFilesInDir": "No changed files in this directory can be added to VCS", @@ -1012,11 +1013,16 @@ "rolledBack": "Rolled back {name}", "rollbackFailed": "Rollback failed", "addedFilesToVcs": "Added {count, plural, one {# file} other {# files}} to VCS", - "rolledBackFiles": "Rolled back {count, plural, one {# file} other {# files}}" + "rolledBackFiles": "Rolled back {count, plural, one {# file} other {# files}}", + "deleted": "Deleted {name}", + "deleteFailed": "Delete failed", + "deletedFiles": "Deleted {count, plural, one {# file} other {# files}}", + "noDeletableFilesInDir": "No changed files in this directory can be deleted" }, "directoryDialog": { "descriptionAdd": "Select files under directory {path} to add to VCS.", "descriptionRollback": "Select files under directory {path} to roll back.", + "descriptionDelete": "Select files under directory {path} to delete. This action cannot be undone.", "descriptionFallback": "Select files to proceed.", "selectionCount": "Selected {selected} / {total} files", "selectAll": "Select all", @@ -1030,6 +1036,13 @@ "descriptionFallback": "Roll back local changes?", "kindDirectory": "directory", "kindFile": "file" + }, + "deleteConfirm": { + "title": "Confirm deletion", + "descriptionWithTarget": "Delete {kind} \"{name}\"? This action cannot be undone.", + "descriptionFallback": "This action cannot be undone.", + "kindDirectory": "directory", + "kindFile": "file" } }, "tabContext": { diff --git a/src/i18n/messages/es.json b/src/i18n/messages/es.json index 46ae9cc..f4a2e38 100644 --- a/src/i18n/messages/es.json +++ b/src/i18n/messages/es.json @@ -1001,7 +1001,8 @@ "actions": { "commitCode": "Hacer commit del código", "rollback": "Revertir", - "addToVcs": "Añadir a VCS" + "addToVcs": "Añadir a VCS", + "delete": "Eliminar" }, "toasts": { "noAddableFilesInDir": "No hay archivos cambiados en este directorio para añadir a VCS", @@ -1012,11 +1013,16 @@ "rolledBack": "Se revirtió {name}", "rollbackFailed": "Error al revertir", "addedFilesToVcs": "Se añadieron {count, plural, one {# archivo} other {# archivos}} a VCS", - "rolledBackFiles": "Se revirtieron {count, plural, one {# archivo} other {# archivos}}" + "rolledBackFiles": "Se revirtieron {count, plural, one {# archivo} other {# archivos}}", + "deleted": "Se eliminó {name}", + "deleteFailed": "Error al eliminar", + "deletedFiles": "Se eliminaron {count} archivos", + "noDeletableFilesInDir": "No hay archivos modificados en este directorio que se puedan eliminar" }, "directoryDialog": { "descriptionAdd": "Selecciona archivos bajo el directorio {path} para añadir a VCS.", "descriptionRollback": "Selecciona archivos bajo el directorio {path} para revertir.", + "descriptionDelete": "Selecciona archivos bajo el directorio {path} para eliminar. Esta acción no se puede deshacer.", "descriptionFallback": "Selecciona archivos para continuar.", "selectionCount": "Seleccionados {selected} / {total} archivos", "selectAll": "Seleccionar todo", @@ -1030,6 +1036,13 @@ "descriptionFallback": "¿Revertir cambios locales?", "kindDirectory": "directorio", "kindFile": "archivo" + }, + "deleteConfirm": { + "title": "Confirmar eliminación", + "descriptionWithTarget": "¿Eliminar {kind} \"{name}\"? Esta acción no se puede deshacer.", + "descriptionFallback": "Esta acción no se puede deshacer.", + "kindDirectory": "directorio", + "kindFile": "archivo" } }, "tabContext": { diff --git a/src/i18n/messages/fr.json b/src/i18n/messages/fr.json index 29588c1..dd4737c 100644 --- a/src/i18n/messages/fr.json +++ b/src/i18n/messages/fr.json @@ -1001,7 +1001,8 @@ "actions": { "commitCode": "Commit du code", "rollback": "Annuler", - "addToVcs": "Ajouter à VCS" + "addToVcs": "Ajouter à VCS", + "delete": "Supprimer" }, "toasts": { "noAddableFilesInDir": "Aucun fichier modifié de ce répertoire ne peut être ajouté à VCS", @@ -1012,11 +1013,16 @@ "rolledBack": "{name} restauré", "rollbackFailed": "Échec du rollback", "addedFilesToVcs": "{count, plural, one {# fichier} other {# fichiers}} ajouté(s) à VCS", - "rolledBackFiles": "{count, plural, one {# fichier restauré} other {# fichiers restaurés}}" + "rolledBackFiles": "{count, plural, one {# fichier restauré} other {# fichiers restaurés}}", + "deleted": "{name} supprimé", + "deleteFailed": "Échec de la suppression", + "deletedFiles": "{count} fichiers supprimés", + "noDeletableFilesInDir": "Aucun fichier modifié dans ce répertoire ne peut être supprimé" }, "directoryDialog": { "descriptionAdd": "Sélectionnez les fichiers du répertoire {path} à ajouter à VCS.", "descriptionRollback": "Sélectionnez les fichiers du répertoire {path} à rollback.", + "descriptionDelete": "Sélectionnez les fichiers du répertoire {path} à supprimer. Cette action est irréversible.", "descriptionFallback": "Sélectionnez les fichiers pour continuer.", "selectionCount": "{selected} / {total} fichiers sélectionnés", "selectAll": "Tout sélectionner", @@ -1030,6 +1036,13 @@ "descriptionFallback": "Rollback des changements locaux ?", "kindDirectory": "répertoire", "kindFile": "fichier" + }, + "deleteConfirm": { + "title": "Confirmer la suppression", + "descriptionWithTarget": "Supprimer {kind} \"{name}\" ? Cette action est irréversible.", + "descriptionFallback": "Cette action est irréversible.", + "kindDirectory": "répertoire", + "kindFile": "fichier" } }, "tabContext": { diff --git a/src/i18n/messages/ja.json b/src/i18n/messages/ja.json index 9678d07..d4b9dc7 100644 --- a/src/i18n/messages/ja.json +++ b/src/i18n/messages/ja.json @@ -1001,7 +1001,8 @@ "actions": { "commitCode": "コードをコミット", "rollback": "ロールバック", - "addToVcs": "VCS に追加" + "addToVcs": "VCS に追加", + "delete": "削除" }, "toasts": { "noAddableFilesInDir": "このディレクトリには VCS に追加できる変更ファイルがありません", @@ -1012,11 +1013,16 @@ "rolledBack": "{name} をロールバックしました", "rollbackFailed": "ロールバックに失敗しました", "addedFilesToVcs": "{count, plural, one {# 個のファイルを VCS に追加} other {# 個のファイルを VCS に追加}}", - "rolledBackFiles": "{count, plural, one {# 個のファイルをロールバック} other {# 個のファイルをロールバック}}" + "rolledBackFiles": "{count, plural, one {# 個のファイルをロールバック} other {# 個のファイルをロールバック}}", + "deleted": "{name} を削除しました", + "deleteFailed": "削除に失敗しました", + "deletedFiles": "{count} 個のファイルを削除しました", + "noDeletableFilesInDir": "このディレクトリには削除可能な変更ファイルがありません" }, "directoryDialog": { "descriptionAdd": "ディレクトリ {path} 配下で VCS に追加するファイルを選択してください。", "descriptionRollback": "ディレクトリ {path} 配下でロールバックするファイルを選択してください。", + "descriptionDelete": "ディレクトリ {path} 配下で削除するファイルを選択してください。この操作は元に戻せません。", "descriptionFallback": "続行するファイルを選択してください。", "selectionCount": "{selected} / {total} を選択", "selectAll": "すべて選択", @@ -1030,6 +1036,13 @@ "descriptionFallback": "ローカル変更をロールバックしますか?", "kindDirectory": "ディレクトリ", "kindFile": "ファイル" + }, + "deleteConfirm": { + "title": "削除の確認", + "descriptionWithTarget": "{kind}「{name}」を削除しますか?この操作は元に戻せません。", + "descriptionFallback": "この操作は元に戻せません。", + "kindDirectory": "ディレクトリ", + "kindFile": "ファイル" } }, "tabContext": { diff --git a/src/i18n/messages/ko.json b/src/i18n/messages/ko.json index e56259a..4f515ef 100644 --- a/src/i18n/messages/ko.json +++ b/src/i18n/messages/ko.json @@ -1001,7 +1001,8 @@ "actions": { "commitCode": "코드 커밋", "rollback": "롤백", - "addToVcs": "VCS에 추가" + "addToVcs": "VCS에 추가", + "delete": "삭제" }, "toasts": { "noAddableFilesInDir": "이 디렉터리에는 VCS에 추가할 수 있는 변경 파일이 없습니다", @@ -1012,11 +1013,16 @@ "rolledBack": "{name}을(를) 롤백했습니다", "rollbackFailed": "롤백에 실패했습니다", "addedFilesToVcs": "{count, plural, one {#개 파일을 VCS에 추가} other {#개 파일을 VCS에 추가}}", - "rolledBackFiles": "{count, plural, one {#개 파일 롤백} other {#개 파일 롤백}}" + "rolledBackFiles": "{count, plural, one {#개 파일 롤백} other {#개 파일 롤백}}", + "deleted": "{name}이(가) 삭제되었습니다", + "deleteFailed": "삭제에 실패했습니다", + "deletedFiles": "{count}개 파일을 삭제했습니다", + "noDeletableFilesInDir": "이 디렉터리에서 삭제할 수 있는 변경된 파일이 없습니다" }, "directoryDialog": { "descriptionAdd": "디렉터리 {path} 아래에서 VCS에 추가할 파일을 선택하세요.", "descriptionRollback": "디렉터리 {path} 아래에서 롤백할 파일을 선택하세요.", + "descriptionDelete": "디렉터리 {path} 아래에서 삭제할 파일을 선택하세요. 이 작업은 되돌릴 수 없습니다.", "descriptionFallback": "계속 진행할 파일을 선택하세요.", "selectionCount": "{selected} / {total} 선택됨", "selectAll": "모두 선택", @@ -1030,6 +1036,13 @@ "descriptionFallback": "로컬 변경 사항을 롤백할까요?", "kindDirectory": "디렉터리", "kindFile": "파일" + }, + "deleteConfirm": { + "title": "삭제 확인", + "descriptionWithTarget": "{kind} \"{name}\"을(를) 삭제할까요? 이 작업은 되돌릴 수 없습니다.", + "descriptionFallback": "이 작업은 되돌릴 수 없습니다.", + "kindDirectory": "디렉터리", + "kindFile": "파일" } }, "tabContext": { diff --git a/src/i18n/messages/pt.json b/src/i18n/messages/pt.json index ae6a578..880673c 100644 --- a/src/i18n/messages/pt.json +++ b/src/i18n/messages/pt.json @@ -1001,7 +1001,8 @@ "actions": { "commitCode": "Commit do código", "rollback": "Reverter", - "addToVcs": "Adicionar ao VCS" + "addToVcs": "Adicionar ao VCS", + "delete": "Excluir" }, "toasts": { "noAddableFilesInDir": "Nenhum arquivo alterado neste diretório pode ser adicionado ao VCS", @@ -1012,11 +1013,16 @@ "rolledBack": "{name} revertido", "rollbackFailed": "Falha no rollback", "addedFilesToVcs": "{count, plural, one {# arquivo} other {# arquivos}} adicionados ao VCS", - "rolledBackFiles": "{count, plural, one {# arquivo revertido} other {# arquivos revertidos}}" + "rolledBackFiles": "{count, plural, one {# arquivo revertido} other {# arquivos revertidos}}", + "deleted": "{name} excluído", + "deleteFailed": "Falha ao excluir", + "deletedFiles": "{count} arquivos excluídos", + "noDeletableFilesInDir": "Nenhum arquivo alterado neste diretório pode ser excluído" }, "directoryDialog": { "descriptionAdd": "Selecione arquivos sob o diretório {path} para adicionar ao VCS.", "descriptionRollback": "Selecione arquivos sob o diretório {path} para reverter.", + "descriptionDelete": "Selecione arquivos no diretório {path} para excluir. Esta ação não pode ser desfeita.", "descriptionFallback": "Selecione arquivos para prosseguir.", "selectionCount": "Selecionados {selected} / {total} arquivos", "selectAll": "Selecionar todos", @@ -1030,6 +1036,13 @@ "descriptionFallback": "Reverter alterações locais?", "kindDirectory": "diretório", "kindFile": "arquivo" + }, + "deleteConfirm": { + "title": "Confirmar exclusão", + "descriptionWithTarget": "Excluir {kind} \"{name}\"? Esta ação não pode ser desfeita.", + "descriptionFallback": "Esta ação não pode ser desfeita.", + "kindDirectory": "diretório", + "kindFile": "arquivo" } }, "tabContext": { diff --git a/src/i18n/messages/zh-CN.json b/src/i18n/messages/zh-CN.json index 2d5c288..e7d1fd2 100644 --- a/src/i18n/messages/zh-CN.json +++ b/src/i18n/messages/zh-CN.json @@ -1001,7 +1001,8 @@ "actions": { "commitCode": "提交代码", "rollback": "回滚", - "addToVcs": "添加到 VCS" + "addToVcs": "添加到 VCS", + "delete": "删除" }, "toasts": { "noAddableFilesInDir": "该目录下没有可添加到 VCS 的变更文件", @@ -1012,11 +1013,16 @@ "rolledBack": "已回滚 {name}", "rollbackFailed": "回滚失败", "addedFilesToVcs": "已添加 {count} 个文件到 VCS", - "rolledBackFiles": "已回滚 {count} 个文件" + "rolledBackFiles": "已回滚 {count} 个文件", + "deleted": "已删除 {name}", + "deleteFailed": "删除失败", + "deletedFiles": "已删除 {count} 个文件", + "noDeletableFilesInDir": "该目录下没有可删除的变更文件" }, "directoryDialog": { "descriptionAdd": "选择目录 {path} 下要添加到 VCS 的文件。", "descriptionRollback": "选择目录 {path} 下要回滚的文件。", + "descriptionDelete": "选择目录 {path} 下要删除的文件。此操作不可撤销。", "descriptionFallback": "选择要操作的文件。", "selectionCount": "已选择 {selected} / {total} 个文件", "selectAll": "全选", @@ -1030,6 +1036,13 @@ "descriptionFallback": "确定回滚本地修改吗?", "kindDirectory": "目录", "kindFile": "文件" + }, + "deleteConfirm": { + "title": "确认删除", + "descriptionWithTarget": "确定删除{kind}「{name}」吗?此操作不可撤销。", + "descriptionFallback": "确定删除吗?此操作不可撤销。", + "kindDirectory": "目录", + "kindFile": "文件" } }, "tabContext": { diff --git a/src/i18n/messages/zh-TW.json b/src/i18n/messages/zh-TW.json index 3025fd0..e8bbe37 100644 --- a/src/i18n/messages/zh-TW.json +++ b/src/i18n/messages/zh-TW.json @@ -1001,7 +1001,8 @@ "actions": { "commitCode": "提交程式碼", "rollback": "回滾", - "addToVcs": "加入到 VCS" + "addToVcs": "加入到 VCS", + "delete": "刪除" }, "toasts": { "noAddableFilesInDir": "該目錄下沒有可加入到 VCS 的變更檔案", @@ -1012,11 +1013,16 @@ "rolledBack": "已回滾 {name}", "rollbackFailed": "回滾失敗", "addedFilesToVcs": "已加入 {count} 個檔案到 VCS", - "rolledBackFiles": "已回滾 {count} 個檔案" + "rolledBackFiles": "已回滾 {count} 個檔案", + "deleted": "已刪除 {name}", + "deleteFailed": "刪除失敗", + "deletedFiles": "已刪除 {count} 個檔案", + "noDeletableFilesInDir": "此目錄下沒有可刪除的變更檔案" }, "directoryDialog": { "descriptionAdd": "選擇目錄 {path} 下要加入到 VCS 的檔案。", "descriptionRollback": "選擇目錄 {path} 下要回滾的檔案。", + "descriptionDelete": "選擇目錄 {path} 下要刪除的檔案。此操作不可撤銷。", "descriptionFallback": "選擇要操作的檔案。", "selectionCount": "已選擇 {selected} / {total} 個檔案", "selectAll": "全選", @@ -1030,6 +1036,13 @@ "descriptionFallback": "確定回滾本地修改嗎?", "kindDirectory": "目錄", "kindFile": "檔案" + }, + "deleteConfirm": { + "title": "確認刪除", + "descriptionWithTarget": "確定刪除{kind}「{name}」嗎?此操作無法撤銷。", + "descriptionFallback": "此操作無法撤銷。", + "kindDirectory": "目錄", + "kindFile": "檔案" } }, "tabContext": {