From 2ca04ae32087572244990f594c8d3a9a5ea72511 Mon Sep 17 00:00:00 2001 From: bastiaanv Date: Mon, 3 Jun 2024 21:55:24 +0200 Subject: [PATCH 1/6] feat: Add Dana configurations --- MockKit/MockPumpManagerState.swift | 11 +++++++++++ .../MockPumpManagerSettingsViewController.swift | 2 ++ 2 files changed, 13 insertions(+) diff --git a/MockKit/MockPumpManagerState.swift b/MockKit/MockPumpManagerState.swift index ddb662fcc..9a7f5d263 100644 --- a/MockKit/MockPumpManagerState.swift +++ b/MockKit/MockPumpManagerState.swift @@ -14,6 +14,7 @@ public struct MockPumpManagerState: Equatable { case omnipod case medtronicX22 case medtronicX23 + case dana case custom var supportedBolusVolumes: [Double]? { @@ -32,6 +33,8 @@ public struct MockPumpManagerState: Equatable { let scaledRanges = (range.lowerBound * scale + 1)...(range.upperBound * scale) return scaledRanges.map { Double($0) / Double(scale) } } + case .dana: + return (1...300).map { Double($0) / 10 } case .custom: return nil } @@ -50,6 +53,9 @@ public struct MockPumpManagerState: Equatable { // 0.05 units for rates between 1-9.95 U/h // 0.1 units for rates between 10-25 U/h return "0-1-10-25 by 0.025|0.05|0.1" + case .dana: + // 0.1 units for volumes between 0.1-25U + return "0.1-30 by 0.1" case .custom: return nil } @@ -71,6 +77,8 @@ public struct MockPumpManagerState: Equatable { // 0.1 units for rates between 10-35 U/h let rateGroup3 = (100...350).map { Double($0) / 10 } return rateGroup1 + rateGroup2 + rateGroup3 + case .dana: + return (0...1600).map { Double($0) / 100 } case .custom: return nil } @@ -89,6 +97,9 @@ public struct MockPumpManagerState: Equatable { // 0.05 units for rates between 1-9.95 U/h // 0.1 units for rates between 10-35 U/h return "0-1-10-35 by 0.025|0.05|0.1" + case .dana: + // 0.01 units for rates between 0.01-16U/hr + return "0.01-16 by 0.01" case .custom: return nil } diff --git a/MockKitUI/View Controllers/MockPumpManagerSettingsViewController.swift b/MockKitUI/View Controllers/MockPumpManagerSettingsViewController.swift index 592e3153e..01a7e29ae 100644 --- a/MockKitUI/View Controllers/MockPumpManagerSettingsViewController.swift +++ b/MockKitUI/View Controllers/MockPumpManagerSettingsViewController.swift @@ -199,6 +199,8 @@ final class MockPumpManagerSettingsViewController: UITableViewController { return "x22" case .medtronicX23: return "x23" + case .dana: + return "Dana" case .custom: return "Custom" } From 84611e52d3c6bf41c400bedebdda31cf07f91643 Mon Sep 17 00:00:00 2001 From: bastiaanv Date: Mon, 3 Jun 2024 21:58:00 +0200 Subject: [PATCH 2/6] fix: Increase bolus to 80U --- MockKit/MockPumpManagerState.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MockKit/MockPumpManagerState.swift b/MockKit/MockPumpManagerState.swift index 9a7f5d263..bc55ea9f3 100644 --- a/MockKit/MockPumpManagerState.swift +++ b/MockKit/MockPumpManagerState.swift @@ -34,7 +34,7 @@ public struct MockPumpManagerState: Equatable { return scaledRanges.map { Double($0) / Double(scale) } } case .dana: - return (1...300).map { Double($0) / 10 } + return (1...800).map { Double($0) / 10 } case .custom: return nil } @@ -54,8 +54,8 @@ public struct MockPumpManagerState: Equatable { // 0.1 units for rates between 10-25 U/h return "0-1-10-25 by 0.025|0.05|0.1" case .dana: - // 0.1 units for volumes between 0.1-25U - return "0.1-30 by 0.1" + // 0.1 units for volumes between 0.1-80U + return "0.1-80 by 0.1" case .custom: return nil } From 49df814edd30a839c0afda1ece6fe9972d40aed6 Mon Sep 17 00:00:00 2001 From: Deniz Cengiz Date: Tue, 1 Oct 2024 10:41:01 +0200 Subject: [PATCH 3/6] Change apple clang module verification to NO --- LoopKit.xcodeproj/project.pbxproj | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/LoopKit.xcodeproj/project.pbxproj b/LoopKit.xcodeproj/project.pbxproj index 2ecb6c53c..1832aa295 100644 --- a/LoopKit.xcodeproj/project.pbxproj +++ b/LoopKit.xcodeproj/project.pbxproj @@ -5203,7 +5203,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 41; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_MODULE_VERIFIER = YES; + ENABLE_MODULE_VERIFIER = "$(CLANG_MODULES_ENABLE_VERIFIER_TOOL)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = LoopKitUI/Info.plist; @@ -5241,7 +5241,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 41; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_MODULE_VERIFIER = YES; + ENABLE_MODULE_VERIFIER = "$(CLANG_MODULES_ENABLE_VERIFIER_TOOL)"; FRAMEWORK_SEARCH_PATHS = "$(inherited)"; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = LoopKitUI/Info.plist; @@ -5402,7 +5402,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 41; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_MODULE_VERIFIER = YES; + ENABLE_MODULE_VERIFIER = "$(CLANG_MODULES_ENABLE_VERIFIER_TOOL)"; INFOPLIST_FILE = LoopKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -5436,7 +5436,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 41; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_MODULE_VERIFIER = YES; + ENABLE_MODULE_VERIFIER = "$(CLANG_MODULES_ENABLE_VERIFIER_TOOL)"; INFOPLIST_FILE = LoopKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = ( @@ -5494,6 +5494,7 @@ CODE_SIGN_IDENTITY = ""; COPY_PHASE_STRIP = NO; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = "$(CLANG_MODULES_ENABLE_VERIFIER_TOOL)"; GCC_OPTIMIZATION_LEVEL = 0; INFOPLIST_FILE = MockKit/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -5531,7 +5532,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_MODULE_VERIFIER = YES; + ENABLE_MODULE_VERIFIER = "$(CLANG_MODULES_ENABLE_VERIFIER_TOOL)"; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = LoopTestingKit/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -5661,7 +5662,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 41; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_MODULE_VERIFIER = YES; + ENABLE_MODULE_VERIFIER = "$(CLANG_MODULES_ENABLE_VERIFIER_TOOL)"; INFOPLIST_FILE = LoopKit/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -5694,7 +5695,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 41; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_MODULE_VERIFIER = YES; + ENABLE_MODULE_VERIFIER = "$(CLANG_MODULES_ENABLE_VERIFIER_TOOL)"; INFOPLIST_FILE = LoopKit/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", From 25f4aae58a24a99f29bde8a3d1fdee585e479b36 Mon Sep 17 00:00:00 2001 From: Nicole van Elst - van den Hoek Date: Sun, 20 Sep 2026 11:07:16 +0200 Subject: [PATCH 4/6] Convert formal "u/uw" to informal "je" in Dutch translations Aligns the Dutch localization with the informal register used elsewhere in the app. Co-Authored-By: Claude Sonnet 5 --- LoopKit/Resources/Localizable.xcstrings | 2 +- LoopKitUI/Resources/Localizable.xcstrings | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/LoopKit/Resources/Localizable.xcstrings b/LoopKit/Resources/Localizable.xcstrings index a13e7b8c9..5b2664003 100644 --- a/LoopKit/Resources/Localizable.xcstrings +++ b/LoopKit/Resources/Localizable.xcstrings @@ -11314,7 +11314,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Sommige van de waarden die u hebt ingevoerd vallen buiten wat algemeen wordt aanbevolen." + "value" : "Sommige van de waarden die je hebt ingevoerd vallen buiten wat algemeen wordt aanbevolen." } }, "pl" : { diff --git a/LoopKitUI/Resources/Localizable.xcstrings b/LoopKitUI/Resources/Localizable.xcstrings index 6d7fe960e..cfde17695 100644 --- a/LoopKitUI/Resources/Localizable.xcstrings +++ b/LoopKitUI/Resources/Localizable.xcstrings @@ -4409,7 +4409,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Een waarde van 0 E/uur betekent dat u geen basale insuline ontvangt." + "value" : "Een waarde van 0 E/uur betekent dat je geen basale insuline ontvangt." } }, "pl" : { @@ -30163,7 +30163,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Deze instelling bepaalt ook een veiligheidslimiet voor automatische dosering. %1$@ beperkt de automatische toediening om de hoeveelheid actieve insuline onder tweemaal uw maximale bolus te houden." + "value" : "Deze instelling bepaalt ook een veiligheidslimiet voor automatische dosering. %1$@ beperkt de automatische toediening om de hoeveelheid actieve insuline onder tweemaal je maximale bolus te houden." } }, "pl" : { From ce5df9af5b43ad9074f9373fae2b4c2ecd58b2d3 Mon Sep 17 00:00:00 2001 From: Nicole van Elst - van den Hoek Date: Sun, 20 Sep 2026 11:20:15 +0200 Subject: [PATCH 5/6] Replace .red with .pink/.systemPink for error/destructive colors This kit has no access to the main app's "LoopRed" asset color, so .pink (SwiftUI Color contexts) / .systemPink (UIKit UIColor contexts) is used as the closest available system color. Co-Authored-By: Claude Sonnet 5 --- LoopKitUI/Extensions/Environment+Colors.swift | 2 +- LoopKitUI/Models/GuidanceColors.swift | 2 +- LoopKitUI/Views/ActionButton.swift | 2 +- LoopKitUI/Views/ActionButtonStyle.swift | 2 +- LoopKitUI/Views/Deletable.swift | 4 ++-- LoopKitUI/Views/FavoriteFoodListRow.swift | 2 +- LoopKitUI/Views/InsulinTypeChooser.swift | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/LoopKitUI/Extensions/Environment+Colors.swift b/LoopKitUI/Extensions/Environment+Colors.swift index bf83a7566..2a8539ee7 100644 --- a/LoopKitUI/Extensions/Environment+Colors.swift +++ b/LoopKitUI/Extensions/Environment+Colors.swift @@ -95,7 +95,7 @@ private struct LoopStatusColorPaletteKey: EnvironmentKey { static let defaultValue: StateColorPalette = StateColorPalette(unknown: .systemGray4, normal: .green, warning: .yellow, - error: .red) + error: .systemPink) } public extension EnvironmentValues { diff --git a/LoopKitUI/Models/GuidanceColors.swift b/LoopKitUI/Models/GuidanceColors.swift index 312ba7d8b..ce2dcb859 100644 --- a/LoopKitUI/Models/GuidanceColors.swift +++ b/LoopKitUI/Models/GuidanceColors.swift @@ -23,6 +23,6 @@ public struct GuidanceColors { public init() { self.acceptable = .primary self.warning = .yellow - self.critical = .red + self.critical = .pink } } diff --git a/LoopKitUI/Views/ActionButton.swift b/LoopKitUI/Views/ActionButton.swift index 1de54d2b8..a2e461536 100644 --- a/LoopKitUI/Views/ActionButton.swift +++ b/LoopKitUI/Views/ActionButton.swift @@ -31,7 +31,7 @@ public struct ActionButton: ViewModifier { edgeColor = .clear case .destructive: fontColor = .white - backgroundColor = .red + backgroundColor = .pink edgeColor = .clear case .secondary: fontColor = .accentColor diff --git a/LoopKitUI/Views/ActionButtonStyle.swift b/LoopKitUI/Views/ActionButtonStyle.swift index 918776919..57016ef9d 100644 --- a/LoopKitUI/Views/ActionButtonStyle.swift +++ b/LoopKitUI/Views/ActionButtonStyle.swift @@ -32,7 +32,7 @@ public struct ActionButtonStyle: ButtonStyle { edgeColor = .clear case .destructive: fontColor = .white - backgroundColor = .red + backgroundColor = .pink edgeColor = .clear case .secondary: fontColor = .accentColor diff --git a/LoopKitUI/Views/Deletable.swift b/LoopKitUI/Views/Deletable.swift index 3a3b452fb..d85cca1b1 100644 --- a/LoopKitUI/Views/Deletable.swift +++ b/LoopKitUI/Views/Deletable.swift @@ -91,7 +91,7 @@ struct Deletable: View { .foregroundColor(.white) .background( // Expand into margins - Color.red.padding(-12) + Color.pink.padding(-12) ) .transition(AnyTransition.move(edge: .trailing).combined(with: .opacity)) .offset(x: 4) // Push into margin @@ -113,7 +113,7 @@ private struct DeletionIndicator: View { .bold() .foregroundColor(.white) .padding(1) - .background(Circle().fill(Color.red)) + .background(Circle().fill(Color.pink)) .padding(-1) // Prevent circle background from affecting layout } } diff --git a/LoopKitUI/Views/FavoriteFoodListRow.swift b/LoopKitUI/Views/FavoriteFoodListRow.swift index 9abec48f7..a4d5b489c 100644 --- a/LoopKitUI/Views/FavoriteFoodListRow.swift +++ b/LoopKitUI/Views/FavoriteFoodListRow.swift @@ -91,7 +91,7 @@ extension FavoriteFoodListRow { let isConfirmingDelete = foodToConfirmDeleteId == food.id return ZStack { - Color.red + Color.pink .clipShape(RoundedRectangle(cornerRadius: isConfirmingDelete ? 0 : 12.5)) .frame(width: isConfirmingDelete ? nil : 25, height: isConfirmingDelete ? nil : 25) diff --git a/LoopKitUI/Views/InsulinTypeChooser.swift b/LoopKitUI/Views/InsulinTypeChooser.swift index 0549cb135..0ad6bb4e3 100644 --- a/LoopKitUI/Views/InsulinTypeChooser.swift +++ b/LoopKitUI/Views/InsulinTypeChooser.swift @@ -87,6 +87,6 @@ struct InsulinTypeChooser_Previews: PreviewProvider { extension InsulinType { var image: UIImage? { - return UIImage(frameworkImage: "vial")?.withTintColor(.red) + return UIImage(frameworkImage: "vial")?.withTintColor(.systemPink) } } From a8c6019f71c24d8d27fe96840dfa23b32e4c245a Mon Sep 17 00:00:00 2001 From: Nicole van Elst - van den Hoek Date: Sun, 20 Sep 2026 12:11:38 +0200 Subject: [PATCH 6/6] Fix untranslated Simulator pump/CGM manager UI and normalize Dutch casing Many labels in MockKitUI (Simulator pump and CGM manager screens) used raw string literals or SwiftUI Text() instead of LocalizedString(), which resolves against the app's main bundle rather than MockKitUI's own bundle, so translations added to the catalog were silently ignored. Wrapped all affected labels and added the missing Dutch translations. Also normalizes Dutch Title Case translations to sentence case across LoopKit's other catalogs. Co-Authored-By: Claude Sonnet 5 --- LoopKit Example/Localizable.xcstrings | 2 +- LoopKit/Resources/Localizable.xcstrings | 24 +- LoopKitUI/Resources/Localizable.xcstrings | 112 +-- MockKit/Resources/Localizable.xcstrings | 6 +- MockKitUI/LocalizedString.swift | 4 + MockKitUI/MockSupport.swift | 8 +- MockKitUI/Resources/Localizable.xcstrings | 792 ++++++++++++++++-- ...ockPumpManagerSettingsViewController.swift | 72 +- .../MockPumpManagerSettingsViewModel.swift | 4 +- .../DeliveryUncertaintyRecoveryView.swift | 4 +- MockKitUI/Views/InsulinStatusView.swift | 12 +- .../Views/MockCGMManagerSettingsView.swift | 38 +- .../Views/MockPumpManagerSettingsView.swift | 32 +- 13 files changed, 890 insertions(+), 220 deletions(-) diff --git a/LoopKit Example/Localizable.xcstrings b/LoopKit Example/Localizable.xcstrings index 901ee2c06..5b30780fb 100644 --- a/LoopKit Example/Localizable.xcstrings +++ b/LoopKit Example/Localizable.xcstrings @@ -799,7 +799,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Genereer Gegevens" + "value" : "Genereer gegevens" } }, "pl" : { diff --git a/LoopKit/Resources/Localizable.xcstrings b/LoopKit/Resources/Localizable.xcstrings index 5b2664003..9a6b8d136 100644 --- a/LoopKit/Resources/Localizable.xcstrings +++ b/LoopKit/Resources/Localizable.xcstrings @@ -2688,7 +2688,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Autorisatie Geweigerd" + "value" : "Autorisatie geweigerd" } }, "pl" : { @@ -3720,7 +3720,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Kritieke Update" + "value" : "Kritieke update" } }, "pl" : { @@ -4024,7 +4024,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Apparaat Geweigerd" + "value" : "Apparaat geweigerd" } }, "pl" : { @@ -7087,7 +7087,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Ongeldige Configuratie" + "value" : "Ongeldige configuratie" } }, "pl" : { @@ -7809,7 +7809,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Maximale Basaalsnelheid" + "value" : "Maximale basaalsnelheid" } }, "pl" : { @@ -8101,7 +8101,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Maximale Bolus" + "value" : "Maximale bolus" } }, "pl" : { @@ -9126,7 +9126,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Aandacht Nodig" + "value" : "Aandacht nodig" } }, "pl" : { @@ -9269,7 +9269,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Geen Update" + "value" : "Geen update" } }, "pl" : { @@ -10438,7 +10438,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Pre-Meal" + "value" : "Pre-meal" } }, "pl" : { @@ -10581,7 +10581,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Aanbevolen Update" + "value" : "Aanbevolen update" } }, "pl" : { @@ -12756,7 +12756,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Toediening Onzeker" + "value" : "Toediening onzeker" } }, "pl" : { @@ -13495,7 +13495,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Update Beschikbaar" + "value" : "Update beschikbaar" } }, "pl" : { diff --git a/LoopKitUI/Resources/Localizable.xcstrings b/LoopKitUI/Resources/Localizable.xcstrings index cfde17695..1df583d96 100644 --- a/LoopKitUI/Resources/Localizable.xcstrings +++ b/LoopKitUI/Resources/Localizable.xcstrings @@ -3838,7 +3838,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "🍽 Pre-Meal" + "value" : "🍽 pre-meal" } }, "pl" : { @@ -6938,7 +6938,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Annuleer Override" + "value" : "Annuleer override" } }, "pl" : { @@ -7087,7 +7087,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Tijdelijk Basaal Annuleren" + "value" : "Tijdelijk basaal annuleren" } }, "pl" : { @@ -9907,7 +9907,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Aangepaste Override" + "value" : "Aangepaste override" } }, "pl" : { @@ -10050,7 +10050,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Aangepast Programma" + "value" : "Aangepast programma" } }, "pl" : { @@ -10499,7 +10499,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Verwijder Account" + "value" : "Verwijder account" } }, "pl" : { @@ -10648,7 +10648,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Verwijder Alles" + "value" : "Verwijder alles" } }, "pl" : { @@ -11089,7 +11089,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Programma Uitschakelen" + "value" : "Programma uitschakelen" } }, "pl" : { @@ -11824,7 +11824,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Override Aanpassen" + "value" : "Override aanpassen" } }, "pl" : { @@ -14305,7 +14305,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Ga Terug" + "value" : "Ga terug" } }, "pl" : { @@ -14448,7 +14448,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Hoge Basaalsnelheid" + "value" : "Hoge basaalsnelheid" } }, "pl" : { @@ -14591,7 +14591,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Hoge Koolhydraatratio" + "value" : "Hoge koolhydraatratio" } }, "pl" : { @@ -14734,7 +14734,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Hoge Correctiewaarde" + "value" : "Hoge correctiewaarde" } }, "pl" : { @@ -14877,7 +14877,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Hoge Glucoseveiligheidslimiet" + "value" : "Hoge glucoseveiligheidslimiet" } }, "pl" : { @@ -15020,7 +15020,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Hoge Insulinegevoeligheid" + "value" : "Hoge insulinegevoeligheid" } }, "pl" : { @@ -15163,7 +15163,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Hoge Maximale Basaalsnelheid" + "value" : "Hoge maximale basaalsnelheid" } }, "pl" : { @@ -15306,7 +15306,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Hoge Maximale Bolus" + "value" : "Hoge maximale bolus" } }, "pl" : { @@ -15449,7 +15449,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Hoge Pre-Meal Waarde" + "value" : "Hoge pre-meal waarde" } }, "pl" : { @@ -15592,7 +15592,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Hoge Trainingswaarde" + "value" : "Hoge trainingswaarde" } }, "pl" : { @@ -17039,7 +17039,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Lage Basaalsnelheid" + "value" : "Lage basaalsnelheid" } }, "pl" : { @@ -17182,7 +17182,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Lage Koolhydraatratio" + "value" : "Lage koolhydraatratio" } }, "pl" : { @@ -17325,7 +17325,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Lage Correctiewaarde" + "value" : "Lage correctiewaarde" } }, "pl" : { @@ -17468,7 +17468,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Lage Glucoseveiligheidslimiet" + "value" : "Lage glucoseveiligheidslimiet" } }, "pl" : { @@ -17611,7 +17611,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Lage Insulinegevoeligheid" + "value" : "Lage insulinegevoeligheid" } }, "pl" : { @@ -17754,7 +17754,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Lage Maximale Basaalsnelheid" + "value" : "Lage maximale basaalsnelheid" } }, "pl" : { @@ -17897,7 +17897,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Lage Maximale Bolus" + "value" : "Lage maximale bolus" } }, "pl" : { @@ -18040,7 +18040,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Lage Pre-Meal Waarde" + "value" : "Lage pre-meal waarde" } }, "pl" : { @@ -18183,7 +18183,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Lage Trainingswaarde" + "value" : "Lage trainingswaarde" } }, "pl" : { @@ -18625,7 +18625,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Maximale Basaalsnelheid" + "value" : "Maximale basaalsnelheid" } }, "pl" : { @@ -18924,7 +18924,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Maximale Bolus" + "value" : "Maximale bolus" } }, "pl" : { @@ -19520,7 +19520,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Meer Informatie" + "value" : "Meer informatie" } }, "pl" : { @@ -19818,7 +19818,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Nieuwe Invoer" + "value" : "Nieuwe invoer" } }, "pl" : { @@ -19967,7 +19967,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Nieuw Programma" + "value" : "Nieuw programma" } }, "pl" : { @@ -20110,7 +20110,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Geen Basale Insuline" + "value" : "Geen basale insuline" } }, "pl" : { @@ -20550,7 +20550,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Totale Insulinebehoefte" + "value" : "Totale insulinebehoefte" } }, "pl" : { @@ -20843,7 +20843,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Override Programma's" + "value" : "Override programma's" } }, "pl" : { @@ -21291,7 +21291,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Pre-Meal" + "value" : "Pre-meal" } }, "pl" : { @@ -21434,7 +21434,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Pre-Meal Waarden" + "value" : "Pre-meal waarden" } }, "pl" : { @@ -22161,7 +22161,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Pomp Werkt Niet" + "value" : "Pomp werkt niet" } }, "pl" : { @@ -22310,7 +22310,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Snelwerkend - Volwassenen" + "value" : "Snelwerkend - volwassenen" } }, "pl" : { @@ -22459,7 +22459,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Snelwerkend - Kinderen" + "value" : "Snelwerkend - kinderen" } }, "pl" : { @@ -22912,7 +22912,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Hervat Toediening" + "value" : "Hervat toediening" } }, "pl" : { @@ -23204,7 +23204,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Bekijk en Instellingen Opslaan" + "value" : "Bekijk en instellingen opslaan" } }, "pl" : { @@ -23782,7 +23782,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Basaalsnelheden Opslaan?" + "value" : "Basaalsnelheden opslaan?" } }, "pl" : { @@ -23925,7 +23925,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Koolhydraatratio Opslaan?" + "value" : "Koolhydraatratio opslaan?" } }, "pl" : { @@ -24354,7 +24354,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Glucoseveiligheidlimiet Opslaan?" + "value" : "Glucoseveiligheidlimiet opslaan?" } }, "pl" : { @@ -24640,7 +24640,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Pre-Meal Bereik Opslaan?" + "value" : "Pre-meal bereik opslaan?" } }, "pl" : { @@ -24783,7 +24783,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Trainingsbereik Opslaan?" + "value" : "Trainingsbereik opslaan?" } }, "pl" : { @@ -25957,7 +25957,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Tijdelijk Basaal Starten" + "value" : "Tijdelijk basaal starten" } }, "pl" : { @@ -26392,7 +26392,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Onderbreek Toediening" + "value" : "Onderbreek toediening" } }, "pl" : { @@ -27857,7 +27857,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Tijdelijke Override" + "value" : "Tijdelijke override" } }, "pl" : { @@ -31319,7 +31319,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Kan Niet Opslaan" + "value" : "Kan niet opslaan" } }, "pl" : { @@ -31754,7 +31754,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Niet Geselecteerd" + "value" : "Niet geselecteerd" } }, "pl" : { @@ -31897,7 +31897,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Niet Ingesteld" + "value" : "Niet ingesteld" } }, "pl" : { @@ -32474,7 +32474,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Bekijk Override" + "value" : "Bekijk override" } }, "pl" : { @@ -34644,7 +34644,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "je Glucoseveiligheidslimiet" + "value" : "je glucoseveiligheidslimiet" } }, "pl" : { diff --git a/MockKit/Resources/Localizable.xcstrings b/MockKit/Resources/Localizable.xcstrings index 89bebcf30..7cb7db4eb 100644 --- a/MockKit/Resources/Localizable.xcstrings +++ b/MockKit/Resources/Localizable.xcstrings @@ -508,7 +508,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Geen Insuline" + "value" : "Geen insuline" } }, "pl" : { @@ -651,7 +651,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Pompbatterij Leeg" + "value" : "Pompbatterij leeg" } }, "pl" : { @@ -800,7 +800,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Pomp Foutmelding" + "value" : "Pomp foutmelding" } }, "pl" : { diff --git a/MockKitUI/LocalizedString.swift b/MockKitUI/LocalizedString.swift index c092c97ed..54af298b2 100644 --- a/MockKitUI/LocalizedString.swift +++ b/MockKitUI/LocalizedString.swift @@ -20,6 +20,10 @@ private class LocalBundle { }() } +var localizationBundle: Bundle { + LocalBundle.main +} + func LocalizedString(_ key: String, tableName: String? = nil, value: String? = nil, comment: String) -> String { if let value = value { return NSLocalizedString(key, tableName: tableName, bundle: LocalBundle.main, value: value, comment: comment) diff --git a/MockKitUI/MockSupport.swift b/MockKitUI/MockSupport.swift index 9597912e6..9305bfd9e 100644 --- a/MockKitUI/MockSupport.swift +++ b/MockKitUI/MockSupport.swift @@ -138,25 +138,25 @@ struct SupportMenuItem : View { return ActionSheet.Button.default(Text(versionUpdate.localizedDescription), action: setter) } } + - [.cancel(Text("Cancel"))] + [.cancel(Text(LocalizedString("Cancel", comment: "Cancel button for mock version check action sheet")))] } private var actionSheet: ActionSheet { - ActionSheet(title: Text("Version Check Response"), message: Text("How should the simulator respond to a version check?"), buttons: buttons) + ActionSheet(title: Text(LocalizedString("Version Check Response", comment: "Title for mock version check action sheet")), message: Text(LocalizedString("How should the simulator respond to a version check?", comment: "Message for mock version check action sheet")), buttons: buttons) } var body: some View { Button(action: { self.showActionSheet.toggle() }) { - Text("Mock Version Check \(currentVersionUpdate)") + Text("Mock Version Check \(currentVersionUpdate)", bundle: localizationBundle) } .actionSheet(isPresented: $showActionSheet, content: { self.actionSheet }) Button(action: { mockSupport.lastVersionCheckAlertDate = nil } ) { - Text("Clear Last Version Check Alert Date") + Text(LocalizedString("Clear Last Version Check Alert Date", comment: "Button title to clear the last version check alert date")) } } diff --git a/MockKitUI/Resources/Localizable.xcstrings b/MockKitUI/Resources/Localizable.xcstrings index 859d0b330..1df8afc5a 100644 --- a/MockKitUI/Resources/Localizable.xcstrings +++ b/MockKitUI/Resources/Localizable.xcstrings @@ -554,6 +554,12 @@ "value" : "2" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "2" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -612,6 +618,12 @@ "value" : "5" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "5" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -670,6 +682,12 @@ "value" : "50+" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "50+" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -904,6 +922,18 @@ } } }, + "Are you sure you want to delete this pump?" : { + "comment" : "Confirmation message for deleting the mock pump", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Weet je zeker dat je deze pomp wilt verwijderen?" + } + } + } + }, "Are you sure you want to delete this service?" : { "comment" : "Confirmation message for deleting a service", "localizations" : { @@ -1136,6 +1166,42 @@ } } }, + "Basal Rates" : { + "comment" : "Label for supported basal rates cell", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Basaalstanden" + } + } + } + }, + "Battery Remaining" : { + "comment" : "Label for battery remaining cell", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Resterende batterij" + } + } + } + }, + "Bolus Volumes" : { + "comment" : "Label for supported bolus volumes cell", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Bolusvolumes" + } + } + } + }, "Cancel" : { "comment" : "The title of the cancel action in an action sheet", "localizations" : { @@ -1267,6 +1333,18 @@ } } }, + "Cause Pump Error" : { + "comment" : "Button title to trigger a mock pump error", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pompfout veroorzaken" + } + } + } + }, "CGM Settings" : { "comment" : "Title for CGM simulator settings", "localizations" : { @@ -1321,7 +1399,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "CGM Instellingen" + "value" : "CGM instellingen" } }, "pl" : { @@ -1394,6 +1472,12 @@ "value" : "CGM-simulator" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "CGM-simulator" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -1461,7 +1545,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Wis laatste versie Controleer Waarschuwingsdatum" + "value" : "Laatste waarschuwingsdatum voor versiecontrole wissen" } }, "pl" : { @@ -1543,7 +1627,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Comms Herstel" + "value" : "Comms herstel" } }, "pl" : { @@ -1584,6 +1668,78 @@ } } }, + "Configuration" : { + "comment" : "Section header for the configuration section", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Configuratie" + } + } + } + }, + "Crash on Bolus" : { + "comment" : "Title for switch to enable a mock crash on bolus", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Crash bij bolus" + } + } + } + }, + "Crash on Temp Basal" : { + "comment" : "Title for switch to enable a mock crash on temp basal", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Crash bij tijdelijke basaal" + } + } + } + }, + "Critical Threshold" : { + "comment" : "Label for critical threshold cell", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Kritieke drempel" + } + } + } + }, + "Current Basal Rate" : { + "comment" : "Label for current basal rate cell", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Huidige basaalstand" + } + } + } + }, + "Custom" : { + "comment" : "Deliverable increments option: custom", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Aangepast" + } + } + } + }, "days" : { "localizations" : { "ar" : { @@ -1702,6 +1858,18 @@ } } }, + "Delete Pump" : { + "comment" : "Button title to delete the mock pump", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pomp verwijderen" + } + } + } + }, "Delete Service" : { "comment" : "Button title to delete a service", "localizations" : { @@ -1768,7 +1936,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Service Verwijderen" + "value" : "Service verwijderen" } }, "pl" : { @@ -1827,6 +1995,18 @@ } } }, + "Detect Occlusion" : { + "comment" : "Button title to trigger a mock occlusion", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Occlusie detecteren" + } + } + } + }, "Device Details" : { "localizations" : { "da" : { @@ -1859,6 +2039,12 @@ "value" : "Enhetsdetaljer" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Apparaatgegevens" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -1950,6 +2136,66 @@ } } }, + "Error on Bolus" : { + "comment" : "Title for switch to enable a mock error on bolus", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fout bij bolus" + } + } + } + }, + "Error on Cancel Bolus" : { + "comment" : "Title for switch to enable a mock error on cancel bolus", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fout bij bolus annuleren" + } + } + } + }, + "Error on Resume" : { + "comment" : "Title for switch to enable a mock error on resume", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fout bij hervatten" + } + } + } + }, + "Error on Suspend" : { + "comment" : "Title for switch to enable a mock error on suspend", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fout bij onderbreken" + } + } + } + }, + "Error on Temp Basal" : { + "comment" : "Title for switch to enable a mock error on temp basal", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Fout bij tijdelijke basaal" + } + } + } + }, "Error Resuming" : { "comment" : "The alert title for a resume error", "localizations" : { @@ -2016,7 +2262,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Fout Bij Hervatten" + "value" : "Fout bij hervatten" } }, "pl" : { @@ -2135,7 +2381,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Fout Bij Onderbreken" + "value" : "Fout bij onderbreken" } }, "pl" : { @@ -2226,6 +2472,12 @@ "value" : "Estimert lesing" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Geschatte meting" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -2299,7 +2551,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Insulinetoediening Hervatten Mislukt" + "value" : "Insulinetoediening hervatten mislukt" } }, "pl" : { @@ -2378,6 +2630,12 @@ "value" : "Kunne ikke avbryte insulintilførselen" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Insulinetoediening onderbreken mislukt" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -2436,6 +2694,12 @@ "value" : "Få hjelp med CGM-en din" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Hulp bij je CGM" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -2494,6 +2758,12 @@ "value" : "Få hjelp med pumpen din" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Hulp bij je pomp" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -2520,6 +2790,18 @@ } } }, + "Glucose" : { + "comment" : "Label for last glucose value", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Glucose" + } + } + } + }, "History" : { "comment" : "Caption for History\nHistory Caption", "localizations" : { @@ -2715,6 +2997,30 @@ } } }, + "Increments" : { + "comment" : "Label for deliverable increments setting", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Stapgroottes" + } + } + } + }, + "Insertion Time" : { + "comment" : "Label for sensor insertion time field", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Inbrengtijd" + } + } + } + }, "Insulin\nSuspended" : { "localizations" : { "da" : { @@ -2747,6 +3053,12 @@ "value" : "Insulin\n Suspendert" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Insuline\nonderbroken" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -2773,161 +3085,185 @@ } } }, - "Insulin Type" : { - "comment" : "Controller title for insulin type selection screen", + "Insulin Delivery" : { + "comment" : "Title of insulin delivery section", + "extractionState" : "manual", "localizations" : { - "cs" : { + "en" : { "stringUnit" : { "state" : "translated", - "value" : "Typ inzulínu" + "value" : "Insulin%@Delivery" } }, - "da" : { + "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Insulintype" + "value" : "Insuline afgifte" } - }, - "de" : { - "stringUnit" : { - "state" : "translated", - "value" : "Insulintyp" - } - }, - "es" : { + } + } + }, + "Insulin Remaining" : { + "localizations" : { + "da" : { "stringUnit" : { "state" : "translated", - "value" : "Tipo de Insulina" + "value" : "Insulin %@ Resterende" } }, - "fi" : { + "de" : { "stringUnit" : { "state" : "translated", - "value" : "Insuliinityyppi" + "value" : "Insulin%@Übrig" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Type d'insuline" + "value" : "Insuline%@Restante" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Tipo d'insulina" + "value" : "Insulina%@rimanente" } }, "nb" : { "stringUnit" : { "state" : "translated", - "value" : "Insulintype" + "value" : "Insulin %@ gjenstår" } }, "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Insulinetype" + "value" : "Resterende insuline" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Rodzaj insuliny" + "value" : "Pozostało%@Insuliny" } }, "ro" : { "stringUnit" : { "state" : "translated", - "value" : "Tipul de insulină" + "value" : "Insulină %@ rămasă" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Тип инсулина" + "value" : "Остаток инсулина %@" } }, - "sk" : { + "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "Typ inzulínu" + "value" : "胰岛素%@余量" } - }, - "sv" : { + } + } + }, + "Insulin Type" : { + "comment" : "Controller title for insulin type selection screen", + "localizations" : { + "cs" : { "stringUnit" : { "state" : "translated", - "value" : "Insulintyp" + "value" : "Typ inzulínu" } }, - "tr" : { + "da" : { "stringUnit" : { "state" : "translated", - "value" : "İnsülin Tipi" + "value" : "Insulintype" } }, - "zh-Hans" : { + "de" : { "stringUnit" : { "state" : "translated", - "value" : "胰岛素类型" + "value" : "Insulintyp" } - } - } - }, - "Insulin%@Remaining" : { - "localizations" : { - "da" : { + }, + "es" : { "stringUnit" : { "state" : "translated", - "value" : "Insulin %@ Resterende" + "value" : "Tipo de Insulina" } }, - "de" : { + "fi" : { "stringUnit" : { "state" : "translated", - "value" : "Insulin%@Übrig" + "value" : "Insuliinityyppi" } }, "fr" : { "stringUnit" : { "state" : "translated", - "value" : "Insuline%@Restante" + "value" : "Type d'insuline" } }, "it" : { "stringUnit" : { "state" : "translated", - "value" : "Insulina%@rimanente" + "value" : "Tipo d'insulina" } }, "nb" : { "stringUnit" : { "state" : "translated", - "value" : "Insulin %@ gjenstår" + "value" : "Insulintype" + } + }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Insulinetype" } }, "pl" : { "stringUnit" : { "state" : "translated", - "value" : "Pozostało%@Insuliny" + "value" : "Rodzaj insuliny" } }, "ro" : { "stringUnit" : { "state" : "translated", - "value" : "Insulină %@ rămasă" + "value" : "Tipul de insulină" } }, "ru" : { "stringUnit" : { "state" : "translated", - "value" : "Остаток инсулина %@" + "value" : "Тип инсулина" + } + }, + "sk" : { + "stringUnit" : { + "state" : "translated", + "value" : "Typ inzulínu" + } + }, + "sv" : { + "stringUnit" : { + "state" : "translated", + "value" : "Insulintyp" + } + }, + "tr" : { + "stringUnit" : { + "state" : "translated", + "value" : "İnsülin Tipi" } }, "zh-Hans" : { "stringUnit" : { "state" : "translated", - "value" : "胰岛素%@余量" + "value" : "胰岛素类型" } } } @@ -2991,7 +3327,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Laatste Meting" + "value" : "Laatste meting" } }, "pl" : { @@ -3050,6 +3386,18 @@ } } }, + "Last Reconciliation Date" : { + "comment" : "Label for last reconciliation date cell", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Datum laatste afstemming" + } + } + } + }, "min" : { "localizations" : { "ar" : { @@ -3209,7 +3557,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Mock Versie Check %@" + "value" : "Mock versiecontrole %@" } }, "pl" : { @@ -3244,6 +3592,18 @@ } } }, + "Next Delivery Command Uncertain" : { + "comment" : "Title for switch to enable uncertain delivery on the next command", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Volgende toedieningsopdracht onzeker" + } + } + } + }, "No\nDelivery" : { "localizations" : { "da" : { @@ -3276,6 +3636,12 @@ "value" : "Ingen Leveranse" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Geen\nafgifte" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -3334,6 +3700,12 @@ "value" : "Innstillinger for varsling" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Meldingsinstellingen" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -3491,6 +3863,30 @@ } } }, + "Percent Completed" : { + "comment" : "Label for percent completed cell", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Percentage voltooid" + } + } + } + }, + "Pump Expires" : { + "comment" : "Label for pump expiration date/time field", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pomp verloopt" + } + } + } + }, "Pump expires in " : { "localizations" : { "da" : { @@ -3523,6 +3919,12 @@ "value" : "Pod utløper om" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pomp verloopt over " + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -3549,6 +3951,30 @@ } } }, + "Pump Paired" : { + "comment" : "Label for pump paired date/time field", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pomp gekoppeld" + } + } + } + }, + "Pump Time" : { + "comment" : "Label for pump time field", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pomptijd" + } + } + } + }, "Recover Simulator" : { "comment" : "Button title recovering comms", "localizations" : { @@ -3597,7 +4023,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Simulator Herstellen" + "value" : "Simulator herstellen" } }, "pl" : { @@ -3702,7 +4128,79 @@ } } }, - "Scheduled%@Basal" : { + "Replace Pump Component" : { + "comment" : "Button title to trigger a mock pump component replacement", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pomponderdeel vervangen" + } + } + } + }, + "Reservoir Remaining" : { + "comment" : "Label for reservoir remaining cell", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Resterend reservoir" + } + } + } + }, + "Reset" : { + "comment" : "Swipe action title to reset the last reconciliation date", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Resetten" + } + } + } + }, + "Resolve Occlusion" : { + "comment" : "Button title to resolve a mock occlusion", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Occlusie oplossen" + } + } + } + }, + "Resolve Pump Error" : { + "comment" : "Button title to resolve a mock pump error", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Pompfout oplossen" + } + } + } + }, + "Resume Therapy" : { + "comment" : "Button title to resume therapy after a mock pump component replacement", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Therapie hervatten" + } + } + } + }, + "Scheduled Basal" : { "localizations" : { "da" : { "stringUnit" : { @@ -3734,6 +4232,12 @@ "value" : "Planlagt%@Basal" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Geplande basaal" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -3760,6 +4264,30 @@ } } }, + "Sensor" : { + "comment" : "Section header for the sensor section", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Sensor" + } + } + } + }, + "Sensor Expires" : { + "comment" : "Label for sensor expiration field", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Sensor verloopt" + } + } + } + }, "Sensor expires in " : { "localizations" : { "ar" : { @@ -3904,6 +4432,12 @@ "value" : "Simulatorinnstillinger" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Simulator-instellingen" + } + }, "ro" : { "stringUnit" : { "state" : "translated", @@ -3995,6 +4529,18 @@ } } }, + "Status Progress" : { + "comment" : "Section header for the status progress section", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Statusvoortgang" + } + } + } + }, "Stop Sensor" : { "localizations" : { "da" : { @@ -4030,7 +4576,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Stop Sensor" + "value" : "Sensor stoppen" } }, "pl" : { @@ -4059,6 +4605,54 @@ } } }, + "Support" : { + "comment" : "Section header for the support section", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Ondersteuning" + } + } + } + }, + "Supported Basal Rates" : { + "comment" : "Title for supported basal rates screen", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Ondersteunde basaalstanden" + } + } + } + }, + "Supported Bolus Volumes" : { + "comment" : "Title for supported bolus volumes screen", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Ondersteunde bolusvolumes" + } + } + } + }, + "Suspend Insulin Delivery" : { + "comment" : "Label for button to suspend insulin delivery", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Insulinetoediening onderbreken" + } + } + } + }, "Suspended At" : { "comment" : "Label for suspended at field", "localizations" : { @@ -4124,7 +4718,19 @@ } } }, - "Temporary%@Basal" : { + "Tap to Resume Insulin Delivery" : { + "comment" : "Label for button to resume insulin delivery", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Tik om insulinetoediening te hervatten" + } + } + } + }, + "Temporary Basal" : { "localizations" : { "da" : { "stringUnit" : { @@ -4156,6 +4762,12 @@ "value" : "Midlertidig %@ Basal" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Tijdelijke basaal" + } + }, "pl" : { "stringUnit" : { "state" : "translated", @@ -4182,6 +4794,42 @@ } } }, + "Time" : { + "comment" : "Label for last glucose reading time", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Tijd" + } + } + } + }, + "Trend" : { + "comment" : "Label for last glucose trend", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Trend" + } + } + } + }, + "Unset" : { + "comment" : "Value shown when no insulin type is set", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Niet ingesteld" + } + } + } + }, "Update Reminder" : { "comment" : "Recurring software update alert title", "localizations" : { @@ -4224,7 +4872,7 @@ "nl" : { "stringUnit" : { "state" : "translated", - "value" : "Update Herinnering" + "value" : "Update herinnering" } }, "pl" : { @@ -4361,6 +5009,12 @@ "value" : "versionUpdate: %1$@\n\nbundleIdentifier: %2$@\n\ncurrentVersion: %3$@" } }, + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "versieUpdate: %1$@\n\nbundleIdentifier: %2$@\n\nhuidigeVersie: %3$@" + } + }, "ro" : { "stringUnit" : { "state" : "translated", @@ -4375,6 +5029,18 @@ } } }, + "Warning Threshold" : { + "comment" : "Label for warning threshold cell", + "extractionState" : "manual", + "localizations" : { + "nl" : { + "stringUnit" : { + "state" : "translated", + "value" : "Waarschuwingsdrempel" + } + } + } + }, "Your %1$@ app is out of date. It will continue to work, but we recommend updating to the latest version.\n\nGo to %2$@ Settings > Software Update to complete." : { "comment" : "Alert content body for first software update alert (1: app name)(2: app name)", "localizations" : { diff --git a/MockKitUI/View Controllers/MockPumpManagerSettingsViewController.swift b/MockKitUI/View Controllers/MockPumpManagerSettingsViewController.swift index 01a7e29ae..1ecf4e280 100644 --- a/MockKitUI/View Controllers/MockPumpManagerSettingsViewController.swift +++ b/MockKitUI/View Controllers/MockPumpManagerSettingsViewController.swift @@ -134,9 +134,9 @@ final class MockPumpManagerSettingsViewController: UITableViewController { case .actions: return nil case .settings: - return "Configuration" + return LocalizedString("Configuration", comment: "Section header for the configuration section") case .statusProgress: - return "Status Progress" + return LocalizedString("Status Progress", comment: "Section header for the status progress section") case .deletePump: return " " // Use an empty string for more dramatic spacing } @@ -146,7 +146,7 @@ final class MockPumpManagerSettingsViewController: UITableViewController { switch Section(rawValue: indexPath.section)! { case .basalRate: let cell = tableView.dequeueReusableCell(withIdentifier: SettingsTableViewCell.className, for: indexPath) - cell.textLabel?.text = "Current Basal Rate" + cell.textLabel?.text = LocalizedString("Current Basal Rate", comment: "Label for current basal rate cell") if let currentBasalRate = pumpManager.currentBasalRate { cell.detailTextLabel?.text = rateFormatter.string(from: currentBasalRate) } else { @@ -163,25 +163,25 @@ final class MockPumpManagerSettingsViewController: UITableViewController { case .occlusion: let cell = tableView.dequeueReusableCell(withIdentifier: TextButtonTableViewCell.className, for: indexPath) as! TextButtonTableViewCell if pumpManager.state.occlusionDetected { - cell.textLabel?.text = "Resolve Occlusion" + cell.textLabel?.text = LocalizedString("Resolve Occlusion", comment: "Button title to resolve a mock occlusion") } else { - cell.textLabel?.text = "Detect Occlusion" + cell.textLabel?.text = LocalizedString("Detect Occlusion", comment: "Button title to trigger a mock occlusion") } return cell case .pumpError: let cell = tableView.dequeueReusableCell(withIdentifier: TextButtonTableViewCell.className, for: indexPath) as! TextButtonTableViewCell if pumpManager.state.pumpErrorDetected { - cell.textLabel?.text = "Resolve Pump Error" + cell.textLabel?.text = LocalizedString("Resolve Pump Error", comment: "Button title to resolve a mock pump error") } else { - cell.textLabel?.text = "Cause Pump Error" + cell.textLabel?.text = LocalizedString("Cause Pump Error", comment: "Button title to trigger a mock pump error") } return cell case .pumpComponentReplacement: let cell = tableView.dequeueReusableCell(withIdentifier: TextButtonTableViewCell.className, for: indexPath) as! TextButtonTableViewCell if pumpManager.state.replacePumpComponent { - cell.textLabel?.text = "Resume Therapy" + cell.textLabel?.text = LocalizedString("Resume Therapy", comment: "Button title to resume therapy after a mock pump component replacement") } else { - cell.textLabel?.text = "Replace Pump Component" + cell.textLabel?.text = LocalizedString("Replace Pump Component", comment: "Button title to trigger a mock pump component replacement") } return cell } @@ -190,7 +190,7 @@ final class MockPumpManagerSettingsViewController: UITableViewController { case .deliverableIncrements: let cell = tableView.dequeueReusableCell(withIdentifier: SegmentedControlTableViewCell.className, for: indexPath) as! SegmentedControlTableViewCell let possibleDeliverableIncrements = MockPumpManagerState.DeliverableIncrements.allCases - cell.textLabel?.text = "Increments" + cell.textLabel?.text = LocalizedString("Increments", comment: "Label for deliverable increments setting") cell.options = possibleDeliverableIncrements.map { increments in switch increments { case .omnipod: @@ -202,7 +202,7 @@ final class MockPumpManagerSettingsViewController: UITableViewController { case .dana: return "Dana" case .custom: - return "Custom" + return LocalizedString("Custom", comment: "Deliverable increments option: custom") } } cell.segmentedControl.selectedSegmentIndex = possibleDeliverableIncrements.firstIndex(of: pumpManager.state.deliverableIncrements)! @@ -213,7 +213,7 @@ final class MockPumpManagerSettingsViewController: UITableViewController { return cell case .supportedBasalRates: let cell = tableView.dequeueReusableCell(withIdentifier: SettingsTableViewCell.className, for: indexPath) - cell.textLabel?.text = "Basal Rates" + cell.textLabel?.text = LocalizedString("Basal Rates", comment: "Label for supported basal rates cell") cell.detailTextLabel?.text = pumpManager.state.supportedBasalRatesDescription if pumpManager.state.deliverableIncrements == .custom { cell.accessoryType = .disclosureIndicator @@ -221,7 +221,7 @@ final class MockPumpManagerSettingsViewController: UITableViewController { return cell case .supportedBolusVolumes: let cell = tableView.dequeueReusableCell(withIdentifier: SettingsTableViewCell.className, for: indexPath) - cell.textLabel?.text = "Bolus Volumes" + cell.textLabel?.text = LocalizedString("Bolus Volumes", comment: "Label for supported bolus volumes cell") cell.detailTextLabel?.text = pumpManager.state.supportedBolusVolumesDescription if pumpManager.state.deliverableIncrements == .custom { cell.accessoryType = .disclosureIndicator @@ -230,19 +230,19 @@ final class MockPumpManagerSettingsViewController: UITableViewController { case .insulinType: let cell = tableView.dequeueReusableCell(withIdentifier: SettingsTableViewCell.className, for: indexPath) cell.prepareForReuse() - cell.textLabel?.text = "Insulin Type" - cell.detailTextLabel?.text = pumpManager.state.insulinType?.brandName ?? "Unset" + cell.textLabel?.text = LocalizedString("Insulin Type", comment: "Label for insulin type cell") + cell.detailTextLabel?.text = pumpManager.state.insulinType?.brandName ?? LocalizedString("Unset", comment: "Value shown when no insulin type is set") cell.accessoryType = .disclosureIndicator return cell case .reservoirRemaining: let cell = tableView.dequeueReusableCell(withIdentifier: SettingsTableViewCell.className, for: indexPath) - cell.textLabel?.text = "Reservoir Remaining" + cell.textLabel?.text = LocalizedString("Reservoir Remaining", comment: "Label for reservoir remaining cell") cell.detailTextLabel?.text = reservoirFormatter.string(from: HKQuantity(unit: .internationalUnit(), doubleValue: pumpManager.state.reservoirUnitsRemaining)) cell.accessoryType = .disclosureIndicator return cell case .batteryRemaining: let cell = tableView.dequeueReusableCell(withIdentifier: SettingsTableViewCell.className, for: indexPath) - cell.textLabel?.text = "Battery Remaining" + cell.textLabel?.text = LocalizedString("Battery Remaining", comment: "Label for battery remaining cell") if let remainingCharge = pumpManager.status.pumpBatteryChargeRemaining { cell.detailTextLabel?.text = "\(Int(round(remainingCharge * 100)))%" } else { @@ -251,24 +251,24 @@ final class MockPumpManagerSettingsViewController: UITableViewController { cell.accessoryType = .disclosureIndicator return cell case .tempBasalErrorToggle: - return switchTableViewCell(for: indexPath, titled: "Error on Temp Basal", boundTo: \.tempBasalEnactmentShouldError) + return switchTableViewCell(for: indexPath, titled: LocalizedString("Error on Temp Basal", comment: "Title for switch to enable a mock error on temp basal"), boundTo: \.tempBasalEnactmentShouldError) case .bolusErrorToggle: - return switchTableViewCell(for: indexPath, titled: "Error on Bolus", boundTo: \.bolusEnactmentShouldError) + return switchTableViewCell(for: indexPath, titled: LocalizedString("Error on Bolus", comment: "Title for switch to enable a mock error on bolus"), boundTo: \.bolusEnactmentShouldError) case .bolusCancelErrorToggle: - return switchTableViewCell(for: indexPath, titled: "Error on Cancel Bolus", boundTo: \.bolusCancelShouldError) + return switchTableViewCell(for: indexPath, titled: LocalizedString("Error on Cancel Bolus", comment: "Title for switch to enable a mock error on cancel bolus"), boundTo: \.bolusCancelShouldError) case .suspendErrorToggle: - return switchTableViewCell(for: indexPath, titled: "Error on Suspend", boundTo: \.deliverySuspensionShouldError) + return switchTableViewCell(for: indexPath, titled: LocalizedString("Error on Suspend", comment: "Title for switch to enable a mock error on suspend"), boundTo: \.deliverySuspensionShouldError) case .resumeErrorToggle: - return switchTableViewCell(for: indexPath, titled: "Error on Resume", boundTo: \.deliveryResumptionShouldError) + return switchTableViewCell(for: indexPath, titled: LocalizedString("Error on Resume", comment: "Title for switch to enable a mock error on resume"), boundTo: \.deliveryResumptionShouldError) case .crashOnBolus: - return switchTableViewCell(for: indexPath, titled: "Crash on Bolus", boundTo: \.bolusShouldCrash) + return switchTableViewCell(for: indexPath, titled: LocalizedString("Crash on Bolus", comment: "Title for switch to enable a mock crash on bolus"), boundTo: \.bolusShouldCrash) case .crashOnTempBasal: - return switchTableViewCell(for: indexPath, titled: "Crash on Temp Basal", boundTo: \.tempBasalShouldCrash) + return switchTableViewCell(for: indexPath, titled: LocalizedString("Crash on Temp Basal", comment: "Title for switch to enable a mock crash on temp basal"), boundTo: \.tempBasalShouldCrash) case .uncertainDeliveryErrorToggle: - return switchTableViewCell(for: indexPath, titled: "Next Delivery Command Uncertain", boundTo: \.deliveryCommandsShouldTriggerUncertainDelivery) + return switchTableViewCell(for: indexPath, titled: LocalizedString("Next Delivery Command Uncertain", comment: "Title for switch to enable uncertain delivery on the next command"), boundTo: \.deliveryCommandsShouldTriggerUncertainDelivery) case .lastReconciliationDate: let cell = tableView.dequeueReusableCell(withIdentifier: DateAndDurationTableViewCell.className, for: indexPath) as! DateAndDurationTableViewCell - cell.titleLabel.text = "Last Reconciliation Date" + cell.titleLabel.text = LocalizedString("Last Reconciliation Date", comment: "Label for last reconciliation date cell") cell.date = pumpManager.lastSync ?? Date() cell.datePicker.maximumDate = Date() cell.datePicker.minimumDate = Date() - .hours(48) @@ -286,21 +286,21 @@ final class MockPumpManagerSettingsViewController: UITableViewController { let cell = tableView.dequeueReusableCell(withIdentifier: SettingsTableViewCell.className, for: indexPath) switch StatusProgressRow(rawValue: indexPath.row)! { case .percentComplete: - cell.textLabel?.text = "Percent Completed" + cell.textLabel?.text = LocalizedString("Percent Completed", comment: "Label for percent completed cell") if let percentCompleted = pumpManager.state.progressPercentComplete { cell.detailTextLabel?.text = "\(Int(round(percentCompleted * 100)))%" } else { cell.detailTextLabel?.text = SettingsTableViewCell.NoValueString } case .warningThreshold: - cell.textLabel?.text = "Warning Threshold" + cell.textLabel?.text = LocalizedString("Warning Threshold", comment: "Label for warning threshold cell") if let warningThreshold = pumpManager.state.progressWarningThresholdPercentValue { cell.detailTextLabel?.text = "\(Int(round(warningThreshold * 100)))%" } else { cell.detailTextLabel?.text = SettingsTableViewCell.NoValueString } case .criticalThreshold: - cell.textLabel?.text = "Critical Threshold" + cell.textLabel?.text = LocalizedString("Critical Threshold", comment: "Label for critical threshold cell") if let criticalThreshold = pumpManager.state.progressCriticalThresholdPercentValue { cell.detailTextLabel?.text = "\(Int(round(criticalThreshold * 100)))%" } else { @@ -311,7 +311,7 @@ final class MockPumpManagerSettingsViewController: UITableViewController { return cell case .deletePump: let cell = tableView.dequeueReusableCell(withIdentifier: TextButtonTableViewCell.className, for: indexPath) as! TextButtonTableViewCell - cell.textLabel?.text = "Delete Pump" + cell.textLabel?.text = LocalizedString("Delete Pump", comment: "Button title to delete the mock pump") cell.textLabel?.textAlignment = .center cell.tintColor = .delete cell.isEnabled = true @@ -365,7 +365,7 @@ final class MockPumpManagerSettingsViewController: UITableViewController { if pumpManager.state.deliverableIncrements == .custom, pumpManager.state.supportedBasalRates.indices.contains(1) { let basalRates = pumpManager.state.supportedBasalRates let vc = SupportedRangeTableViewController(minValue: basalRates.first!, maxValue: basalRates.last!, stepSize: basalRates[1] - basalRates.first!) - vc.title = "Supported Basal Rates" + vc.title = LocalizedString("Supported Basal Rates", comment: "Title for supported basal rates screen") vc.indexPath = indexPath vc.delegate = self show(vc, sender: sender) @@ -375,7 +375,7 @@ final class MockPumpManagerSettingsViewController: UITableViewController { if pumpManager.state.deliverableIncrements == .custom, pumpManager.state.supportedBolusVolumes.indices.contains(1) { let bolusVolumes = pumpManager.state.supportedBolusVolumes let vc = SupportedRangeTableViewController(minValue: bolusVolumes.first!, maxValue: bolusVolumes.last!, stepSize: bolusVolumes[1] - bolusVolumes.first!) - vc.title = "Supported Bolus Volumes" + vc.title = LocalizedString("Supported Bolus Volumes", comment: "Title for supported bolus volumes screen") vc.indexPath = indexPath vc.delegate = self show(vc, sender: sender) @@ -472,7 +472,7 @@ final class MockPumpManagerSettingsViewController: UITableViewController { switch SettingsRow(rawValue: indexPath.row)! { case .lastReconciliationDate: - let resetAction = UIContextualAction(style: .normal, title: "Reset") {[weak self] _,_,_ in + let resetAction = UIContextualAction(style: .normal, title: LocalizedString("Reset", comment: "Swipe action title to reset the last reconciliation date")) {[weak self] _,_,_ in self?.pumpManager.testLastReconciliation = nil tableView.reloadRows(at: [indexPath], with: .automatic) } @@ -564,17 +564,17 @@ private extension UIAlertController { convenience init(pumpDeletionHandler handler: @escaping () -> Void) { self.init( title: nil, - message: "Are you sure you want to delete this pump?", + message: LocalizedString("Are you sure you want to delete this pump?", comment: "Confirmation message for deleting the mock pump"), preferredStyle: .actionSheet ) addAction(UIAlertAction( - title: "Delete Pump", + title: LocalizedString("Delete Pump", comment: "Button title to confirm deleting the mock pump"), style: .destructive, handler: { _ in handler() } )) - addAction(UIAlertAction(title: "Cancel", style: .cancel, handler: nil)) + addAction(UIAlertAction(title: LocalizedString("Cancel", comment: "Button title to cancel deleting the mock pump"), style: .cancel, handler: nil)) } convenience init(title: String, error: Error) { diff --git a/MockKitUI/ViewModel/MockPumpManagerSettingsViewModel.swift b/MockKitUI/ViewModel/MockPumpManagerSettingsViewModel.swift index 39a007eca..ad927fd66 100644 --- a/MockKitUI/ViewModel/MockPumpManagerSettingsViewModel.swift +++ b/MockKitUI/ViewModel/MockPumpManagerSettingsViewModel.swift @@ -26,9 +26,9 @@ class MockPumpManagerSettingsViewModel: ObservableObject { var suspendResumeInsulinDeliveryLabel: String { if isDeliverySuspended { - return "Tap to Resume Insulin Delivery" + return LocalizedString("Tap to Resume Insulin Delivery", comment: "Label for button to resume insulin delivery") } else { - return "Suspend Insulin Delivery" + return LocalizedString("Suspend Insulin Delivery", comment: "Label for button to suspend insulin delivery") } } diff --git a/MockKitUI/Views/DeliveryUncertaintyRecoveryView.swift b/MockKitUI/Views/DeliveryUncertaintyRecoveryView.swift index 5f3f31bd9..30081110f 100644 --- a/MockKitUI/Views/DeliveryUncertaintyRecoveryView.swift +++ b/MockKitUI/Views/DeliveryUncertaintyRecoveryView.swift @@ -19,7 +19,7 @@ struct DeliveryUncertaintyRecoveryView: View, HorizontalSizeClassOverride { var body: some View { NavigationView { GuidePage(content: { - Text("\(self.appName) has been unable to communicate with the Simulator Pump since \(self.uncertaintyDateLocalizedString).\n\nWithout communication, the app cannot continue to send commands for insulin delivery or display accurate, recent information about your active insulin or the insulin being delivered.") + Text("\(self.appName) has been unable to communicate with the Simulator Pump since \(self.uncertaintyDateLocalizedString).\n\nWithout communication, the app cannot continue to send commands for insulin delivery or display accurate, recent information about your active insulin or the insulin being delivered.", bundle: localizationBundle) }) { Button(action: { self.recoverCommsTapped() @@ -31,7 +31,7 @@ struct DeliveryUncertaintyRecoveryView: View, HorizontalSizeClassOverride { } } .environment(\.horizontalSizeClass, horizontalOverride) - .navigationBarTitle(Text("Comms Recovery"), displayMode: .large) + .navigationBarTitle(Text(LocalizedString("Comms Recovery", comment: "Navigation bar title for delivery uncertainty recovery screen")), displayMode: .large) .toolbar { ToolbarItem(placement: .navigationBarLeading) { backButton diff --git a/MockKitUI/Views/InsulinStatusView.swift b/MockKitUI/Views/InsulinStatusView.swift index 1cb835daf..b402b4b20 100644 --- a/MockKitUI/Views/InsulinStatusView.swift +++ b/MockKitUI/Views/InsulinStatusView.swift @@ -72,7 +72,7 @@ struct InsulinStatusView: View { .font(.system(size: 34)) .fixedSize() .foregroundColor(guidanceColors.warning) - Text("Insulin\nSuspended") + Text(LocalizedString("Insulin\nSuspended", comment: "Label shown when insulin delivery is suspended")) .font(.system(size: 14, weight: .heavy, design: .default)) .lineSpacing(0.01) .fixedSize() @@ -100,9 +100,9 @@ struct InsulinStatusView: View { } Group { if viewModel.isScheduledBasal { - Text("Scheduled\(String.nonBreakingSpace)Basal") + Text(LocalizedString("Scheduled\(String.nonBreakingSpace)Basal", comment: "Label for scheduled basal delivery")) } else if viewModel.isTempBasal { - Text("Temporary\(String.nonBreakingSpace)Basal") + Text(LocalizedString("Temporary\(String.nonBreakingSpace)Basal", comment: "Label for temporary basal delivery")) } } .font(.footnote) @@ -117,7 +117,7 @@ struct InsulinStatusView: View { .font(.system(size: 34)) .fixedSize() .foregroundColor(guidanceColors.critical) - Text("No\nDelivery") + Text(LocalizedString("No\nDelivery", comment: "Label shown when there is no insulin delivery")) .font(.system(size: 16, weight: .heavy, design: .default)) .lineSpacing(0.01) .fixedSize() @@ -135,7 +135,7 @@ struct InsulinStatusView: View { var reservoirStatus: some View { VStack(alignment: .trailing) { VStack(alignment: .leading, spacing: reservoirStatusSpacing) { - Text("Insulin\(String.nonBreakingSpace)Remaining") + Text(LocalizedString("Insulin\(String.nonBreakingSpace)Remaining", comment: "Label for insulin remaining in reservoir")) .foregroundColor(Color(UIColor.secondaryLabel)) HStack { reservoirLevelStatus @@ -167,7 +167,7 @@ struct InsulinStatusView: View { .foregroundColor(.secondary) } } - Text("Estimated Reading") + Text(LocalizedString("Estimated Reading", comment: "Label for estimated reservoir reading")) .font(.footnote) .foregroundColor(.accentColor) } diff --git a/MockKitUI/Views/MockCGMManagerSettingsView.swift b/MockKitUI/Views/MockCGMManagerSettingsView.swift index ca2ca764d..8df4f7364 100644 --- a/MockKitUI/Views/MockCGMManagerSettingsView.swift +++ b/MockKitUI/Views/MockCGMManagerSettingsView.swift @@ -49,7 +49,7 @@ struct MockCGMManagerSettingsView: View { } .insetGroupedListStyle() .navigationBarItems(trailing: doneButton) - .navigationBarTitle(Text("CGM Simulator"), displayMode: .large) + .navigationBarTitle(Text(LocalizedString("CGM Simulator", comment: "Navigation bar title for CGM simulator settings")), displayMode: .large) .alert(item: $presentedAlert, content: alert(for:)) } @@ -107,7 +107,7 @@ struct MockCGMManagerSettingsView: View { } private var expirationText: some View { - Text("Sensor expires in ") + Text(LocalizedString("Sensor expires in ", comment: "Text describing sensor expiration time")) .font(.subheadline) .foregroundColor(.secondary) } @@ -116,7 +116,7 @@ struct MockCGMManagerSettingsView: View { HStack(alignment: .lastTextBaseline) { Text("5") .font(.system(size: 24, weight: .heavy, design: .default)) - Text("days") + Text(LocalizedString("days", comment: "Unit for days")) .font(.system(size: 15, weight: .regular, design: .default)) .foregroundColor(.secondary) .offset(x: -3) @@ -144,7 +144,7 @@ struct MockCGMManagerSettingsView: View { @ViewBuilder private var lastGlucoseReading: some View { VStack(alignment: .leading, spacing: 5) { - Text("Last Reading") + Text(LocalizedString("Last Reading", comment: "Label for last glucose reading value")) .foregroundColor(.secondary) HStack(alignment: .center, spacing: 16) { @@ -172,7 +172,7 @@ struct MockCGMManagerSettingsView: View { Text("\(viewModel.lastReadingMinutesFromNow)") .font(.title) .fontWeight(.heavy) - Text("min") + Text(LocalizedString("min", comment: "Unit for minutes")) .foregroundColor(.secondary) } } @@ -182,7 +182,7 @@ struct MockCGMManagerSettingsView: View { private var notificationSubSection: some View { Section { NavigationLink(destination: DemoPlaceHolderView(appName: appName)) { - Text("Notification Settings") + Text(LocalizedString("Notification Settings", comment: "Navigation link to notification settings")) } } } @@ -190,7 +190,7 @@ struct MockCGMManagerSettingsView: View { private var settingsSubSection: some View { Section { NavigationLink(destination: MockCGMManagerControlsView(cgmManager: viewModel.cgmManager, displayGlucosePreference: displayGlucosePreference)) { - Text("Simulator Settings") + Text(LocalizedString("Simulator Settings", comment: "Navigation link to simulator settings")) } } } @@ -203,34 +203,34 @@ struct MockCGMManagerSettingsView: View { } private var deviceDetailsSubSection: some View { - Section(header: SectionHeader(label: "Sensor")) { - LabeledValueView(label: "Insertion Time", value: viewModel.sensorInsertionDateTimeString) + Section(header: SectionHeader(label: LocalizedString("Sensor", comment: "Section header for the sensor section"))) { + LabeledValueView(label: LocalizedString("Insertion Time", comment: "Label for sensor insertion time field"), value: viewModel.sensorInsertionDateTimeString) - LabeledValueView(label: "Sensor Expires", value: viewModel.sensorExpirationDateTimeString) + LabeledValueView(label: LocalizedString("Sensor Expires", comment: "Label for sensor expiration field"), value: viewModel.sensorExpirationDateTimeString) } } private var stopSensorSubSection: some View { Section { NavigationLink(destination: DemoPlaceHolderView(appName: appName)) { - Text("Stop Sensor") + Text(LocalizedString("Stop Sensor", comment: "Navigation link to stop sensor")) .foregroundColor(guidanceColors.critical) } } } private var lastReadingSection: some View { - Section(header: SectionHeader(label: "Last Reading")) { - LabeledValueView(label: "Glucose", value: viewModel.lastGlucoseValueWithUnitFormatted) - LabeledValueView(label: "Time", value: viewModel.lastGlucoseDateFormatted) - LabeledValueView(label: "Trend", value: viewModel.lastGlucoseTrendFormatted) + Section(header: SectionHeader(label: LocalizedString("Last Reading", comment: "Section header for the last reading section"))) { + LabeledValueView(label: LocalizedString("Glucose", comment: "Label for last glucose value"), value: viewModel.lastGlucoseValueWithUnitFormatted) + LabeledValueView(label: LocalizedString("Time", comment: "Label for last glucose reading time"), value: viewModel.lastGlucoseDateFormatted) + LabeledValueView(label: LocalizedString("Trend", comment: "Label for last glucose trend"), value: viewModel.lastGlucoseTrendFormatted) } } private var supportSection: some View { - Section(header: SectionHeader(label: "Support")) { + Section(header: SectionHeader(label: LocalizedString("Support", comment: "Section header for the support section"))) { NavigationLink(destination: DemoPlaceHolderView(appName: appName)) { - Text("Get help with your CGM") + Text(LocalizedString("Get help with your CGM", comment: "Navigation link to get help with CGM")) } } } @@ -243,12 +243,12 @@ struct MockCGMManagerSettingsView: View { switch presentedAlert { case .suspendInsulinDeliveryError(let error): return Alert( - title: Text("Failed to Suspend Insulin Delivery"), + title: Text(LocalizedString("Failed to Suspend Insulin Delivery", comment: "Alert title for suspend insulin delivery error")), message: Text(error.localizedDescription) ) case .resumeInsulinDeliveryError(let error): return Alert( - title: Text("Failed to Resume Insulin Delivery"), + title: Text(LocalizedString("Failed to Resume Insulin Delivery", comment: "Alert title for resume insulin delivery error")), message: Text(error.localizedDescription) ) } diff --git a/MockKitUI/Views/MockPumpManagerSettingsView.swift b/MockKitUI/Views/MockPumpManagerSettingsView.swift index c06900e97..1d8c24703 100644 --- a/MockKitUI/Views/MockPumpManagerSettingsView.swift +++ b/MockKitUI/Views/MockPumpManagerSettingsView.swift @@ -98,7 +98,7 @@ struct MockPumpManagerSettingsView: View { } private var expirationText: some View { - Text("Pump expires in ") + Text(LocalizedString("Pump expires in ", comment: "Text describing pump expiration time")) .font(.subheadline) .foregroundColor(.secondary) } @@ -107,7 +107,7 @@ struct MockPumpManagerSettingsView: View { HStack(alignment: .lastTextBaseline) { Text("2") .font(.system(size: 24, weight: .heavy, design: .default)) - Text("days") + Text(LocalizedString("days", comment: "Unit for days")) .font(.system(size: 15, weight: .regular, design: .default)) .foregroundColor(.secondary) .offset(x: -3) @@ -178,12 +178,12 @@ struct MockPumpManagerSettingsView: View { private var deviceDetailsSubSection: some View { Section { - LabeledValueView(label: "Pump Paired", value: viewModel.lastPumpPairedDateTimeString) - - LabeledValueView(label: "Pump Expires", value: viewModel.pumpExpirationDateTimeString) + LabeledValueView(label: LocalizedString("Pump Paired", comment: "Label for pump paired date/time field"), value: viewModel.lastPumpPairedDateTimeString) + + LabeledValueView(label: LocalizedString("Pump Expires", comment: "Label for pump expiration date/time field"), value: viewModel.pumpExpirationDateTimeString) NavigationLink(destination: DemoPlaceHolderView(appName: appName)) { - Text("Device Details") + Text(LocalizedString("Device Details", comment: "Navigation link to device details")) } } } @@ -191,7 +191,7 @@ struct MockPumpManagerSettingsView: View { private var replaceSystemComponentsSubSection: some View { Section { NavigationLink(destination: DemoPlaceHolderView(appName: appName)) { - Text("Replace Pump") + Text(LocalizedString("Replace Pump", comment: "Navigation link to replace pump")) .foregroundColor(.accentColor) } } @@ -200,7 +200,7 @@ struct MockPumpManagerSettingsView: View { private var settingsSubSection: some View { Section { NavigationLink(destination: MockPumpManagerControlsView(pumpManager: viewModel.pumpManager, supportedInsulinTypes: supportedInsulinTypes)) { - Text("Simulator Settings") + Text(LocalizedString("Simulator Settings", comment: "Navigation link to simulator settings")) } } } @@ -213,23 +213,23 @@ struct MockPumpManagerSettingsView: View { } private var notificationSubSection: some View { - Section(header: SectionHeader(label: "Configuration")) { + Section(header: SectionHeader(label: LocalizedString("Configuration", comment: "Section header for the configuration section"))) { NavigationLink(destination: DemoPlaceHolderView(appName: appName)) { - Text("Notification Settings") + Text(LocalizedString("Notification Settings", comment: "Navigation link to notification settings")) } } } private var pumpTimeSubSection: some View { Section { - TimeView(label: "Pump Time") + TimeView(label: LocalizedString("Pump Time", comment: "Label for pump time field")) } } - + private var supportSection: some View { - Section(header: SectionHeader(label: "Support")) { + Section(header: SectionHeader(label: LocalizedString("Support", comment: "Section header for the support section"))) { NavigationLink(destination: DemoPlaceHolderView(appName: appName)) { - Text("Get help with your pump") + Text(LocalizedString("Get help with your pump", comment: "Navigation link to get help with pump")) } } } @@ -242,12 +242,12 @@ struct MockPumpManagerSettingsView: View { switch presentedAlert { case .suspendInsulinDeliveryError(let error): return Alert( - title: Text("Failed to Suspend Insulin Delivery"), + title: Text(LocalizedString("Failed to Suspend Insulin Delivery", comment: "Alert title for suspend insulin delivery error")), message: Text(error.localizedDescription) ) case .resumeInsulinDeliveryError(let error): return Alert( - title: Text("Failed to Resume Insulin Delivery"), + title: Text(LocalizedString("Failed to Resume Insulin Delivery", comment: "Alert title for resume insulin delivery error")), message: Text(error.localizedDescription) ) }