Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CodeApp/Localization/de.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@
"common.dont_save" = "Nicht speichern";
"common.cancel" = "Abbrechen";
"common.revert" = "Rückgängig machen";
"common.delete" = "Löschen";

"notification.source" = "Quelle: %@";

Expand Down Expand Up @@ -420,6 +421,7 @@
"file.copy" = "Kopieren nach..";
"file.download" = "Herunterladen auf..";
"file.confirm_save %@" = "Möchten Sie die Änderungen an %@ speichern?";
"file.confirm_delete %@" = "Möchten Sie %@ wirklich löschen?";

"actions.new_window" = "Neues Fenster";

Expand Down Expand Up @@ -463,4 +465,4 @@
"remote.setup_remote_server" = "Dokumentation zur Fernzugriffsfunktion";
"remote.private_key_content" = "Inhalt des privaten Schlüssels";
"remote.setup_note" = "Um Schlüsselpaare zu generieren, führen Sie ssh-keygen im Terminal aus. Lassen Sie die Passphrase leer, falls keine vorhanden ist.";
"remote.import_from_file" = "Importieren aus Datei";
"remote.import_from_file" = "Importieren aus Datei";
4 changes: 3 additions & 1 deletion CodeApp/Localization/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ are licensed under [BSD-3-Clause License](https://en.wikipedia.org/wiki/BSD_lice
"common.dont_save" = "Don't Save";
"common.cancel" = "Cancel";
"common.revert" = "Revert";
"common.delete" = "Delete";

"notification.source" = "Source: %@";

Expand Down Expand Up @@ -311,6 +312,7 @@ are licensed under [BSD-3-Clause License](https://en.wikipedia.org/wiki/BSD_lice
"file.copy" = "Copy to..";
"file.download" = "Download to..";
"file.confirm_save %@" = "Do you want to save the changes made to %@?";
"file.confirm_delete %@" = "Are you sure you want to delete %@?";

"actions.new_window" = "New Window";

Expand Down Expand Up @@ -355,4 +357,4 @@ are licensed under [BSD-3-Clause License](https://en.wikipedia.org/wiki/BSD_lice
"remote.setup_remote_server" = "Documentation on remote access feature";
"remote.private_key_content" = "Private key content";
"remote.setup_note" = "To generate key-pairs, run ssh-keygen in the terminal. Leave the passphrase empty if there isn't one.";
"remote.import_from_file" = "Import from file";
"remote.import_from_file" = "Import from file";
4 changes: 3 additions & 1 deletion CodeApp/Localization/ja.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@
"common.dont_save" = "保存しない";
"common.cancel" = "キャンセル";
"common.revert" = "元に戻す";
"common.delete" = "削除";

"notification.source" = "Source: %@";

Expand Down Expand Up @@ -421,6 +422,7 @@
"file.copy" = "コピー..";
"file.download" = "ダウンロード..";
"file.confirm_save %@" = "%@ に加えた変更を保存しますか?";
"file.confirm_delete %@" = "%@ を削除しますか?";

"actions.new_window" = "新しいウィンドウ";

Expand Down Expand Up @@ -464,4 +466,4 @@
"remote.setup_remote_server" = "リモート アクセス機能に関するドキュメント";
"remote.private_key_content" = "秘密鍵の内容";
"remote.setup_note" = "キーペアを生成するには、ターミナルで ssh-keygen を実行します。 パスフレーズがない場合は空のままにします。";
"remote.import_from_file" = "ファイルからインポート";
"remote.import_from_file" = "ファイルからインポート";
8 changes: 5 additions & 3 deletions CodeApp/Localization/ko.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,15 @@
"Enable spell check in text files" = "텍스트 파일에서 맞춤법 검사 활성화";
"Spell checking on content changed" = "변경한 내용에 대해 맞춤법 검사";

"common.configure" = "";
"common.configure" = "설정";
"common.open_folder" = "폴더 열기";
"common.compare" = "비교";
"common.overwrite" = "덮어쓰기";
"common.save" = "저장";
"common.dont_save" = "저장하지 않음";
"common.cancel" = "취소";
"common.revert" = "되돌리기";
"common.delete" = "삭제";

"notification.source" = "원천: %@";

Expand Down Expand Up @@ -419,7 +420,8 @@

"file.copy" = "에게 복사..";
"file.download" = "다운로드..";
"file.confirm_save %@" = "파일을 저장하시겠습니까?";
"file.confirm_save %@" = "%@을 저장하시겠습니까?";
"file.confirm_delete %@" = "%@을 삭제하시겠습니까?";

"actions.new_window" = "새창";

Expand Down Expand Up @@ -463,4 +465,4 @@
"remote.setup_remote_server" = "원격 액세스 기능에 대한 설명서";
"remote.private_key_content" = "개인 키 내용";
"remote.setup_note" = "키 쌍을 생성하려면 터미널에서 ssh-keygen을 실행하십시오. 암호가 없는 경우 암호를 비워 둡니다.";
"remote.import_from_file" = "파일에서 가져 오기";
"remote.import_from_file" = "파일에서 가져 오기";
4 changes: 3 additions & 1 deletion CodeApp/Localization/zh-Hans.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,7 @@
"common.dont_save" = "不保存";
"common.cancel" = "取消";
"common.revert" = "还原";
"common.delete" = "删除";

"notification.source" = "来源: %@";

Expand Down Expand Up @@ -411,6 +412,7 @@
"file.copy" = "复制到..";
"file.download" = "下载到..";
"file.confirm_save %@" = "是否要保存 %@?";
"file.confirm_delete %@" = "你确定要删除 %@ 吗?";

"actions.new_window" = "新窗口";

Expand Down Expand Up @@ -454,4 +456,4 @@
"remote.setup_remote_server" = "有关远程访问功能的文档";
"remote.private_key_content" = "私钥内容";
"remote.setup_note" = "要生成密钥,请在终端中运行 ssh-keygen。如果没有密钥密码,请留空。";
"remote.import_from_file" = "从文件导入";
"remote.import_from_file" = "从文件导入";
29 changes: 19 additions & 10 deletions CodeApp/Managers/MainApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -308,17 +308,26 @@ class MainApp: ObservableObject {
}

func trashItem(url: URL) {
workSpaceStorage.removeItem(at: url) { error in
if let error = error {
self.notificationManager.showErrorMessage(error.localizedDescription)
return
}
if let editorToTrash = self.textEditors.first(where: { $0.url == url }) {
Task { @MainActor in
self.closeEditor(editor: editorToTrash)
alertManager.showAlert(
title: "file.confirm_delete \(url.lastPathComponent)",
content: AnyView(
Group {
Button("common.delete", role: .destructive) {
self.workSpaceStorage.removeItem(at: url) { error in
if let error = error {
self.notificationManager.showErrorMessage(error.localizedDescription)
return
}
if let editorToTrash = self.textEditors.first(where: { $0.url == url }) {
Task { @MainActor in
self.closeEditor(editor: editorToTrash)
}
}
}
}
Button("common.cancel", role: .cancel) {}
}
}
}
))
}

func decodeStringData(data: Data) throws -> (String, String.Encoding) {
Expand Down