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.

Tell VoiceOver when part of the Extensions list is missing

Țugui Dragoș46c127e2f83a
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstrings
index b45f2305..02548687 100644
--- a/Localization/Peel/Localizable.xcstrings
+++ b/Localization/Peel/Localizable.xcstrings
@@ -114903,6 +114903,112 @@
}
}
},
+ "Part of this list is missing." : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Část tohoto seznamu chybí."
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Ein Teil dieser Liste fehlt."
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Falta parte de esta lista."
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Il manque une partie de cette liste."
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Manca una parte di questo elenco."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "このリストの一部が欠けています。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "이 목록의 일부가 누락되었습니다."
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Een deel van deze lijst ontbreekt."
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Brakuje części tej listy."
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Parte desta lista está faltando."
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "O parte din această listă lipsește."
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Часть этого списка отсутствует."
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "En del av listan saknas."
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Bu listenin bir kısmı eksik."
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Бракує частини цього списку."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "此列表缺少部分内容。"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "此列表缺少一部分。"
+ }
+ }
+ }
+ },
"Part of this list may be missing" : {
"localizations" : {
"cs" : {
diff --git a/Peel/Views/Extensions/ExtensionList.swift b/Peel/Views/Extensions/ExtensionList.swift
index a7a829eb..6176a1c5 100644
--- a/Peel/Views/Extensions/ExtensionList.swift
+++ b/Peel/Views/Extensions/ExtensionList.swift
@@ -53,7 +53,7 @@ struct ExtensionList: View {
.navigationTitle(Text(Tool.extensions.title))
.announcesScan(
extensions.isScanning,
- found: extensions.summary,
+ found: announcement,
couldNotLook: extensions.unanswered.isEmpty ? nil : "macOS Didn’t Answer",
wasStopped: extensions.scanRun.wasStopped
)
@@ -81,6 +81,13 @@ struct ExtensionList: View {
}
/// Why an empty list says nothing: the one kind macOS gave no answer about, or both.
+ /// What VoiceOver hears when a scan ends: what it found, and that part of the list is missing when it is.
+ private var announcement: AttributedString? {
+ guard let found = extensions.summary else { return nil }
+ guard !extensions.unanswered.isEmpty else { return found }
+ return found + " " + AttributedString(localized: "Part of this list is missing.")
+ }
+
private var unansweredDescription: Text {
if extensions.unanswered.count == 1, let missing = extensions.unanswered.first {
return Text(missing.unansweredNote)