Browse Source

Add new strings to l18n catalog

Mike Plante 1 year ago
parent
commit
c3e2c21729

+ 27 - 3
Trio/Sources/Localizations/Main/Localizable.xcstrings

@@ -33499,6 +33499,9 @@
         }
         }
       }
       }
     },
     },
+    "Applied Factors" : {
+
+    },
     "Apply a Temporary Target" : {
     "Apply a Temporary Target" : {
       "localizations" : {
       "localizations" : {
         "bg" : {
         "bg" : {
@@ -36466,6 +36469,9 @@
         }
         }
       }
       }
     },
     },
+    "Available IOB:" : {
+
+    },
     "Available Layouts:" : {
     "Available Layouts:" : {
       "localizations" : {
       "localizations" : {
         "bg" : {
         "bg" : {
@@ -39869,6 +39875,9 @@
         }
         }
       }
       }
     },
     },
+    "Bolus Calculator Details" : {
+
+    },
     "Bolus cancelled successfully." : {
     "Bolus cancelled successfully." : {
       "comment" : "Success message for canceling a bolus",
       "comment" : "Success message for canceling a bolus",
       "localizations" : {
       "localizations" : {
@@ -44913,6 +44922,9 @@
         }
         }
       }
       }
     },
     },
+    "Carbs On Board (COB)" : {
+
+    },
     "Carbs Req Threshold" : {
     "Carbs Req Threshold" : {
       "comment" : "Headline \"Carbs Req Threshold\"",
       "comment" : "Headline \"Carbs Req Threshold\"",
       "extractionState" : "manual",
       "extractionState" : "manual",
@@ -64448,9 +64460,6 @@
         }
         }
       }
       }
     },
     },
-    "Detailed Bolus Calculations" : {
-
-    },
     "Detailed Calculation Steps" : {
     "Detailed Calculation Steps" : {
       "extractionState" : "stale",
       "extractionState" : "stale",
       "localizations" : {
       "localizations" : {
@@ -89087,6 +89096,9 @@
         }
         }
       }
       }
     },
     },
+    "Glucose Calculation" : {
+
+    },
     "Glucose Chart Type" : {
     "Glucose Chart Type" : {
 
 
     },
     },
@@ -90636,6 +90648,9 @@
         }
         }
       }
       }
     },
     },
+    "Glucose Trend (15 min)" : {
+
+    },
     "Glucose units" : {
     "Glucose units" : {
       "extractionState" : "manual",
       "extractionState" : "manual",
       "localizations" : {
       "localizations" : {
@@ -100821,6 +100836,9 @@
         }
         }
       }
       }
     },
     },
+    "Insulin On Board (IOB)" : {
+
+    },
     "Insulin Peak Time" : {
     "Insulin Peak Time" : {
       "comment" : "Insulin Peak Time",
       "comment" : "Insulin Peak Time",
       "localizations" : {
       "localizations" : {
@@ -104710,6 +104728,9 @@
         }
         }
       }
       }
     },
     },
+    "Last loop was > 15 mins ago." : {
+
+    },
     "Last loop was more than %d min ago" : {
     "Last loop was more than %d min ago" : {
       "comment" : "Last loop was more than %d min ago",
       "comment" : "Last loop was more than %d min ago",
       "localizations" : {
       "localizations" : {
@@ -112528,6 +112549,9 @@
         }
         }
       }
       }
     },
     },
