Skip to content

Commit c3439c4

Browse files
authored
Merge pull request #5 from tidepool-org/ps2/LOOP-4735/cgm-event-store
LOOP-4735 CGM Event Store
2 parents 6467115 + 5fea10f commit c3439c4

File tree

23 files changed

+84
-76
lines changed

23 files changed

+84
-76
lines changed

G7SensorKit/G7CGMManager/G7CGMManager.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,16 @@ extension G7CGMManager: G7SensorDelegate {
294294
state.sensorID = name
295295
state.activatedAt = activatedAt
296296
}
297+
let event = PersistedCgmEvent(
298+
date: activatedAt,
299+
type: .sensorStart,
300+
deviceIdentifier: name,
301+
expectedLifetime: .hours(24 * 10 + 12),
302+
warmupPeriod: .hours(2)
303+
)
304+
delegate.notify { delegate in
305+
delegate?.cgmManager(self, hasNew: [event])
306+
}
297307
}
298308

299309
return shouldSwitchToNewSensor

G7SensorKit/cs.lproj/Localizable.strings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@
1010
/* The description of sensor algorithm state when sensor failed. */
1111
"Sensor failed" = "Senzor selhal";
1212

13+
/* The description of sensor algorithm state when raw value is unknown. (1: missing data details) */
14+
"Sensor is in unknown state %1$d" = "Senzor je v neznámém stavu %1$d";
15+
1316
/* The description of sensor algorithm state when sensor is ok. */
1417
"Sensor is OK" = "Senzor je v pořádku";
1518

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,24 @@
1+
/* CGM display title */
2+
"Dexcom G7" = "Dexcom G7";
3+
14
/* Error description for unreliable state */
2-
"Glucose data is unavailable" = "Glucose data is unavailable";
5+
"Glucose data is unavailable" = "מידע גלוקוז לא זמין";
6+
7+
/* The description of sensor algorithm state when sensor is expired. */
8+
"Sensor expired" = "החיישן פג";
9+
10+
/* The description of sensor algorithm state when sensor failed. */
11+
"Sensor failed" = "החיישן נכשל";
312

413
/* The description of sensor algorithm state when raw value is unknown. (1: missing data details) */
5-
"Sensor is in unknown state %1$d" = "Sensor is in unknown state %1$d";
14+
"Sensor is in unknown state %1$d" = "מצב החיישן אינו ידוע %1$d";
15+
16+
/* The description of sensor algorithm state when sensor is ok. */
17+
"Sensor is OK" = "החיישן תקין";
618

719
/* The description of sensor algorithm state when sensor is stopped. */
8-
"Sensor is stopped" = "חיישן נעצר";
20+
"Sensor is stopped" = "החיישן נעצר";
921

1022
/* The description of sensor algorithm state when sensor is warming up. */
11-
"Sensor is warming up" = "חיישן מתחמם";
23+
"Sensor is warming up" = "חיישן מתכונן";
1224

G7SensorKitUI/cs.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* Button text to cancel G7 setup */
85
"Cancel" = "Zrušit";
96

G7SensorKitUI/da.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Er du sikker på, at du vil slette denne CGM?";
96

G7SensorKitUI/de.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Bist Du sicher, dass Du dieses CGM löschen möchtest?";
96

G7SensorKitUI/es.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "¿Está seguro de que quiere eliminar este MCG?";
96

G7SensorKitUI/fi.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Haluatko varmasti poistaa CGM:n?";
96

G7SensorKitUI/fr.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Voulez-vous vraiment supprimer ce CGM?";
96

Lines changed: 54 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "---";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* No comment provided by engineer. */
8-
"Are you sure you want to delete this CGM?" = "האם למחוק את מד הסוכר הרציף?";
5+
"Are you sure you want to delete this CGM?" = "בטוח שברצונך למחוק את חיישן זה?";
96

107
/* No comment provided by engineer. */
118
"Bluetooth" = "Bluetooth";
129

1310
/* Button text to cancel G7 setup */
14-
"Cancel" = "Cancel";
11+
"Cancel" = "ביטול";
1512

1613
/* No comment provided by engineer. */
1714
"Configuration" = "הגדרות";
@@ -23,53 +20,96 @@
2320
"Connecting" = "מתחבר";
2421

2522
/* Button title for starting setup */
26-
"Continue" = "Continue";
23+
"Continue" = "המשך";
2724

2825
/* Button label for removing CGM */
29-
"Delete CGM" = "מחק מד סוכר רציף";
26+
"Delete CGM" = "מחק חיישן";
27+
28+
/* Navigation bar title for G7SettingsView
29+
Title on WelcomeView */
30+
"Dexcom G7" = "Dexcom G7";
3031

3132
/* No comment provided by engineer. */
3233
"Done" = "בוצע";
3334

3435
/* Field label */
35-
"Glucose" = "Glucose";
36+
"Glucose" = "גלוקוז";
37+
38+
/* title for g7 settings row showing sensor grace period end time */
39+
"Grace Period End" = "סיום זמן חסד";
40+
41+
/* G7 Progress bar label when sensor grace period progress showing */
42+
"Grace period remaining" = "זמן חסר שנשאר";
3643

3744
/* String displayed instead of a glucose value above the CGM range */
3845
"HIGH" = "גבוה";
3946

4047
/* title for g7 settings row showing sensor last connect time */
4148
"Last Connect" = "חיבור אחרון";
4249

