mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-17 23:52:24 +00:00
Surface sleep-debt and chronotype on the sleep page
Compute cumulative sleep debt and the MCTQ chronotype server-side off the canonical night reconstruction the Sleep Score reads, and render them on the sleep page: a sleep-debt headline with a calm partial state under the night threshold, and a chronotype card whose social-jetlag detail and corrected mid-sleep sit behind an advanced disclosure. Both hold a learning state on thin data and never assert a total or a band. Serve the same values to the dashboard summary and a new GET /api/sleep/rhythm read so the native client renders identical figures. Free vs work nights default to weekend in the user's timezone until day-type tracking exists.
This commit is contained in:
1 parent
4884f019b7
commit
d1ba01548f
22 files changed
+1489
-2
No files matched your search
@@ -2666,6 +2666,32 @@
|
||||
"title": "Noch keine Schlafdaten",
|
||||
"description": "Apple-Health-Sync folgt mit v1.5 und füllt diese Ansicht automatisch.",
|
||||
"action": "Geräte verwalten"
|
||||
},
|
||||
"debt": {
|
||||
"title": "Schlafschuld",
|
||||
"value": "{hours} Std. {minutes} Min. zu wenig",
|
||||
"caption": "Kumuliertes Defizit der letzten {nights} Nächte",
|
||||
"clearValue": "Ausgeglichen",
|
||||
"clearCaption": "Kein aufgelaufenes Defizit über die letzten {nights} Nächte",
|
||||
"learning": "Dein Schlaf wird noch erfasst — {counted} Nächte bisher, noch {remaining} für eine verlässliche Bilanz."
|
||||
},
|
||||
"chronotype": {
|
||||
"title": "Chronotyp",
|
||||
"learning": "Dein Rhythmus wird noch erfasst — {counted} von {total} freien Nächten. Ein Chronotyp braucht ein paar weckerfreie Morgen, um aussagekräftig zu sein.",
|
||||
"midSleepCaption": "Schlafmitte an freien Tagen gegen {clock}",
|
||||
"advancedToggle": "Mehr Details",
|
||||
"socialJetlagValue": "{hours} Std. {minutes} Min. sozialer Jetlag",
|
||||
"socialJetlagCaption": "Der Unterschied zwischen deinem Schlaf an Arbeits- und freien Tagen — wie eine kleine wöchentliche Zeitzonenverschiebung.",
|
||||
"msfScValue": "Korrigierte Schlafmitte {clock}",
|
||||
"msfScCaption": "Bereinigt um den Schlaf, den du am Wochenende nachholst (MSFsc).",
|
||||
"dayTypeNote": "Freie Tage werden als Wochenenden angenommen, bis eine Tagestyp-Erfassung ergänzt wird.",
|
||||
"band": {
|
||||
"extreme_early": "Ausgeprägter Morgentyp",
|
||||
"early": "Morgentyp",
|
||||
"intermediate": "Mischtyp",
|
||||
"late": "Abendtyp",
|
||||
"extreme_late": "Ausgeprägter Abendtyp"
|
||||
}
|
||||
}
|
||||
},
|
||||
"correlations": "Korrelationen",
|
||||
|
||||
@@ -2666,6 +2666,32 @@
|
||||
"title": "No sleep data yet",
|
||||
"description": "Apple Health sync arrives in v1.5 and will fill this in automatically.",
|
||||
"action": "Manage devices"
|
||||
},
|
||||
"debt": {
|
||||
"title": "Sleep debt",
|
||||
"value": "{hours}h {minutes}m short",
|
||||
"caption": "Cumulative shortfall over the last {nights} nights",
|
||||
"clearValue": "All caught up",
|
||||
"clearCaption": "No accumulated shortfall over the last {nights} nights",
|
||||
"learning": "Still learning your sleep — {counted} nights so far, {remaining} more to read a reliable balance."
|
||||
},
|
||||
"chronotype": {
|
||||
"title": "Chronotype",
|
||||
"learning": "Still learning your rhythm — {counted} of {total} free nights. A chronotype needs a few alarm-free mornings before it means anything.",
|
||||
"midSleepCaption": "Mid-sleep on free days around {clock}",
|
||||
"advancedToggle": "Advanced",
|
||||
"socialJetlagValue": "{hours}h {minutes}m social jetlag",
|
||||
"socialJetlagCaption": "The gap between your work-day and free-day sleep timing — like a small weekly time-zone shift.",
|
||||
"msfScValue": "Corrected mid-sleep {clock}",
|
||||
"msfScCaption": "Adjusted for the sleep you catch up on at the weekend (MSFsc).",
|
||||
"dayTypeNote": "Free days are assumed to be weekends until day-type tracking is added.",
|
||||
"band": {
|
||||
"extreme_early": "Strong morning type",
|
||||
"early": "Morning type",
|
||||
"intermediate": "Intermediate type",
|
||||
"late": "Evening type",
|
||||
"extreme_late": "Strong evening type"
|
||||
}
|
||||
}
|
||||
},
|
||||
"correlations": "Correlations",
|
||||
|
||||
@@ -2666,6 +2666,32 @@
|
||||
"title": "Aún no hay datos de sueño",
|
||||
"description": "La sincronización con Apple Health llega con la v1.5 y llenará esta vista automáticamente.",
|
||||
"action": "Gestionar dispositivos"
|
||||
},
|
||||
"debt": {
|
||||
"title": "Deuda de sueño",
|
||||
"value": "{hours} h {minutes} min de déficit",
|
||||
"caption": "Déficit acumulado de las últimas {nights} noches",
|
||||
"clearValue": "Al día",
|
||||
"clearCaption": "Sin déficit acumulado en las últimas {nights} noches",
|
||||
"learning": "Aún estamos midiendo tu sueño — {counted} noches hasta ahora, faltan {remaining} para un balance fiable."
|
||||
},
|
||||
"chronotype": {
|
||||
"title": "Cronotipo",
|
||||
"learning": "Aún estamos aprendiendo tu ritmo — {counted} de {total} noches libres. Un cronotipo necesita varias mañanas sin despertador para tener sentido.",
|
||||
"midSleepCaption": "Punto medio del sueño en días libres en torno a las {clock}",
|
||||
"advancedToggle": "Avanzado",
|
||||
"socialJetlagValue": "{hours} h {minutes} min de jet lag social",
|
||||
"socialJetlagCaption": "La diferencia entre el horario de sueño laboral y el de los días libres — como un pequeño cambio de huso horario semanal.",
|
||||
"msfScValue": "Punto medio corregido {clock}",
|
||||
"msfScCaption": "Ajustado por el sueño que recuperas el fin de semana (MSFsc).",
|
||||
"dayTypeNote": "Se asume que los días libres son los fines de semana hasta que se añada el registro del tipo de día.",
|
||||
"band": {
|
||||
"extreme_early": "Matutino marcado",
|
||||
"early": "Matutino",
|
||||
"intermediate": "Intermedio",
|
||||
"late": "Vespertino",
|
||||
"extreme_late": "Vespertino marcado"
|
||||
}
|
||||
}
|
||||
},
|
||||
"correlations": "Correlaciones",
|
||||
|
||||
@@ -2666,6 +2666,32 @@
|
||||
"title": "Pas encore de données de sommeil",
|
||||
"description": "La synchro Apple Health arrive avec la v1.5 et remplira automatiquement cette vue.",
|
||||
"action": "Gérer les appareils"
|
||||
},
|
||||
"debt": {
|
||||
"title": "Dette de sommeil",
|
||||
"value": "{hours} h {minutes} min de déficit",
|
||||
"caption": "Déficit cumulé sur les {nights} dernières nuits",
|
||||
"clearValue": "À jour",
|
||||
"clearCaption": "Aucun déficit cumulé sur les {nights} dernières nuits",
|
||||
"learning": "Votre sommeil est encore en cours d'analyse — {counted} nuits jusqu'ici, encore {remaining} pour un bilan fiable."
|
||||
},
|
||||
"chronotype": {
|
||||
"title": "Chronotype",
|
||||
"learning": "Votre rythme est encore en cours d'analyse — {counted} sur {total} nuits libres. Un chronotype a besoin de quelques matins sans réveil pour avoir du sens.",
|
||||
"midSleepCaption": "Milieu de sommeil les jours libres vers {clock}",
|
||||
"advancedToggle": "Avancé",
|
||||
"socialJetlagValue": "{hours} h {minutes} min de jet lag social",
|
||||
"socialJetlagCaption": "L'écart entre vos horaires de sommeil les jours travaillés et les jours libres — comme un petit décalage horaire hebdomadaire.",
|
||||
"msfScValue": "Milieu de sommeil corrigé {clock}",
|
||||
"msfScCaption": "Ajusté pour le sommeil rattrapé le week-end (MSFsc).",
|
||||
"dayTypeNote": "Les jours libres sont supposés être les week-ends jusqu'à l'ajout du suivi du type de jour.",
|
||||
"band": {
|
||||
"extreme_early": "Type du matin marqué",
|
||||
"early": "Type du matin",
|
||||
"intermediate": "Type intermédiaire",
|
||||
"late": "Type du soir",
|
||||
"extreme_late": "Type du soir marqué"
|
||||
}
|
||||
}
|
||||
},
|
||||
"correlations": "Corrélations",
|
||||
|
||||
@@ -2666,6 +2666,32 @@
|
||||
"title": "Ancora nessun dato sul sonno",
|
||||
"description": "La sync con Apple Health arriva con v1.5 e riempirà questa vista in automatico.",
|
||||
"action": "Gestisci dispositivi"
|
||||
},
|
||||
"debt": {
|
||||
"title": "Debito di sonno",
|
||||
"value": "{hours} h {minutes} min in meno",
|
||||
"caption": "Deficit cumulato nelle ultime {nights} notti",
|
||||
"clearValue": "In pari",
|
||||
"clearCaption": "Nessun deficit accumulato nelle ultime {nights} notti",
|
||||
"learning": "Stiamo ancora misurando il tuo sonno — {counted} notti finora, ne mancano {remaining} per un bilancio affidabile."
|
||||
},
|
||||
"chronotype": {
|
||||
"title": "Cronotipo",
|
||||
"learning": "Stiamo ancora imparando il tuo ritmo — {counted} di {total} notti libere. Un cronotipo richiede alcune mattine senza sveglia per avere significato.",
|
||||
"midSleepCaption": "Metà del sonno nei giorni liberi intorno alle {clock}",
|
||||
"advancedToggle": "Avanzate",
|
||||
"socialJetlagValue": "{hours} h {minutes} min di jet lag sociale",
|
||||
"socialJetlagCaption": "La differenza tra gli orari del sonno nei giorni lavorativi e in quelli liberi — come un piccolo cambio di fuso orario settimanale.",
|
||||
"msfScValue": "Metà del sonno corretta {clock}",
|
||||
"msfScCaption": "Corretta per il sonno recuperato nel fine settimana (MSFsc).",
|
||||
"dayTypeNote": "Si presume che i giorni liberi siano i fine settimana finché non verrà aggiunto il tracciamento del tipo di giorno.",
|
||||
"band": {
|
||||
"extreme_early": "Tipo mattutino marcato",
|
||||
"early": "Tipo mattutino",
|
||||
"intermediate": "Tipo intermedio",
|
||||
"late": "Tipo serale",
|
||||
"extreme_late": "Tipo serale marcato"
|
||||
}
|
||||
}
|
||||
},
|
||||
"correlations": "Correlazioni",
|
||||
|
||||
@@ -2666,6 +2666,32 @@
|
||||
"title": "Brak danych o śnie",
|
||||
"description": "Synchronizacja Apple Health pojawi się w v1.5 i wypełni ten widok automatycznie.",
|
||||
"action": "Zarządzaj urządzeniami"
|
||||
},
|
||||
"debt": {
|
||||
"title": "Dług snu",
|
||||
"value": "{hours} godz. {minutes} min niedoboru",
|
||||
"caption": "Skumulowany niedobór z ostatnich {nights} nocy",
|
||||
"clearValue": "Na bieżąco",
|
||||
"clearCaption": "Brak skumulowanego niedoboru w ostatnich {nights} nocach",
|
||||
"learning": "Wciąż analizujemy Twój sen — {counted} nocy do tej pory, jeszcze {remaining}, aby uzyskać wiarygodny bilans."
|
||||
},
|
||||
"chronotype": {
|
||||
"title": "Chronotyp",
|
||||
"learning": "Wciąż poznajemy Twój rytm — {counted} z {total} wolnych nocy. Chronotyp wymaga kilku poranków bez budzika, aby coś znaczył.",
|
||||
"midSleepCaption": "Środek snu w dni wolne około {clock}",
|
||||
"advancedToggle": "Zaawansowane",
|
||||
"socialJetlagValue": "{hours} godz. {minutes} min jet lagu społecznego",
|
||||
"socialJetlagCaption": "Różnica między porą snu w dni robocze i wolne — jak niewielka cotygodniowa zmiana strefy czasowej.",
|
||||
"msfScValue": "Skorygowany środek snu {clock}",
|
||||
"msfScCaption": "Skorygowany o sen nadrabiany w weekend (MSFsc).",
|
||||
"dayTypeNote": "Dni wolne przyjmuje się jako weekendy, dopóki nie zostanie dodane śledzenie typu dnia.",
|
||||
"band": {
|
||||
"extreme_early": "Wyraźny typ poranny",
|
||||
"early": "Typ poranny",
|
||||
"intermediate": "Typ pośredni",
|
||||
"late": "Typ wieczorny",
|
||||
"extreme_late": "Wyraźny typ wieczorny"
|
||||
}
|
||||
}
|
||||
},
|
||||
"correlations": "Korelacje",
|
||||
|
||||
Reference in new issue
Block a user