Skip to content

Commit 2c053af

Browse files
committed
Updates from review
1 parent 7dc3f2e commit 2c053af

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

Loop/Managers/Alerts/AlertManager.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,8 +799,10 @@ extension AlertManager {
799799
}
800800

801801
func presentCouldNotResetLoopAlert(error: Error) {
802-
let alert = UIAlertController(title: "Could Not Restart Loop", message: "While trying to restart Loop an error occured.\n\n\(error.localizedDescription)", preferredStyle: .alert)
803-
alert.addAction(UIAlertAction(title: "Cancel", style: .cancel))
802+
let titleString = String(format: NSLocalizedString("Could Not Restart %1$@", comment: "Format string for title of reset loop alert. (1: App name)"), Bundle.main.bundleDisplayName)
803+
let message = String(format: NSLocalizedString("While trying to restart %1$@ an error occured.\n\n%2$@", comment: "Format string for message of reset loop alert. (1: App name) (2: error description)"), Bundle.main.bundleDisplayName, error.localizedDescription)
804+
let alert = UIAlertController(title: titleString, message: message, preferredStyle: .alert)
805+
alert.addAction(UIAlertAction(title: NSLocalizedString("Cancel", comment: "Cancel button for reset loop alert"), style: .cancel))
804806

805807
alertPresenter.present(alert, animated: true)
806808
}

Loop/Managers/DeviceDataManager.swift

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,6 @@ final class DeviceDataManager {
202202
sleepDataAuthorizationRequired
203203
}
204204

205-
/// True if the user has explicitly denied access to any stores' HealthKit types
206-
// private var sharingDenied: Bool {
207-
// return healthStore.authorizationStatus(for: HealthKitSampleStore.glucoseType) == .sharingDenied ||
208-
// carbStore.sharingDenied ||
209-
// doseStore.sharingDenied ||
210-
// sleepDataSharingDenied
211-
// }
212-
213205
// MARK: Services
214206

215207
private(set) var servicesManager: ServicesManager!

Loop/Views/HowMuteAlertWorkView.swift

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import LoopKitUI
1212
struct HowMuteAlertWorkView: View {
1313
@Environment(\.dismissAction) private var dismiss
1414
@Environment(\.guidanceColors) private var guidanceColors
15+
@Environment(\.appName) private var appName
1516

1617
var body: some View {
1718
NavigationView {
@@ -32,7 +33,7 @@ When using Mute Alerts, also consider the impact of using iOS Focus Modes.
3233
.background(guidanceColors.warning)
3334
.clipShape(RoundedRectangle(cornerRadius: 5, style: .continuous))
3435

35-
Text(NSLocalizedString("Loop Mute Alerts", comment: "Section title for description that mute alerts is temporary"))
36+
Text(String(format: NSLocalizedString("%1$@ Mute Alerts", comment: "Format string for Section title for description that mute alerts is temporary (1: app name)"), appName))
3637
.bold()
3738
.fixedSize(horizontal: false, vertical: true)
3839
}
@@ -52,7 +53,7 @@ After the mute period ends, your alert sounds will resume.
5253
Text(NSLocalizedString("iOS Focus Mode", comment: "Section title for description of how mute alerts work with focus mode"))
5354
.bold()
5455
}
55-
Text(NSLocalizedString("If iOS Focus Mode is ON and Mute Alerts is OFF, Critical Alerts will still be delivered, but non-Critical Alerts will be silenced until Loop is added to each Focus mode as an Allowed App.", comment: "Description of how mute alerts works with focus mode"))
56+
Text(String(format: NSLocalizedString("If iOS Focus Mode is ON and Mute Alerts is OFF, Critical Alerts will still be delivered, but non-Critical Alerts will be silenced until %1$@ is added to each Focus mode as an Allowed App.", comment: "Format string for description of how mute alerts works with focus mode (1: app name)"), appName))
5657
.fixedSize(horizontal: false, vertical: true)
5758
}
5859
.padding()

0 commit comments

Comments
 (0)