You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LOOP-3785 Limits on bg input, additional warnings. (#444)
* Add glucose range restriction, and move max bolus warning earlier
* Add carbohydrateEntryTooLarge warning
* Cleanup alerts that happened after action button; now showing warnings instead
* Reorder enum to be alphabetical
letmessage=String(format:NSLocalizedString("Authenticate to Bolus %@ Units", comment:"The message displayed during a device authentication prompt for bolus specification"),enteredBolusAmount)
340
+
letmessage=String(format:NSLocalizedString("Authenticate to Bolus %@ Units", comment:"The message displayed during a device authentication prompt for bolus specification"),enteredBolusString)
fatalError("Impossible to exceed max bolus without a configured max bolus")
281
-
}
282
-
returnSwiftUI.Alert(
283
-
title:Text("Exceeds Maximum Bolus", comment:"Alert title for a maximum bolus validation error"),
284
-
message:Text(String(format:NSLocalizedString("The maximum bolus amount is %1$@ U.", comment:"Format string for maximum bolus exceeded alert (1: maximumBolusAmount)"), maximumBolusAmountString))
285
-
)
286
285
case.carbEntryPersistenceFailure:
287
286
returnSwiftUI.Alert(
288
287
title:Text("Unable to Save Carb Entry", comment:"Alert title for a carb entry persistence error"),
289
288
message:Text("An error occurred while trying to save your carb entry.", comment:"Alert message for a carb entry persistence error")
290
289
)
291
-
case.carbEntrySizeTooLarge:
292
-
letmessage=String(
293
-
format:NSLocalizedString("The maximum allowed amount is %1$@ grams", comment:"Alert body displayed for quantity greater than max (1: maximum quantity in grams)"),
title:Text("Glucose Entry Out of Range", comment:"Alert title for a manual glucose entry out of range error"),
306
-
message:Text(String(format:NSLocalizedString("A manual glucose entry must be between %1$@ and %2$@", comment:"Alert message for a manual glucose entry out of range error. (1: acceptable lower bound) (2: acceptable upper bound)"), acceptableLowerBound, acceptableUpperBound))
307
-
)
308
290
case.manualGlucoseEntryPersistenceFailure:
309
291
returnSwiftUI.Alert(
310
292
title:Text("Unable to Save Manual Glucose Entry", comment:"Alert title for a manual glucose entry persistence error"),
caption:Text(String(format:NSLocalizedString("Your glucose is below your glucose safety limit, %1$@.", comment:"Format string for bolus screen warning when no bolus is recommended due input value below glucose safety limit. (1: suspendThreshold)"), suspendThresholdString))
title:Text("Low Glucose", comment:"Title for bolus screen warning when glucose is below glucose warning limit."),
338
320
caption:Text(String(format:NSLocalizedString("Your glucose is below %1$@. Are you sure you want to bolus?", comment:"Format string for simple bolus screen warning when glucose is below glucose warning limit."), warningThresholdString))
caption =NSLocalizedString("Your glucose is low. Eat carbs and consider waiting to bolus until your glucose is in a safe range.", comment:"Format string for meal bolus screen warning when no bolus is recommended due to glucose input value below recommendation threshold")
344
326
}else{
345
-
caption =NSLocalizedString("Your glucose is low. Eat carbs and monitor closely.", comment:"Format string for bolus screen warning when no bolus is recommended due to glucose input value below recommendation threshold for meal bolus")
327
+
caption =NSLocalizedString("Your glucose is low. Eat carbs and monitor closely.", comment:"Bolus screen warning when no bolus is recommended due to glucose input value below recommendation threshold for meal bolus")
346
328
}
347
329
returnWarningView(
348
-
title:Text("No Bolus Recommended", comment:"Title for bolus screen notice when no bolus is recommended"),
330
+
title:Text("No Bolus Recommended", comment:"Title for bolus screen warning when no bolus is recommended"),
title:Text("Glucose Entry Out of Range", comment:"Title for bolus screen warning when glucose entry is out of range"),
338
+
caption:Text(String(format:NSLocalizedString("A manual glucose entry must be between %1$@ and %2$@.", comment:"Warning for simple bolus when glucose entry is out of range. (1: upper bound) (2: lower bound)"), glucoseMinString, glucoseMaxString)))
339
+
case.maxBolusExceeded:
340
+
returnWarningView(
341
+
title:Text("Maximum Bolus Exceeded", comment:"Title for bolus screen warning when max bolus is exceeded"),
342
+
caption:Text(String(format:NSLocalizedString("Your maximum bolus amount is %1$@.", comment:"Warning for simple bolus when max bolus is exceeded. (1: maximum bolus)"), viewModel.maximumBolusAmountString )))
343
+
case.recommendationExceedsMaxBolus:
344
+
returnWarningView(
345
+
title:Text("Recommended Bolus Exceeds Maximum Bolus", comment:"Title for bolus screen warning when recommended bolus exceeds max bolus"),
346
+
caption:Text(String(format:NSLocalizedString("Your recommended bolus exceeds your maximum bolus amount of %1$@.", comment:"Warning for simple bolus when recommended bolus exceeds max bolus. (1: maximum bolus)"), viewModel.maximumBolusAmountString )))
title:Text("Carbohydrate Entry Too Large", comment:"Title for bolus screen warning when carbohydrate entry is too large"),
351
+
caption:Text(String(format:NSLocalizedString("The maximum amount allowed is %1$@.", comment:"Warning for simple bolus when carbohydrate entry is too large. (1: maximum carbohydrate entry)"), maximumCarbohydrateString)))
0 commit comments