+    "Max Bolus = %@ U" : {
+
+    },
     "Max Bolus exceeded!" : {
     "Max Bolus exceeded!" : {
       "comment" : "\"Max Bolus Exceeded label\"",
       "comment" : "\"Max Bolus Exceeded label\"",
       "extractionState" : "manual",
       "extractionState" : "manual",

+ 15 - 27
Trio/Sources/Modules/Treatments/View/PopupView.swift

@@ -138,7 +138,7 @@ struct PopupView: View {
                 .padding(.top)
                 .padding(.top)
             }
             }
             .padding([.horizontal, .bottom])
             .padding([.horizontal, .bottom])
-            .navigationBarTitle("Detailed Bolus Calculations", displayMode: .inline)
+            .navigationBarTitle(String(localized: "Bolus Calculator Details"), displayMode: .inline)
             .presentationDetents(
             .presentationDetents(
                 [.fraction(0.9), .large],
                 [.fraction(0.9), .large],
                 selection: $calcPopupDetent
                 selection: $calcPopupDetent
@@ -169,7 +169,7 @@ struct PopupView: View {
     // MARK: - Individual Cards
     // MARK: - Individual Cards
 
 
     var glucoseCard: some View {
     var glucoseCard: some View {
-        calculationCardView("Glucose Calculation") {
+        calculationCardView(String(localized: "Glucose Calculation")) {
             Grid {
             Grid {
                 // Row 1: Titles
                 // Row 1: Titles
                 GridRow(alignment: .bottom) {
                 GridRow(alignment: .bottom) {
@@ -224,7 +224,7 @@ struct PopupView: View {
     }
     }
 
 
     var iobCard: some View {
     var iobCard: some View {
-        calculationCardView("Insulin On Board (IOB)") {
+        calculationCardView(String(localized: "Insulin On Board (IOB)")) {
             Grid {
             Grid {
                 // Row 1: Titles
                 // Row 1: Titles
                 GridRow(alignment: .bottom) {
                 GridRow(alignment: .bottom) {
@@ -264,7 +264,7 @@ struct PopupView: View {
     }
     }
 
 
     var cobCard: some View {
     var cobCard: some View {
-        calculationCardView("Carbs On Board (COB)") {
+        calculationCardView(String(localized: "Carbs On Board (COB)")) {
             let exceededMaxCOB: Bool = Decimal(state.cob) + state.carbs > state.maxCOB
             let exceededMaxCOB: Bool = Decimal(state.cob) + state.carbs > state.maxCOB
             Grid {
             Grid {
                 // Row 1: COB breakdown calculation title
                 // Row 1: COB breakdown calculation title
@@ -375,7 +375,7 @@ struct PopupView: View {
     }
     }
 
 
     var deltaCard: some View {
     var deltaCard: some View {
-        calculationCardView("Glucose Trend (15 min)") {
+        calculationCardView(String(localized: "Glucose Trend (15 min)")) {
             Grid {
             Grid {
                 // Row 1: Titles
                 // Row 1: Titles
                 GridRow(alignment: .bottom) {
                 GridRow(alignment: .bottom) {
@@ -417,7 +417,7 @@ struct PopupView: View {
     }
     }
 
 
     var fullBolusCard: some View {
     var fullBolusCard: some View {
-        calculationCardView("Full Bolus") {
+        calculationCardView(String(localized: "Full Bolus")) {
             Grid {
             Grid {
                 if isDeviceSmallOrTextEnlarged {
                 if isDeviceSmallOrTextEnlarged {
                     // Row 1: Titles
                     // Row 1: Titles
@@ -526,7 +526,7 @@ struct PopupView: View {
     }
     }
 
 
     var superBolusCard: some View {
     var superBolusCard: some View {
-        calculationCardView("Super Bolus") {
+        calculationCardView(String(localized: "Super Bolus")) {
             Grid {
             Grid {
                 // Row 1: Titles
                 // Row 1: Titles
                 GridRow(alignment: .bottom) {
                 GridRow(alignment: .bottom) {
@@ -568,7 +568,7 @@ struct PopupView: View {
     // MARK: - Refactored Factors Card
     // MARK: - Refactored Factors Card
 
 
     var factorsCard: some View {
     var factorsCard: some View {
-        calculationCardView("Applied Factors") {
+        calculationCardView(String(localized: "Applied Factors")) {
             Grid {
             Grid {
                 // Choose the layout based on which factors are active
                 // Choose the layout based on which factors are active
                 switch (state.useSuperBolus, state.useFattyMealCorrectionFactor) {
                 switch (state.useSuperBolus, state.useFattyMealCorrectionFactor) {
@@ -717,17 +717,17 @@ struct PopupView: View {
                         // Left column
                         // Left column
                         VStack {
                         VStack {
                             if isLoopStale {
                             if isLoopStale {
-                                limitWarning("Last loop was > 15 mins ago.")
+                                limitWarning(String(localized: "Last loop was > 15 mins ago."))
                             } else if state.currentBG < 54 {
                             } else if state.currentBG < 54 {
-                                limitWarning("Glucose is very low.")
+                                limitWarning(String(localized: "Glucose is very low."))
                             } else if state.minPredBG < 54 {
                             } else if state.minPredBG < 54 {
-                                limitWarning("Glucose forecast is very low.")
+                                limitWarning(String(localized: "Glucose forecast is very low."))
                             } else if state.factoredInsulin > state.maxBolus, state.maxBolus <= iobAvailable {
                             } else if state.factoredInsulin > state.maxBolus, state.maxBolus <= iobAvailable {
-                                limitWarning("Max Bolus = \(insulinFormatter(state.maxBolus)) U")
+                                limitWarning(String(localized: "Max Bolus = \(insulinFormatter(state.maxBolus)) U"))
                             } else if state.factoredInsulin > 0 {
                             } else if state.factoredInsulin > 0 {
                                 if state.factoredInsulin > iobAvailable {
                                 if state.factoredInsulin > iobAvailable {
                                     // Available IOB row
                                     // Available IOB row
-                                    limitWarning("Available IOB:")
+                                    limitWarning(String(localized: "Available IOB:"))
 
 
                                     // Formula row with simplified alignment
                                     // Formula row with simplified alignment
                                     HStack(alignment: .center) {
                                     HStack(alignment: .center) {
@@ -735,36 +735,24 @@ struct PopupView: View {
                                             "(\(insulinFormatter(state.iob)))" : insulinFormatter(state.iob)
                                             "(\(insulinFormatter(state.iob)))" : insulinFormatter(state.iob)
 
 
                                         Text("\(insulinFormatter(state.maxIOB))").valueStyle()
                                         Text("\(insulinFormatter(state.maxIOB))").valueStyle()
-
                                         Text("-").operatorStyle()
                                         Text("-").operatorStyle()
-
                                         Text("\(iobFormatted)").valueStyle()
                                         Text("\(iobFormatted)").valueStyle()
-
                                         Text("=").operatorStyle()
                                         Text("=").operatorStyle()
-
                                         Text("\(insulinFormatter(iobAvailable)) U")
                                         Text("\(insulinFormatter(iobAvailable)) U")
                                             .font(.subheadline)
                                             .font(.subheadline)
                                             .foregroundStyle(.red)
                                             .foregroundStyle(.red)
                                             .minimumScaleFactor(0.5)
                                             .minimumScaleFactor(0.5)
-
                                         Spacer()
                                         Spacer()
                                     }
                                     }
                                     .multilineTextAlignment(.center)
                                     .multilineTextAlignment(.center)
 
 
                                     // Description row with simplified alignment
                                     // Description row with simplified alignment
                                     HStack(alignment: .center) {
                                     HStack(alignment: .center) {
-                                        Text("Max IOB")
-                                            .tertiaryLabel()
-
+                                        Text("Max IOB").tertiaryLabel()
                                         Text("")
                                         Text("")
-
-                                        Text("IOB")
-                                            .tertiaryLabel()
-
+                                        Text("IOB").tertiaryLabel()
                                         Text("")
                                         Text("")
-
                                         Text("")
                                         Text("")
-
                                         Spacer()
                                         Spacer()
                                     }
                                     }
                                     .multilineTextAlignment(.center)
                                     .multilineTextAlignment(.center)