diff --git a/messages/de.json b/messages/de.json index 3af8f13ca..bf5866849 100644 --- a/messages/de.json +++ b/messages/de.json @@ -1795,7 +1795,7 @@ "unpinnedToast": "Zuordnung gelöst", "dueContext": "fällig gewesen: {time} ({delta})", "confirmTitle": "Slot {time} zuordnen?", - "confirmBody": "Die Einnahme zählt für diesen Slot als verspätet — die Quote wird nicht geschönt. Die Zuordnung lässt sich jederzeit wieder lösen.", + "confirmBody": "Die Einnahme zählt für diesen Slot: pünktlich, wenn sie im Zeitfenster des Slots lag, sonst als verspätet. Die Quote wird also nicht geschönt. Die Zuordnung lässt sich jederzeit wieder lösen.", "confirmCancel": "Abbrechen", "confirmAction": "Zuordnen" } diff --git a/messages/en.json b/messages/en.json index 9cd82bd03..b3fe58b4b 100644 --- a/messages/en.json +++ b/messages/en.json @@ -1795,7 +1795,7 @@ "unpinnedToast": "Attribution released", "dueContext": "was due: {time} ({delta})", "confirmTitle": "Attribute to slot {time}?", - "confirmBody": "The intake counts as taken late for this slot – the rate is never flattered. You can release the attribution at any time.", + "confirmBody": "The intake counts for this slot: on time if it was taken inside the slot's on-time window, otherwise as late, so the rate is never flattered. You can release the attribution at any time.", "confirmCancel": "Cancel", "confirmAction": "Attribute" } diff --git a/messages/es.json b/messages/es.json index b69c2d44f..981494fb9 100644 --- a/messages/es.json +++ b/messages/es.json @@ -1795,7 +1795,7 @@ "unpinnedToast": "Asignación quitada", "dueContext": "prevista: {time} ({delta})", "confirmTitle": "¿Asignar al horario de las {time}?", - "confirmBody": "La toma contará como tomada con retraso para este horario; el porcentaje no se maquilla. Puedes quitar la asignación en cualquier momento.", + "confirmBody": "La toma contará para este horario: a tiempo si se tomó dentro de su ventana puntual y, si no, con retraso, así que el porcentaje no se maquilla. Puedes quitar la asignación en cualquier momento.", "confirmCancel": "Cancelar", "confirmAction": "Asignar" } diff --git a/messages/fr.json b/messages/fr.json index e832e094e..809d70873 100644 --- a/messages/fr.json +++ b/messages/fr.json @@ -1795,7 +1795,7 @@ "unpinnedToast": "Prise détachée du créneau", "dueContext": "prévue à {time} ({delta})", "confirmTitle": "Rattacher au créneau de {time} ?", - "confirmBody": "La prise comptera comme prise en retard pour ce créneau – le taux n'est pas embelli. Le rattachement peut être retiré à tout moment.", + "confirmBody": "La prise comptera pour ce créneau : à l'heure si elle a eu lieu dans la fenêtre à l'heure du créneau, sinon en retard. Le taux n'est donc pas embelli. Le rattachement peut être retiré à tout moment.", "confirmCancel": "Annuler", "confirmAction": "Rattacher" } diff --git a/messages/it.json b/messages/it.json index 237f44644..3c0616fe5 100644 --- a/messages/it.json +++ b/messages/it.json @@ -1795,7 +1795,7 @@ "unpinnedToast": "Attribuzione rimossa", "dueContext": "prevista alle {time} ({delta})", "confirmTitle": "Attribuire allo slot delle {time}?", - "confirmBody": "L'assunzione conterà come in ritardo per questo slot – la percentuale non viene abbellita. L'attribuzione può essere rimossa in qualsiasi momento.", + "confirmBody": "L'assunzione conterà per questo slot: puntuale se è avvenuta nella finestra puntuale dello slot, altrimenti in ritardo, quindi la percentuale non viene abbellita. L'attribuzione può essere rimossa in qualsiasi momento.", "confirmCancel": "Annulla", "confirmAction": "Attribuisci" } diff --git a/messages/ko.json b/messages/ko.json index 91b12f477..b09497d07 100644 --- a/messages/ko.json +++ b/messages/ko.json @@ -1795,7 +1795,7 @@ "unpinnedToast": "배정을 해제했어요", "dueContext": "예정 시각: {time} ({delta})", "confirmTitle": "{time} 시간대에 배정할까요?", - "confirmBody": "이 복용은 해당 시간대에 늦게 복용한 것으로 계산돼요 – 순응도가 부풀려지지 않아요. 배정은 언제든 해제할 수 있어요.", + "confirmBody": "이 복용은 해당 시간대로 계산돼요. 시간대의 정시 범위 안에 복용했다면 제시간, 아니면 늦게 복용한 것으로 계산되어 순응도가 부풀려지지 않아요. 배정은 언제든 해제할 수 있어요.", "confirmCancel": "취소", "confirmAction": "배정" } diff --git a/messages/pl.json b/messages/pl.json index ad7f00f51..ffd3b387f 100644 --- a/messages/pl.json +++ b/messages/pl.json @@ -1795,7 +1795,7 @@ "unpinnedToast": "Przypisanie usunięte", "dueContext": "termin: {time} ({delta})", "confirmTitle": "Przypisać do slotu {time}?", - "confirmBody": "Dawka zostanie policzona jako przyjęta z opóźnieniem dla tego slotu – wskaźnik nie jest zawyżany. Przypisanie można w każdej chwili usunąć.", + "confirmBody": "Dawka zostanie policzona dla tego slotu: jako przyjęta na czas, jeśli mieści się w oknie punktualności slotu, a w przeciwnym razie jako przyjęta z opóźnieniem, więc wskaźnik nie jest zawyżany. Przypisanie można w każdej chwili usunąć.", "confirmCancel": "Anuluj", "confirmAction": "Przypisz" } diff --git a/src/lib/medications/scheduling/__tests__/dose-history.test.ts b/src/lib/medications/scheduling/__tests__/dose-history.test.ts index 0603860fc..ac5196362 100644 --- a/src/lib/medications/scheduling/__tests__/dose-history.test.ts +++ b/src/lib/medications/scheduling/__tests__/dose-history.test.ts @@ -284,6 +284,30 @@ describe("reconstructDoseHistory", () => { expect(morning?.pinned).toBe(true); }); + // The pin confirm dialog promises exactly this split: on time inside the + // slot's on-time window (also ahead of the slot's clock time), late + // otherwise. + it("an early pin inside the on-time window reads on time, one before it reads late", () => { + const early = reconstructDoseHistory( + bands, + [intake({ takenAt: at(6, 15), scheduledFor: at(7, 0), pinned: true })], + nowEvening, + null, + ); + expect(early.find((r) => r.timeOfDay === "07:00")?.status).toBe( + "taken_on_time", + ); + const tooEarly = reconstructDoseHistory( + bands, + [intake({ takenAt: at(5, 30), scheduledFor: at(7, 0), pinned: true })], + nowEvening, + null, + ); + expect(tooEarly.find((r) => r.timeOfDay === "07:00")?.status).toBe( + "taken_late", + ); + }); + it("a pin inside the late tail reads taken_late, never flattered", () => { const rows = reconstructDoseHistory( bands,