Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Say on several apps' page what an app's own page says about a chosen app

Țugui Dragoș96571d1e0de5
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstrings
index 3dc54231..92e9fe07 100644
--- a/Localization/Peel/Localizable.xcstrings
+++ b/Localization/Peel/Localizable.xcstrings
@@ -93433,6 +93433,112 @@
}
}
},
+ "No developer signs this app anymore." : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Tuto aplikaci už nepodepisuje žádný vývojář."
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Kein Entwickler signiert diese App mehr."
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Ningún desarrollador firma ya esta app."
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Plus aucun développeur ne signe cette app."
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nessuna azienda di sviluppo firma più questa app."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "このアプリにはもう開発元の署名がありません。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "이 앱에 더 이상 개발자 서명이 없습니다."
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Geen ontwikkelaar ondertekent deze app meer."
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Żaden deweloper już nie podpisuje tej aplikacji."
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nenhum desenvolvedor assina mais este app."
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Niciun dezvoltator nu mai semnează această aplicație."
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Это приложение больше не подписано разработчиком."
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Ingen utvecklare signerar den här appen längre."
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bu uygulamayı artık hiçbir geliştirici imzalamıyor."
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Цю програму більше не підписує жоден розробник."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "此App已不再有开发者签名。"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "已沒有開發者簽署此App。"
+ }
+ }
+ }
+ },
"No downloads were removed." : {
"localizations" : {
"cs" : {
diff --git a/Peel/Views/MultipleAppsView.swift b/Peel/Views/MultipleAppsView.swift
index 611195e1..4463453b 100644
--- a/Peel/Views/MultipleAppsView.swift
+++ b/Peel/Views/MultipleAppsView.swift
@@ -293,10 +293,25 @@ struct MultipleAppsView: View {
? String(localized: "macOS keeps this app, so it stays where it is.")
: String(localized: "Not selected: it belongs to an app macOS keeps, so it is in use."))
}
+ if item.isApplication, let app = plan.apps.first(where: { $0.url == item.url }) {
+ if case .browser(let identifier) = app.webApp {
+ let browser = library.name(forReference: identifier)
+ lines.append(String(localized: "Moving it to the Trash takes away only this shortcut, and the app stays in \(browser), which can make the shortcut again. To remove the app itself, uninstall it in \(browser), which takes the shortcut away too."))
+ }
+ if let change = app.bundleIdentifier.flatMap({ library.teamChanges[$0] }) {
+ if change.current.isEmpty {
+ lines.append(String(localized: "No developer signs this app anymore."))
+ lines.append(String(localized: "It was first seen signed by \(change.previous). A copy someone has changed looks like this, and so does one built from source."))
+ } else {
+ lines.append(String(localized: "It was first seen signed by \(change.previous), and is signed by \(change.current) now."))
+ }
+ }
+ }
return lines.isEmpty ? nil : lines.joined(separator: "\n\n")
}
- /// Under the question: which of the chosen apps go and which stay, and the privacy reset, which History can't undo.
+ /// Under the question: which of the chosen apps go and which stay, the privacy reset, which History can't undo, and
+ /// Homebrew's record of an app that goes while its record stays.
private func note(about urls: Set<URL>) -> Text {
let going = plan.apps.filter { urls.contains($0.url) }
let staying = plan.apps.filter { !urls.contains($0.url) && !plan.appsInTheTrash.contains($0.url) }
@@ -311,6 +326,15 @@ struct MultipleAppsView: View {
lines.append(Text("The selected apps’ privacy permissions are cleared first, and History can’t bring them back."))
}
lines += UninstallsItself.when(moving: urls, among: plan.apps).map(\.warning)
+ for app in going {
+ let movesItsReceipt = plan.items.contains {
+ $0.kind == .homebrewReceipt && $0.apps.contains(app.reference) && urls.contains($0.url)
+ }
+ if !movesItsReceipt, let cask = library.cask(for: app) {
+ let record = Text("Homebrew installed this app and will keep listing it as installed. To take it off that list, run `brew uninstall --cask \(cask.name)`: Homebrew then carries out the cask’s own uninstall steps, which can delete files for good.")
+ lines.append(Text("\(list([app])): \(record)"))
+ }
+ }
return lines.dropFirst().reduce(lines.first ?? Text(verbatim: "")) { Text("\($0)\n\n\($1)") }
}