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

Rewrite forecasted-low alert copy and rename type to Low Glucose Soon

trioneer пре 2 недеља
родитељ
комит
aed7308f55

+ 69 - 40
Trio/Sources/Localizations/Main/Localizable.xcstrings

@@ -4822,6 +4822,9 @@
         }
       }
     },
+    "– –" : {
+
+    },
     ", %lld%%" : {
       "localizations" : {
         "bg" : {
@@ -54889,6 +54892,9 @@
         }
       }
     },
+    "Basal Profile Mismatch" : {
+
+    },
     "Basal Rate" : {
       "localizations" : {
         "bg" : {
@@ -55764,9 +55770,6 @@
         }
       }
     },
-    "Battery Empty" : {
-
-    },
     "Battery is running low %@, consider charging your %@ device as soon as possible" : {
       "comment" : "Battery is running low %@, consider charging your %@ device as soon as possible",
       "extractionState" : "manual",
@@ -55899,9 +55902,6 @@
         }
       }
     },
-    "Battery Low" : {
-
-    },
     "Be warned of connectivity or looping issues." : {
       "localizations" : {
         "bg" : {
@@ -57152,6 +57152,9 @@
         }
       }
     },
+    "Blood Glucose Reminder" : {
+
+    },
     "Blood Glucose Test" : {
       "comment" : "Add Blood Glucose Test, headerAdd Blood Glucose Test, header",
       "extractionState" : "manual",
@@ -59327,9 +59330,6 @@
         }
       }
     },
-    "Bolus Failed" : {
-
-    },
     "Bolus failed or inaccurate. Check pump history before repeating." : {
       "comment" : "Bolus failed or inaccurate. Check pump history before repeating.",
       "extractionState" : "stale",
@@ -81817,7 +81817,7 @@
       }
     },
     "d" : {
-      "comment" : "abbreviation for days",
+      "comment" : "Abbreviation for Days\nabbreviation for days",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -93419,9 +93419,6 @@
         }
       }
     },
-    "Delivery Uncertain" : {
-
-    },
     "Delta" : {
       "localizations" : {
         "bg" : {
@@ -94817,6 +94814,9 @@
     "Device Expired" : {
 
     },
+    "Device Shutdown Imminent" : {
+
+    },
     "Devices" : {
       "comment" : "Devices menu item in the Settings main view.",
       "localizations" : {
@@ -101286,6 +101286,9 @@
         }
       }
     },
+    "Drives the outer-ring + tag on the home screen's glucose bobble." : {
+
+    },
     "Due to how the curve is calculated when using the Sigmoid Formula, increasing this setting has a different impact on the steepness of the curve than in the standard logarithmic Dynamic ISF calculation. Use caution when adjusting this setting." : {
       "localizations" : {
         "bg" : {
@@ -124162,7 +124165,7 @@
         }
       }
     },
-    "Forecast +%1$d min %2$@, at or below limit %3$@." : {
+    "Forecast +%1$d min %2$@." : {
 
     },
     "Forecast Display Type" : {
@@ -125811,6 +125814,7 @@
       }
     },
     "FreeStyle Libre" : {
+      "extractionState" : "stale",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -125934,6 +125938,12 @@
         }
       }
     },
+    "FreeStyle Libre 1 / 2 / 2+" : {
+
+    },
+    "FreeStyle Libre 3 / 3+" : {
+
+    },
     "Frequency" : {
 
     },
@@ -128194,13 +128204,8 @@
         }
       }
     },
-    "Glucose %1$@ at or above %2$@." : {
-      "comment" : "Alert body text for high glucose.",
-      "isCommentAutoGenerated" : true
-    },
-    "Glucose %1$@ at or below %2$@." : {
-      "comment" : "Alert body text for low/urgentLow glucose alerts.",
-      "isCommentAutoGenerated" : true
+    "Glucose %1$@." : {
+
     },
     "Glucose Alarms" : {
       "comment" : "The title of the glucose alarms screen.",
@@ -128832,9 +128837,6 @@
         }
       }
     },
-    "Glucose Data Stale" : {
-
-    },
     "Glucose Data used for statistics" : {
       "comment" : "Debug option view Glucose Data used for statistics",
       "extractionState" : "manual",
@@ -133007,7 +133009,7 @@
       }
     },
     "h" : {
-      "comment" : "abbreviation for hours\nh",
+      "comment" : "Abbreviation for Hours\nabbreviation for hours\nh",
       "localizations" : {
         "bg" : {
           "stringUnit" : {
@@ -133387,9 +133389,6 @@
         }
       }
     },
-    "Hardware Fault" : {
-
-    },
     "Has to be > 0 and <= 1.\nDefault is 0.65 (65 %) * TDD. The rest will be from average of total data (up to 14 days) of all TDD calculations (35 %). To only use past 24 hours, set this to 1.\n\nTo avoid sudden fluctuations, for instance after a big meal, an average of the past 2 hours of TDD calculations is used instead of just the current TDD (past 24 hours at this moment)." : {
       "comment" : "Weight of past 24 hours of insulin",
       "extractionState" : "manual",
@@ -146271,6 +146270,12 @@
         }
       }
     },
