Просмотр исходного кода

Change wording from Non-Pump to External

Brian Wieder 2 лет назад
Родитель
Сommit
7aef5c6f73

+ 3 - 3
FreeAPS/Sources/APS/Storage/PumpHistoryStorage.swift

@@ -45,7 +45,7 @@ final class BasePumpHistoryStorage: PumpHistoryStorage, Injectable {
                         rate: nil,
                         temp: nil,
                         carbInput: nil,
-                        isNonPumpInsulin: dose.manuallyEntered
+                        isExternalInsulin: dose.manuallyEntered
                     )]
                 case .tempBasal:
                     guard let dose = event.dose else { return [] }
@@ -211,8 +211,8 @@ final class BasePumpHistoryStorage: PumpHistoryStorage, Injectable {
     }
 
     func determineBolusEventType(for event: PumpHistoryEvent) -> EventType {
-        if event.isNonPumpInsulin ?? false {
-            return .nonPumpInsulin
+        if event.isExternalInsulin ?? false {
+            return .externalInsulin
         }
         return event.type
     }

+ 1 - 4
FreeAPS/Sources/Localizations/Main/en.lproj/Localizable.strings

@@ -614,9 +614,6 @@ Enact a temp Basal or a temp target */
 /* Automatic delivered treatments */
 "Automatic" = "Automatic";
 
-/* Non-pump insulin treatments */
-"Non-Pump" = "Non-Pump";
-
 /* External insulin treatments */
 "External" = "External";
 
@@ -1224,7 +1221,7 @@ Enact a temp Basal or a temp target */
 "SMB" = "SMB";
 
 /* A manually entered dose of non-pump insulin */
-"Non-pump Insulin" = "Non-pump Insulin";
+"External Insulin" = "External Insulin";
 
 /* Status highlight when manual temp basal is running. */
 "Manual Basal" = "Manual Basal";

+ 5 - 5
FreeAPS/Sources/Models/PumpHistoryEvent.swift

@@ -11,7 +11,7 @@ struct PumpHistoryEvent: JSON, Equatable {
     let temp: TempType?
     let carbInput: Int?
     let note: String?
-    let isNonPumpInsulin: Bool?
+    let isExternalInsulin: Bool?
 
     init(
         id: String,
@@ -24,7 +24,7 @@ struct PumpHistoryEvent: JSON, Equatable {
         temp: TempType? = nil,
         carbInput: Int? = nil,
         note: String? = nil,
-        isNonPumpInsulin: Bool? = nil
+        isExternalInsulin: Bool? = nil
     ) {
         self.id = id
         self.type = type
@@ -36,13 +36,13 @@ struct PumpHistoryEvent: JSON, Equatable {
         self.temp = temp
         self.carbInput = carbInput
         self.note = note
-        self.isNonPumpInsulin = isNonPumpInsulin
+        self.isExternalInsulin = isExternalInsulin
     }
 }
 
 enum EventType: String, JSON {
     case bolus = "Bolus"
-    case nonPumpInsulin = "Non-pump Insulin"
+    case externalInsulin = "External Insulin"
     case mealBolus = "Meal Bolus"
     case correctionBolus = "Correction Bolus"
     case snackBolus = "Snack Bolus"
@@ -84,6 +84,6 @@ extension PumpHistoryEvent {
         case temp
         case carbInput = "carb_input"
         case note
-        case isNonPumpInsulin
+        case isExternalInsulin
     }
 }

+ 1 - 1
FreeAPS/Sources/Modules/Bolus/BolusStateModel.swift

@@ -84,7 +84,7 @@ extension Bolus {
                         rate: nil,
                         temp: nil,
                         carbInput: nil,
-                        isNonPumpInsulin: true
+                        isExternalInsulin: true
                     )
                 ]
             )

+ 5 - 5
FreeAPS/Sources/Modules/DataTable/DataTableDataFlow.swift

@@ -66,7 +66,7 @@ enum DataTable {
         let isFPU: Bool?
         let fpuID: String?
         let note: String?
-        let isNonPump: Bool?
+        let isExternal: Bool?
 
         private var numberFormatter: NumberFormatter {
             let formatter = NumberFormatter()
@@ -94,7 +94,7 @@ enum DataTable {
             isFPU: Bool? = false,
             fpuID: String? = nil,
             note: String? = nil,
-            isNonPump: Bool? = nil
+            isExternal: Bool? = nil
         ) {
             self.units = units
             self.type = type
@@ -107,7 +107,7 @@ enum DataTable {
             self.isFPU = isFPU
             self.fpuID = fpuID
             self.note = note
-            self.isNonPump = isNonPump
+            self.isExternal = isExternal
         }
 
         static func == (lhs: Treatment, rhs: Treatment) -> Bool {
@@ -136,8 +136,8 @@ enum DataTable {
             case .bolus:
                 var bolusText = ""
 
-                if isNonPump ?? false {
-                    bolusText += " " + NSLocalizedString("Non-Pump", comment: "Non-pump Insulin")
+                if isExternal ?? false {
+                    bolusText += " " + NSLocalizedString("External", comment: "External Insulin")
                 }
 
                 return numberFormatter

+ 1 - 1
FreeAPS/Sources/Modules/DataTable/DataTableStateModel.swift

@@ -72,7 +72,7 @@ extension DataTable {
                             date: $0.timestamp,
                             amount: $0.amount,
                             idPumpEvent: $0.id,
-                            isNonPump: $0.isNonPumpInsulin
+                            isExternal: $0.isExternalInsulin
                         )
                     }