50+
/* No comment provided by engineer. */
51+
"Last Reading" = "קריאה אחרונה";
52+
53+
/* Descriptive text on G7StartupView */
54+
"Loop can read G7 CGM data, but you must still use the Dexcom G7 App for pairing, calibration, and other sensor management." = "Loop יכול לקרוא נתונים מחיישן G7, אבל תצטרך להשתמש באפליקציית Dexcom G7 כדי לצמד, לכייל ולנהל את החיישן.";
55+
4356
/* String displayed instead of a glucose value below the CGM range */
4457
"LOW" = "נמוך";
4558

4659
/* title for g7 settings row showing BLE Name */
47-
"Name" = "Name";
60+
"Name" = "שם";
61+
62+
/* No comment provided by engineer. */
63+
"Scan for new sensor" = "סרוק חיישן חדש";
64+
65+
/* title for g7 settings connection status when scanning */
66+
"Scanning" = "סורק";
4867

4968
/* G7 Status highlight text for searching for sensor */
50-
"Searching for\nSensor" = "מחפש חיישן";
69+
"Searching for\nSensor" = "מחפש\nחיישן";
5170

5271
/* G7 Progress bar label when searching for sensor */
5372
"Searching for sensor" = "מחפש חיישן";
5473

5574
/* G7 Status highlight text for sensor expired */
56-
"Sensor\nExpired" = "חיישן פג";
75+
"Sensor\nExpired" = "החיישן\nפג";
5776

5877
/* G7 Status highlight text for sensor failed */
59-
"Sensor\nFailed" = "כשל בחיישן";
78+
"Sensor\nFailed" = "כשל\nבחיישן";
6079

6180
/* G7 Status highlight text for sensor error */
62-
"Sensor\nIssue" = "בעיה בחיישן";
81+
"Sensor\nIssue" = "בעייה\nבחיישן";
6382

6483
/* G7 Status highlight text for sensor warmup */
65-
"Sensor\nWarmup" = "חיישן מתחמם";
84+
"Sensor\nWarmup" = "חיישן\nבהכנה";
6685

6786
/* title for g7 settings row showing sensor expiration time */
6887
"Sensor Expiration" = "תוקף חיישן";
6988

89+
/* G7 Progress bar label when sensor expired */
90+
"Sensor expired" = "החיישן פג";
91+
92+
/* G7 Progress bar label when sensor lifetime progress showing */
93+
"Sensor expires" = "תוקף החיישן";
94+
95+
/* G7 Progress bar label when sensor failed */
96+
"Sensor failed" = "החיישן נכשל";
97+
98+
/* title for g7 settings row showing sensor start time */
99+
"Sensor Start" = "התחלת חיישן";
100+
101+
/* G7 Status highlight text for signal loss */
102+
"Signal\nLoss" = "האות\nאבד";
103+
70104
/* Field label */
71105
"Time" = "שעה";
72106

73107
/* Field label */
74108
"Trend" = "מגמה";
75109

110+
/* title for g7 config settings to upload readings */
111+
"Upload Readings" = "העלה קריאות";
112+
113+
/* G7 Progress bar label when sensor in warmup */
114+
"Warmup completes" = "ההכנה הסתיימה";
115+

G7SensorKitUI/hi.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/मिनट";
6-
74
/* Button text to cancel G7 setup */
85
"Cancel" = "निरस्त";
96

G7SensorKitUI/it.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "---";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Sei sicuro di voler eliminare questo CGM?";
96

G7SensorKitUI/ja.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "---";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/分";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "このCGMを削除しますか?";
96

G7SensorKitUI/nb.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Er du sikker på at du vil slette denne CGM?";
96

G7SensorKitUI/nl.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Weet je zeker dat je deze CGM wilt verwijderen";
96

G7SensorKitUI/pl.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Czy na pewno chcesz usunąć ten CGM?";
96

G7SensorKitUI/pt-BR.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "---";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Você está certo que quer remover este CGM?";
96

G7SensorKitUI/ro.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "/min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Sunteți sigur că doriți să ștergeți acest CGM?";
96

G7SensorKitUI/ru.lproj/Localizable.strings

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/мин";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Вы уверены, что хотите удалить этот CGM?";
96

@@ -111,7 +108,7 @@
111108
"Trend" = "Тенденция";
112109

113110
/* title for g7 config settings to upload readings */
114-
"Upload Readings" = "Загрузить показания";
111+
"Upload Readings" = "Выгружать показания";
115112

116113
/* G7 Progress bar label when sensor in warmup */
117114
"Warmup completes" = "Прогрев окончен";

G7SensorKitUI/sk.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@ /min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Naozaj chcete odstrániť toto CGM?";
96

G7SensorKitUI/sv.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/min";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Är du säker på att du vill radera denna CGM?";
96

G7SensorKitUI/tr.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "– – –";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/dk";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Bu CGM'i silmek istediğinizden emin misiniz?";
96

G7SensorKitUI/vi.lproj/Localizable.strings

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
/* No glucose value representation (3 dashes for mg/dL) */
22
"– – –" = "---";
33

4-
/* Format string for glucose trend per minute. (1: glucose value and unit) */
5-
"%@/min" = "%@/phút";
6-
74
/* No comment provided by engineer. */
85
"Are you sure you want to delete this CGM?" = "Bạn có chắc sẽ xóa CGM này?";
96

0 commit comments

Comments
 (0)