Преглед изворни кода

Revert the revert of #813

plus apply linting introduced from #705 (0.6.0.7)
Mike Plante пре 6 месеци
родитељ
комит
34cbd6e17e

+ 1 - 21
Trio/Sources/Localizations/Main/Localizable.xcstrings

@@ -10037,6 +10037,7 @@
       }
     },
     "%lld h" : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -11458,16 +11459,6 @@
         }
       }
     },
-    "• An ISF of %@ means 1 U lowers your glucose by %@" : {
-      "localizations" : {
-        "en" : {
-          "stringUnit" : {
-            "state" : "new",
-            "value" : "• An ISF of %1$@ means 1 U lowers your glucose by %2$@"
-          }
-        }
-      }
-    },
     "• Basal Rate" : {
       "localizations" : {
         "bg" : {
@@ -22486,16 +22477,6 @@
         }
       }
     },
-    "45 %@ / %@ = %@ %@" : {
-      "localizations" : {
-        "en" : {
-          "stringUnit" : {
-            "state" : "new",
-            "value" : "45 %1$@ / %2$@ = %3$@ %4$@"
-          }
-        }
-      }
-    },
     "50% is half effect:" : {
       "localizations" : {
         "bg" : {
@@ -51619,7 +51600,6 @@
       }
     },
     "Basal profile covers 24 hours. You cannot add more rates. Please remove or adjust existing rates to make space." : {
-      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {

+ 1 - 1
Trio/Sources/Modules/Onboarding/View/OnboardingSteps/TherapySettings/CarbRatioStepView.swift

@@ -86,7 +86,7 @@ struct CarbRatioStepView: View {
                                             .carbRatioRateValues[state.carbRatioItems.first!.rateIndex] as NSNumber
                                     )
                                 Text(
-                                    "45 \(String(localized: "g", comment: "Gram abbreviation")) / \(formatter.string(from: state.carbRatioRateValues[state.carbRatioItems.first!.rateIndex] as NSNumber) ?? "--")  = \(String(format: "%.1f", insulinNeeded))" +
+                                    "45 \(String(localized: "g", comment: "Gram abbreviation")) / \(formatter.string(from: state.carbRatioRateValues[state.carbRatioItems.first!.rateIndex] as NSNumber) ?? "--") \(String(localized: "g/U")) = \(String(format: "%.1f", insulinNeeded))" +
                                         " " + String(localized: "U", comment: "Insulin unit abbreviation")
                                 )
                                 .font(.system(.body, design: .monospaced))

+ 2 - 3
Trio/Sources/Modules/Onboarding/View/OnboardingSteps/TherapySettings/InsulinSensitivityStepView.swift

@@ -113,10 +113,9 @@ struct InsulinSensitivityStepView: View {
                                 .padding(.horizontal)
 
                             VStack(alignment: .leading, spacing: 4) {
-                                let isfValue = "\(state.units == .mgdL ? Decimal(50) : 50.asMmolL)" +
-                                    "\(state.units.rawValue)"
+                                let isfValue = "\(state.units == .mgdL ? Decimal(50) : 50.asMmolL)"
                                 Text(
-                                    "• An ISF of \(isfValue) means 1 U lowers your glucose by \(isfValue)"
+                                    "• An ISF of \(isfValue) \(state.units.rawValue)/U means 1 U lowers your glucose by \(isfValue) \(state.units.rawValue)"
                                 )
                                 Text("• A lower number means you're less sensitive (more resistant) to insulin")
                                 Text("• A higher number means you're more sensitive (less resistant) to insulin")

+ 1 - 1
Trio/Sources/Modules/Stat/View/ViewElements/Insulin/BolusStatsView.swift

@@ -329,7 +329,7 @@ private struct BolusSelectionPopover: View {
     private func xOffset() -> CGFloat {
         // If the selected date is outside the visible domain, hide the popover
         guard selectedDate >= domain.start && selectedDate <= domain.end else { return 0 }
-        
+
         let domainDuration = domain.end.timeIntervalSince(domain.start)
         guard domainDuration > 0, chartWidth > 0 else { return 0 }