+    "Insulin Limit Reached" : {
+
+    },
+    "Insulin Limit Warning" : {
+
+    },
     "Insulin on Board (IOB)" : {
       "comment" : "Live Activity widget icon label for Insulin on Board (IOB)"
     },
@@ -147033,6 +147038,9 @@
         }
       }
     },
+    "Insulin Resume Reminder" : {
+
+    },
     "Insulin Sensitivities" : {
       "localizations" : {
         "bg" : {
@@ -158739,9 +158747,6 @@
         }
       }
     },
-    "Loop Not Running" : {
-
-    },
     "Loop statistics will appear here once data is available." : {
       "localizations" : {
         "bg" : {
@@ -189019,6 +189024,9 @@
         }
       }
     },
+    "On by default for all CGM or apps that handle glucose alerts (all Dexcom CGMs, xDrip4iOS). Turn off if you've disabled those and want Trio to alert you instead." : {
+
+    },
     "Once a day (or after a new build is installed), Trio sends a small JSON object to a self-hosted endpoint maintained by the Trio team. No third-party analytics service is involved." : {
 
     },
@@ -194597,6 +194605,9 @@
         }
       }
     },
+    "Pairing Failed" : {
+
+    },
     "Pairinginfo" : {
       "extractionState" : "manual",
       "localizations" : {
@@ -202205,7 +202216,13 @@
         }
       }
     },
-    "Pump & CGM Alarms" : {
+    "Pump Alarms" : {
+
+    },
+    "Pump Battery Empty" : {
+
+    },
+    "Pump Battery Low" : {
 
     },
     "Pump config" : {
@@ -202712,6 +202729,9 @@
         }
       }
     },
+    "Pump Fault" : {
+
+    },
     "Pump History" : {
       "comment" : "Debug option view Pump History",
       "extractionState" : "manual",
@@ -212009,6 +212029,9 @@
         }
       }
     },
+    "RileyLink Battery Low" : {
+
+    },
     "Ring Gap" : {
       "localizations" : {
         "bg" : {
@@ -214917,6 +214940,9 @@
         }
       }
     },
+    "Scenario" : {
+
+    },
     "Schedule " : {
       "extractionState" : "manual",
       "localizations" : {
@@ -219845,9 +219871,6 @@
         }
       }
     },
-    "Sensor Failure" : {
-
-    },
     "Sensor Footer checksum" : {
       "extractionState" : "manual",
       "localizations" : {
@@ -220110,6 +220133,9 @@
         }
       }
     },
+    "Sensor Lifecycle Scenario" : {
+
+    },
     "Sensor might have temporarily stopped, fallen off or is too cold or too warm" : {
       "comment" : "ensor might have temporarily stopped, fallen off or is too cold or too warm",
       "extractionState" : "manual",
@@ -223424,6 +223450,9 @@
         }
       }
     },
+    "Setup Incomplete" : {
+
+    },
     "Setup Nightscout for Trio" : {
       "localizations" : {
         "bg" : {
@@ -226307,9 +226336,6 @@
         }
       }
     },
-    "Shutdown Imminent" : {
-
-    },
     "Sigmoid" : {
       "localizations" : {
         "bg" : {
@@ -238003,7 +238029,7 @@
         }
       }
     },
-    "Suspend Time Expired" : {
+    "Suspend In Progress" : {
 
     },
     "Suspend Zeros IOB" : {
@@ -250546,7 +250572,7 @@
     "These two times define the Day and Night windows. Each alarm's Active setting picks one — Day & Night, Day only, or Night only — and only fires when that window is current." : {
 
     },
-    "These windows are shared between Glucose Alarms and Pump & CGM Alarms." : {
+    "These windows are shared between Glucose Alarms and Pump Alarms." : {
 
     },
     "This 15% minimum is a safety limit taken from oref (OpenAPS reference design) and AndroidAPS. It helps prevent insulin delivery from dropping to unsafe levels." : {
@@ -276948,6 +276974,9 @@
         }
       }
     },
+    "Use CGM App Alerts" : {
+
+    },
     "Use Custom Peak Time" : {
       "comment" : "Use Custom Peak Time",
       "localizations" : {

+ 1 - 1
Trio/Sources/Models/GlucoseAlerts/GlucoseAlertType.swift

@@ -30,7 +30,7 @@ enum GlucoseAlertType: String, Codable, CaseIterable, Identifiable {
         switch self {
         case .urgentLow: return String(localized: "Urgent Low Glucose")
         case .low: return String(localized: "Low Glucose")
-        case .forecastedLow: return String(localized: "Forecasted Low Glucose")
+        case .forecastedLow: return String(localized: "Low Glucose Soon")
         case .high: return String(localized: "High Glucose")
         }
     }

+ 2 - 2
Trio/Sources/Services/Alerts/GlucoseAlertCoordinator.swift

@@ -299,8 +299,8 @@ final class GlucoseAlertCoordinator: Injectable {
             )
         case .forecastedLow:
             return String(
-                format: String(localized: "Forecast +%1$d min %2$@."),
-                ForecastedGlucoseEvaluator.defaultHorizonMinutes, valueString, limitString
+                format: String(localized: "Your glucose may go below %2$@ in %1$d min."),
+                ForecastedGlucoseEvaluator.defaultHorizonMinutes, limitString
             )
         case .high:
             return String(