diff --git a/AGENTS.md b/AGENTS.md index 9aa6d6b6..e5234d85 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1069,8 +1069,30 @@ gives the coach and its notifications the persona through `L10n.coachInstruction same topics (`FUNNY_VOICE`). - **The joke wraps the content.** Same facts, same values (`{0}` placeholders), same advice. Roast habits, never the person. Swearing is censored (`f*cking`), and the test checks that too. -- **Adding the Portuguese version** is one enum entry and one file: `FUCKING_HEALTH_PT` with - `localeTag = "pt-BR"` and `catalogs = listOf("i18n/pt-BR-FH.json", "i18n/pt-BR.json")`, so a - string the Portuguese voice doesn't rewrite reads as plain Portuguese. Write the catalog in - Brazilian Portuguese (Brazilian censored swearing: p*rra, c*ralho, m*rda), not as a translation - of the English jokes, and extend `FuckingHealthCatalogTest` to cover it. +- **The Portuguese voice is "Saúde do C*ralho"** (`FUCKING_HEALTH_PT`): `pt-BR-FH.json` layered on + `pt-BR.json`, so a string it doesn't rewrite reads as plain Portuguese. It was written natively + (p*rra, c*ralho, m*rda), not translated from the English jokes, and the same test covers it. + +## Postpartum mode: opt-in from the profile, and it never diagnoses + +**Read this before touching `service/Postpartum.kt` or `ui/screens/PostpartumUi.kt`.** Research and +sources: `docs/postpartum-breastfeeding-research.md`. + +- **Only she switches it on**, in User Profile → Life stage (baby's birth date, feeding). It turns + itself off two years after the birth date (`Postpartum.active`). +- **It never claims detection.** Not mastitis, fever, depression, preeclampsia, milk supply or + returning fertility; the ring's numbers are context. The alcohol time is an estimate (CDC: at + least 2 h per 14 g standard drink), said as one. The LAM card is information, not contraception + advice. Medications get e-lactancia/LactMed links and "ask your clinician", never a verdict. +- **The mood check-in is the EPDS, verbatim** (`assets/epds.json`, with its citation). Don't + paraphrase items: the validated wording is the instrument. The Portuguese text is the Pelotas + 2004 cohort's (Santos et al., 2007); its per-option scores were mapped by meaning from the English + scoring because the publication prints none, so have a clinician confirm them. **Any answer above + 0 on item 10 shows CVV 188 and SAMU 192 at once, whatever the total.** Cut-offs: 10 (possible), + 13 (likely), from the Brazilian validation. +- **Answers stay on the phone**: SharedPreferences only, not the data archive, diagnostics or + Health Connect. +- **The calorie allowance is tracked, not guessed** (`appliedCalorieBonus`): the intake goal moves + by the difference between what the stage calls for and what was added before, so weaning or + switching off takes exactly that back. +- **No F*cking Health jokes here**: postpartum text is on the voice's safety list. diff --git a/app/src/main/assets/epds.json b/app/src/main/assets/epds.json new file mode 100644 index 00000000..d83a33df --- /dev/null +++ b/app/src/main/assets/epds.json @@ -0,0 +1,435 @@ +{ + "en": { + "instruction": "As you have recently had a baby, we would like to know how you are feeling. Please choose the answer which comes closest to how you have felt IN THE PAST 7 DAYS, not just how you feel today.", + "items_heading": "In the past 7 days:", + "items": [ + { + "text": "I have been able to laugh and see the funny side of things.", + "options": [ + { + "text": "As much as I always could", + "score": 0 + }, + { + "text": "Not quite so much now", + "score": 1 + }, + { + "text": "Definitely not so much now", + "score": 2 + }, + { + "text": "Not at all", + "score": 3 + } + ] + }, + { + "text": "I have looked forward with enjoyment to things.", + "options": [ + { + "text": "As much as I ever did", + "score": 0 + }, + { + "text": "Rather less than I used to", + "score": 1 + }, + { + "text": "Definitely less than I used to", + "score": 2 + }, + { + "text": "Hardly at all", + "score": 3 + } + ] + }, + { + "text": "I have blamed myself unnecessarily when things went wrong.", + "options": [ + { + "text": "Yes, most of the time", + "score": 3 + }, + { + "text": "Yes, some of the time", + "score": 2 + }, + { + "text": "Not very often", + "score": 1 + }, + { + "text": "No, never", + "score": 0 + } + ] + }, + { + "text": "I have been anxious or worried for no good reason.", + "options": [ + { + "text": "No, not at all", + "score": 0 + }, + { + "text": "Hardly ever", + "score": 1 + }, + { + "text": "Yes, sometimes", + "score": 2 + }, + { + "text": "Yes, very often", + "score": 3 + } + ] + }, + { + "text": "I have felt scared or panicky for no very good reason.", + "options": [ + { + "text": "Yes, quite a lot", + "score": 3 + }, + { + "text": "Yes, sometimes", + "score": 2 + }, + { + "text": "No, not much", + "score": 1 + }, + { + "text": "No, not at all", + "score": 0 + } + ] + }, + { + "text": "Things have been getting on top of me.", + "options": [ + { + "text": "Yes, most of the time I haven't been able to cope at all", + "score": 3 + }, + { + "text": "Yes, sometimes I haven't been coping as well as usual", + "score": 2 + }, + { + "text": "No, most of the time I have coped quite well", + "score": 1 + }, + { + "text": "No, I have been coping as well as ever", + "score": 0 + } + ] + }, + { + "text": "I have been so unhappy that I have had difficulty sleeping.", + "options": [ + { + "text": "Yes, most of the time", + "score": 3 + }, + { + "text": "Yes, sometimes", + "score": 2 + }, + { + "text": "Not very often", + "score": 1 + }, + { + "text": "No, not at all", + "score": 0 + } + ] + }, + { + "text": "I have felt sad or miserable.", + "options": [ + { + "text": "Yes, most of the time", + "score": 3 + }, + { + "text": "Yes, quite often", + "score": 2 + }, + { + "text": "Not very often", + "score": 1 + }, + { + "text": "No, not at all", + "score": 0 + } + ] + }, + { + "text": "I have been so unhappy that I have been crying.", + "options": [ + { + "text": "Yes, most of the time", + "score": 3 + }, + { + "text": "Yes, quite often", + "score": 2 + }, + { + "text": "Only occasionally", + "score": 1 + }, + { + "text": "No, never", + "score": 0 + } + ] + }, + { + "text": "The thought of harming myself has occurred to me.", + "options": [ + { + "text": "Yes, quite often", + "score": 3 + }, + { + "text": "Sometimes", + "score": 2 + }, + { + "text": "Hardly ever", + "score": 1 + }, + { + "text": "Never", + "score": 0 + } + ] + } + ] + }, + "pt": { + "instruction": "Marque a resposta que melhor reflete como você tem se sentido nos últimos 7 dias:", + "items": [ + { + "text": "Eu tenho sido capaz de rir e achar graça das coisas.", + "options": [ + { + "text": "Como eu sempre fiz.", + "score": 0 + }, + { + "text": "Não tanto quanto antes.", + "score": 1 + }, + { + "text": "Sem dúvida, menos que antes.", + "score": 2 + }, + { + "text": "De jeito nenhum.", + "score": 3 + } + ] + }, + { + "text": "Eu tenho pensado no futuro com alegria.", + "options": [ + { + "text": "Sim, como de costume.", + "score": 0 + }, + { + "text": "Um pouco menos que de costume.", + "score": 1 + }, + { + "text": "Muito menos que de costume.", + "score": 2 + }, + { + "text": "Praticamente não.", + "score": 3 + } + ] + }, + { + "text": "Eu tenho me culpado sem razão quando as coisas dão errado.", + "options": [ + { + "text": "Não, de jeito nenhum.", + "score": 0 + }, + { + "text": "Raramente.", + "score": 1 + }, + { + "text": "Sim, às vezes.", + "score": 2 + }, + { + "text": "Sim, muito freqüentemente.", + "score": 3 + } + ] + }, + { + "text": "Eu tenho ficado ansiosa ou preocupada sem uma boa razão.", + "options": [ + { + "text": "Sim, muito seguido.", + "score": 3 + }, + { + "text": "Sim, às vezes.", + "score": 2 + }, + { + "text": "De vez em quando.", + "score": 1 + }, + { + "text": "Não, de jeito nenhum.", + "score": 0 + } + ] + }, + { + "text": "Eu tenho me sentido assustada ou em pânico sem um bom motivo.", + "options": [ + { + "text": "Sim, muito seguido.", + "score": 3 + }, + { + "text": "Sim, às vezes.", + "score": 2 + }, + { + "text": "Raramente.", + "score": 1 + }, + { + "text": "Não, de jeito nenhum.", + "score": 0 + } + ] + }, + { + "text": "Eu tenho me sentido sobrecarregada pelas tarefas e acontecimentos do meu dia-a-dia.", + "options": [ + { + "text": "Sim. Na maioria das vezes eu não consigo lidar bem com eles.", + "score": 3 + }, + { + "text": "Sim. Algumas vezes não consigo lidar bem como antes.", + "score": 2 + }, + { + "text": "Não. Na maioria das vezes consigo lidar bem com eles.", + "score": 1 + }, + { + "text": "Não. Eu consigo lidar com eles tão bem quanto antes.", + "score": 0 + } + ] + }, + { + "text": "Eu tenho me sentido tão infeliz que eu tenho tido dificuldade de dormir.", + "options": [ + { + "text": "Sim, na maioria das vezes.", + "score": 3 + }, + { + "text": "Sim, algumas vezes.", + "score": 2 + }, + { + "text": "Raramente.", + "score": 1 + }, + { + "text": "Não, nenhuma vez.", + "score": 0 + } + ] + }, + { + "text": "Eu tenho me sentido triste ou muito mal.", + "options": [ + { + "text": "Sim, na maioria das vezes.", + "score": 3 + }, + { + "text": "Sim, muitas vezes.", + "score": 2 + }, + { + "text": "Raramente.", + "score": 1 + }, + { + "text": "Não, de jeito nenhum.", + "score": 0 + } + ] + }, + { + "text": "Eu tenho me sentido tão triste que tenho chorado.", + "options": [ + { + "text": "Sim, a maior parte do tempo.", + "score": 3 + }, + { + "text": "Sim, muitas vezes.", + "score": 2 + }, + { + "text": "Só de vez em quando.", + "score": 1 + }, + { + "text": "Não, nunca.", + "score": 0 + } + ] + }, + { + "text": "Eu tenho pensado em fazer alguma coisa contra mim mesma.", + "options": [ + { + "text": "Sim, muitas vezes.", + "score": 3 + }, + { + "text": "Às vezes.", + "score": 2 + }, + { + "text": "Raramente.", + "score": 1 + }, + { + "text": "Nunca.", + "score": 0 + } + ] + } + ] + }, + "citation_en": "Cox JL, Holden JM, Sagovsky R. Detection of postnatal depression: development of the 10-item Edinburgh Postnatal Depression Scale. British Journal of Psychiatry 1987;150:782-786. Users may reproduce the scale without further permission providing they respect copyright by quoting the names of the authors, the title and the source of the paper in all reproduced copies.", + "citation_pt": "Escala de Depressão Pós-Parto de Edimburgo (EPDS), versão em português utilizada na Coorte de Nascimentos de Pelotas de 2004. Texto conforme publicado em: Santos IS, Matijasevich A, Tavares BF, Lima ACC, Riegel RE, Lopes BC. Comparing validity of Edinburgh scale and SRQ20 in screening for post-partum depression. Clin Pract Epidemiol Ment Health 2007;3:18 (Tabela 1). Validação: Santos IS, Matijasevich A, Tavares BF, Barros AJD, Botelho IP, Lapolli C, et al. Validation of the Edinburgh Postnatal Depression Scale (EPDS) in a sample of mothers from the 2004 Pelotas Birth Cohort Study. Cad Saúde Pública 2007;23(11):2577-2588. doi:10.1590/S0102-311X2007001100005. Escala original: Cox JL, Holden JM, Sagovsky R. Br J Psychiatry 1987;150:782-786." +} \ No newline at end of file diff --git a/app/src/main/assets/i18n/en-FH.json b/app/src/main/assets/i18n/en-FH.json index 4f26a96c..99bd5a34 100644 --- a/app/src/main/assets/i18n/en-FH.json +++ b/app/src/main/assets/i18n/en-FH.json @@ -247,7 +247,6 @@ "Plan: dry night": "Plan: dry night. Bold.", "Possible nap": "Possible nap. Lazy a** afternoon?", "PulseLoop learns your baseline over time": "PulseLoop learns your baseline over time. It's not psychic.", - "PulseLoop uses sensible defaults.": "PulseLoop uses sensible defaults. Unlike some people.", "PulseLoop · from my ring, compared with last week": "PulseLoop · from my ring, vs. last week. Brace yourself.", "REM sleep supports memory and mood. It usually makes up 20 to 25% of a night, about 90 minutes or more.": "REM sleep keeps your memory and mood from going to sh*t. Usually 20 to 25% of a night, about 90 minutes or more.", "Reading your drinks…": "Reading your drinks… oh boy…", @@ -353,7 +352,6 @@ "Total workout time this week. Health guidelines suggest at least 150 minutes of moderate activity a week.": "Total workout time this week. Health guidelines want at least 150 minutes of moderate activity a week. No excuses.", "Track more nights this month to see a monthly average.": "Track more nights this month. Can't average what you didn't wear.", "Tracked {0} {1} this year": "Tracked {0} {1} this year. Not bad, I guess.", - "Trends over time matter more than any single reading.": "Trends over time matter more than any single reading. Stop obsessing over one number.", "Try again": "Try again, damn it", "Turn on Bluetooth to find and connect your ring.": "Turn on Bluetooth. I can't find your ring by telepathy.", "Two-hour 140–199 is above the typical range.": "Two-hour 140–199 is above the typical range. Hmm.", @@ -400,7 +398,6 @@ "You averaged {0} across the full week. Your nights were tracked consistently, so this is a dependable picture of where your sleep sits right now.": "You averaged {0} across the full week. You actually tracked every night, so for once this is a dependable picture of where your sleep sits.", "You averaged {0} across {1} tracked nights this week. That's a useful read, but {2} missing {3} mean the trend is still incomplete.": "You averaged {0} across {1} tracked nights this week. Useful-ish, but {2} missing {3} mean the trend is still full of holes.", "You can pair a ring later from Settings.": "Fine, pair a ring later from Settings.", - "You can still search the database or enter the meal manually.": "You can still search the database or type the meal in yourself. Old school.", "You hit your {0} step goal — nice work.": "You hit your {0} step goal. Damn. Didn't think you had it in you.", "You logged {0}h {1}m of sleep. Here's to a strong day — get moving when you can.": "You logged {0}h {1}m of sleep. Here's to a strong day — now get moving when you can.", "You moved less than last week. A daily walk is an easy way back.": "You moved less than last week. WTF? A daily walk is an easy way back.", diff --git a/app/src/main/assets/i18n/pt-BR-FH.json b/app/src/main/assets/i18n/pt-BR-FH.json new file mode 100644 index 00000000..20e6de6b --- /dev/null +++ b/app/src/main/assets/i18n/pt-BR-FH.json @@ -0,0 +1,459 @@ +{ + " Drinks: {0} of {1}, {2} dry day{3}.": " Bebidas: {0} de {1}, {2} dia{3} sem álcool. Saúde, né?", + " · tap for this week's plan": " · toque pro plano da semana, bora", + "\"{0}\" will be removed from this day's log.": "\"{0}\" vai pro saco deste dia. Tchau.", + "%,d steps yesterday vs your usual %,d": "%,d passos ontem vs. seus habituais %,d. Escolha interessante, hein.", + "A few more days of data and your routines show up here.": "Mais uns dias de dados, c*ralho, e suas rotinas aparecem aqui.", + "A little below your usual range.": "Um pouco abaixo da sua faixa habitual. Hmm.", + "A low resting heart rate is common with high fitness.": "Frequência cardíaca em repouso baixa é comum em quem tem bom condicionamento. Exibido.", + "A nudge about 30 minutes before your suggested bedtime.": "Um puxão de orelha uns 30 minutos antes do horário sugerido pra dormir. De nada.", + "A solid active day so far.": "Um dia ativo e consistente até agora. Não vai se achar, hein.", + "A steady week. Keep it up.": "Uma semana estável. Não vai estragar tudo agora.", + "A typical daytime stress score.": "Um nível de estresse diurno típico. Sem graça, mas ok.", + "A typical resting heart rate for adults.": "Uma frequência cardíaca em repouso típica para adultos. Que emoção.", + "A typical skin-temperature range from the ring.": "Uma faixa típica de temperatura da pele medida pelo anel. Circulando, nada pra ver aqui.", + "A typical week now": "Uma semana típica agora. Bocejo.", + "AI Coach is off": "Coach de IA desativado. Aproveita o silêncio.", + "Above the typical resting range. Activity, caffeine, or stress can raise it.": "Acima da faixa típica em repouso. Exagerou no cafezinho? Atividade, cafeína ou estresse podem elevá-la.", + "Above your typical HRV — often a sign of good recovery.": "Acima da sua HRV típica — geralmente sinal de boa recuperação. Tá, impressionei. Um pouquinho.", + "Across the year your tracked average is {0} over {1} nights. The long-term trend is still forming — as more months fill in, I'll be able to compare seasonal changes and consistency.": "Ao longo do ano, sua média registrada é {0} em {1} noites. A tendência de longo prazo ainda tá no forno — me dá mais uns meses que eu te conto direitinho como ficam suas estações e sua consistência.", + "Active every hour since {0}:00": "Ativo a cada santa hora desde {0}:00. Quem é você?", + "Activity and live vitals, right away": "Atividade e sinais vitais ao vivo, na hora, sem enrolação", + "Add a workout you forgot to record": "Adicione o treino que você \"esqueceu\" de gravar", + "Add your ring": "Adiciona logo esse anel", + "After 1–2 drinks, your HRV runs {0}% {1} than on dry nights.": "Depois de 1–2 bebidas, sua HRV fica {0}% {1} do que nas noites sem álcool. Só tô falando.", + "After 3 or more drinks, your HRV runs {0}% {1} than on dry nights.": "Depois de 3 ou mais bebidas, sua HRV fica {0}% {1} do que nas noites sem álcool. Valeu a pena? Cê que sabe.", + "Aim for an earlier bedtime: you averaged {0} against a {1} goal.": "Vai dormir mais cedo, c*ralho: sua média foi {0} contra uma meta de {1}.", + "Aim to be in bed by {0} to get your {1} hours before your usual {2} wake-up.": "Na cama até {0}. Sem desculpa. Assim você tem suas {1} horas antes do despertar habitual às {2}.", + "Alerts when your ring's battery runs low": "Te enche o saco quando a bateria do anel estiver baixa", + "An LLM-native health app that turns a cheap Bluetooth smart ring into a real, conversational health tracker. It talks to the ring directly over Bluetooth — no vendor cloud, no account — and layers an AI coach on top of your own data.": "Um app de saúde nativo de LLM que transforma um anel inteligente Bluetooth barato em um monitor de saúde de verdade — e que responde. Ele fala com o anel direto via Bluetooth — sem nuvem do fabricante, sem conta, sem m*rda nenhuma — e coloca um coach de IA em cima dos seus próprios dados.", + "Analysis failed: {0}": "Falha na análise, que p*rra: {0}", + "Around lunch and dinner, only when nothing is logged yet. Needs nutrition tracking on.": "Te enche o saco perto do almoço e do jantar, só quando ainda não tem nada registrado. Requer o acompanhamento de nutrição ativado.", + "Around your personal baseline.": "Perto da sua linha de base pessoal. Normal de dar dó.", + "Ask the coach about it": "Vai encher o saco do coach", + "Ask the coach...": "Pergunte ao coach, se tiver coragem...", + "Athletic resting range.": "Faixa de repouso de atleta. Olha só você.", + "Averaging {0} against a need of {1}": "Média de {0} contra uma necessidade de {1}. Faz as contas.", + "Awake time elevated": "Tempo acordado elevado. Rolou muito na cama, foi?", + "Awake time low": "Tempo acordado baixo. Dormiu feito pedra, hein.", + "Baseline pending": "Linha de base pendente. Paciência, p*rra.", + "Battery critically low": "Bateria criticamente baixa. Carrega essa b*sta.", + "Battery healthy": "Bateria saudável. Milagre.", + "Battery low": "Bateria baixa. Dá comida pra ela.", + "Bedtimes within about 30 minutes help sleep quality": "Horários de dormir com variação de até uns 30 minutos ajudam a qualidade do sono. Escolhe um e fica nele, c*ralho.", + "Bring it on": "Manda ver, c*ralho", + "Building a picture from your data": "Montando um retrato a partir dos seus dados. Segura a onda.", + "Building baseline": "Criando linha de base. Calma.", + "Building momentum": "Ganhando ritmo. Até que enfim.", + "Built on your phone from your ring's data. No AI key needed.": "Feito no seu celular a partir dos dados do anel. Não precisa de chave de IA. De nada.", + "Charge your ring before bed": "Carregue seu anel antes de dormir. Não me faz pedir duas vezes.", + "Choose a valid activity type.": "Escolha um tipo de atividade válido. Qual é.", + "Choose an activity, when it started, and how long it lasted.": "Escolha uma atividade, quando ela começou e quanto tempo durou. Sem mentir.", + "Coach is thinking…": "O coach está pensando… não me apressa.", + "Connection failed": "Falha na conexão. Claro, né, p*rra.", + "Continue without ring": "Continuar sem anel (corajoso, hein)", + "Cooler than typical skin temperature.": "Mais fria que a temperatura típica da pele. Relaxa.", + "Couldn't delete this record": "Não deu pra excluir essa b*sta de registro", + "Couldn't get a steady reading. Keep the ring snug and your hand still, then try again.": "Não deu pra obter uma leitura estável. Para de mexer: mantenha o anel justo e a mão parada, e tente de novo.", + "Couldn't load your health history.": "Não deu pra carregar seu histórico de saúde. Ótimo. Maravilha.", + "Couldn't load {0} trends.": "Não deu pra carregar as tendências de {0}. Aff.", + "Couldn't look up that barcode. Check your connection or enter the meal manually.": "Não deu pra consultar essa droga de código de barras. Verifique sua conexão ou insira a refeição manualmente.", + "Couldn't process that photo. Try again or describe the meal.": "Que p*rra tem nessa foto? Não deu pra processar. Tente de novo ou descreva a refeição.", + "Couldn't reach the server.": "Não deu pra acessar o servidor. Deu um ghost na gente.", + "Couldn't save these changes. Check the times and try again.": "Não deu pra salvar as alterações. Confere essa droga de horário e tenta de novo.", + "Couldn't update this record": "Não deu pra atualizar este registro. Aff.", + "Daily AI-generated health insights based on your ring data": "Insights de saúde diários gerados por IA (com atitude) com base nos dados do seu anel", + "Daily and weekly targets behind the activity rings.": "Metas diárias e semanais por trás dos anéis de atividade. Sim, aqueles.", + "Deep sleep balanced": "Sono profundo equilibrado. Opa, nada mal.", + "Deep sleep strong": "Sono profundo forte. C*ramba, olha você.", + "Delete drink?": "Excluir bebida? Sumindo com as provas?", + "Delete memory?": "Excluir memória? O coach vai fingir que nunca aconteceu.", + "Delete workout?": "Excluir treino? Todo aquele suor, pro ralo.", + "Describe your meal": "Descreva sua refeição. Desembucha.", + "Drink less, sleep better": "Beba menos, durma melhor. Chocante, eu sei.", + "Drinks tonight": "Bebidas hoje à noite? Sério?", + "Dry": "Sem álcool. Olha só você.", + "Dry-day goal reached: {0} of {1}": "Meta de dias sem álcool atingida: {0} de {1}. C*ramba, sóbrio e todo metido.", + "Duration held the score back": "A duração derrubou a p*rra da pontuação", + "Duration must be greater than zero.": "A duração deve ser maior que zero. Zero não é treino.", + "Early bird": "Matutino. Aff.", + "Elevated stress — consider a short break.": "Estresse alto — faz uma pausa curta, c*ralho.", + "Enable Coach Check-Ins?": "Quer o coach te enchendo o saco todo dia?", + "End must be after the start.": "O fim deve ser depois do início. O tempo não anda pra trás.", + "End time can't be in the future.": "O horário de término não pode estar no futuro. Boa tentativa, Marty McFly.", + "Ended early.": "Encerrado antes do previsto. Claro.", + "Energy and sleep can dip; resting heart rate is often at its lowest.": "Energia e sono podem cair — que delícia. Pelo menos a frequência cardíaca em repouso costuma estar no ponto mais baixo.", + "Evening check-in": "Check-in da noite. Desembucha.", + "Evening type": "Coruja da noite", + "Everything compared agrees within its band.": "Tudo o que foi comparado está dentro da faixa. Irritantemente ok.", + "Excellent": "Excelente. Não vai se achar.", + "Exceptional": "Excepcional?! Que p*rra é essa?", + "Explain my heart rate trend": "Que p*rra minha frequência cardíaca tá fazendo?", + "Explore the app without a ring. Seeds activity, HR, SpO2, sleep, and a coach conversation.": "Sem anel? Tá bom. Fuça assim mesmo — gera dados de atividade, HR, SpO2, sono e uma conversa com o coach.", + "Explore without ring": "Xeretar sem anel", + "Fair": "Razoável. Meh.", + "Feeling unwell? Pause activity nudges for 3 days.": "Não está se sentindo bem? Eu calo a boca sobre se mexer por 3 dias.", + "Fell asleep": "Finalmente apagou", + "Finish": "Finalmente, concluir", + "First sync": "Primeira sincronização. Bora ver o estrago.", + "Flow, stretch, or breathwork": "Flow, alongamento ou só respira, p*rra", + "For drinks, money and calories saved": "Para bebidas, dinheiro e calorias que você não torrou", + "Get a daily check-in from your coach. You can change this anytime in Coach Check-Ins.": "Receba um check-in diário do seu coach. Mudou de ideia? Altera quando quiser em Check-ins do Coach.", + "Get notified when your ring drops below 20% and 10%, so tracking doesn't stop mid-day.": "Leve um grito quando a bateria do anel ficar abaixo de 20% e 10%, pro monitoramento não morrer no meio do dia.", + "Get started": "Tá, bora começar", + "Goal met on {0} of the last {1} days": "Meta atingida em {0} dos últimos {1} dias. E o resto, hein?", + "Good": "Bom. Aff, tá bom.", + "Good afternoon": "Boa tarde. Ainda vivo?", + "Good duration": "Duração decente, pra variar", + "Good evening": "Boa noite. Até que enfim.", + "Good morning": "Bom dia. Aff.", + "Good morning{0}": "Bom dia{0}. Aff.", + "Good night": "Vai dormir, c*ralho", + "Good sleep, with some restlessness": "Sono bom, mas que p*rra foi essa de rolar tanto na cama?", + "Great balance of movement and recovery. Keep it up.": "Ótimo equilíbrio entre movimento e recuperação. Não vai estragar.", + "HRV is personal. Wear your ring for about a week to learn your baseline.": "A HRV é pessoal. Usa a droga do anel por uma semana pra ele aprender sua linha de base.", + "HRV lower than usual": "HRV mais baixa que o normal. O que foi que você aprontou?", + "HRV trending up": "HRV em alta. Opa. Legal.", + "HRV usually takes {0} night{1} to come back.": "A HRV geralmente leva {0} noite{1} pra se arrastar de volta. Valeu a pena?", + "Hard workout": "Treino casca-grossa", + "Heart rate stayed at your quiet level with no steps": "A frequência cardíaca ficou no seu nível tranquilo, sem passos. Modo sofá, né?", + "Heart rate up to {0} bpm": "Frequência cardíaca até {0} bpm. Calma, fera.", + "Hi! I'm your PulseLoop coach. I can answer questions about your sleep, heart rate, activity, and recovery. What would you like to know?": "Ah, oi. Sou seu coach do PulseLoop. Pergunta sobre seu sono, frequência cardíaca, atividade e recuperação — vou ser sincero, na lata. O que cê quer saber?", + "High fatigue": "Moído pra c*ralho", + "How am I doing on my goal? What should I focus on this week?": "Quão mal tô indo na minha meta? O que eu conserto esta semana?", + "How am I doing today?": "Quão ferrado eu tô hoje?", + "How can I sleep better?": "Que p*rra eu faço pra dormir melhor?", + "How did today feel? Sync your ring and I'll recap your day.": "E aí, como foi o dia? Sincroniza o anel que eu zoo — digo, resumo — o seu dia.", + "How many recent days you reached your step goal. Aim for at least 3 days a week, ideally 5 or more.": "Em quantos dias recentes você atingiu de fato sua meta de passos. Tente pelo menos 3 dias por semana, de preferência 5 ou mais. Não é pedir muito.", + "How much you were awake once asleep. Some waking is normal; long or frequent wake-ups lower this.": "Quanto tempo você ficou acordado depois de adormecer. Despertar um pouco é normal; despertares longos ou frequentes afundam esta nota.", + "How often you exercised this week. Three or more sessions a week is a good target.": "Com que frequência você se deu ao trabalho de se exercitar nesta semana. Três ou mais sessões por semana é uma boa meta.", + "I don't see sleep data for last night. Wear your ring overnight and sync in the morning so I can compare your sleep against your baseline.": "Nada de dados de sono da noite passada. Cê foi pra cama, pelo menos? Use o anel durante a noite e sincronize de manhã pra eu comparar seu sono com sua linha de base.", + "I only have {0} tracked {1} for this {2}. Wear the ring overnight for a few more nights and I'll build a reliable {3}ly picture.": "Só tenho {0} {1} registradas para este período ({2}). Tá de sacanagem? Use o anel à noite por mais algumas noites e vou montar uma visão confiável por {3}.", + "I'd like to set a goal. Ask me what I want and help me make it realistic for my data.": "Quero uma meta. Pergunta o que eu quero e me convence a baixar a bola pra algo realista pros meus dados.", + "Idle": "Vagabundeando", + "Idle between syncs": "Vagabundeando entre sincronizações", + "In line with your usual {0} ms": "Dentro do seu habitual de {0} ms. Sem graça, mas ok.", + "Inactivity": "Tempo de sofá", + "Increase duration by 5 minutes": "Mais 5 minutinhos, bora", + "It's at {0}%. A short charge now keeps tonight's sleep tracked.": "Está em {0}%. Carrega essa b*sta agora pro sono desta noite ser registrado.", + "Keep going": "Continua, p*rra", + "Keep recording": "Continua gravando, p*rra", + "Keep still — measuring blood oxygen…": "Fica parado, pelo amor de Deus — medindo o oxigênio no sangue…", + "Keep still — measuring blood pressure, SpO₂, stress, fatigue & blood sugar…": "Congela. Na moral — medindo pressão arterial, SpO₂, estresse, fadiga e glicose…", + "Keep still — measuring heart rate & SpO₂…": "Para de se mexer — medindo frequência cardíaca e SpO₂…", + "Keep still — measuring heart rate…": "Para de se mexer — medindo frequência cardíaca…", + "Keep still — measuring {0}…": "Fica parado, c*ralho — medindo {0}…", + "Last night's heart rate and HRV readings weren't enough to score recovery": "As leituras de frequência cardíaca e HRV da noite passada foram mixurucas demais pra calcular a recuperação", + "Last night: {0}. A few dry nights will show what it does to you.": "Noite passada: {0}. Algumas noites sem álcool vão mostrar o que essa m*rda faz com você.", + "Last night: {0}. Your night looked close to your dry ones.": "Noite passada: {0}. Sua noite ficou parecida com as noites sem álcool. Deu sorte.", + "Later": "Aff, depois", + "Learned from nights you woke recovered": "Aprendido com as raras noites em que você acordou recuperado", + "Learning your baseline: {0} of {1} nights. Keep wearing your ring to bed.": "Aprendendo sua linha de base: {0} de {1} noites. Continua dormindo com a droga do anel.", + "Learning your dry nights: {0} of {1}. Then PulseLoop shows what each drink does to your sleep.": "Aprendendo suas noites sem álcool: {0} de {1}. Depois o PulseLoop mostra o que cada bebida faz com seu sono. Se prepara.", + "Learning your normal: {0} of {1} nights.": "Aprendendo seu normal: {0} de {1} noites. Paciência, p*rra.", + "Learns your baseline": "Aprende sua linha de base (dá um tempo, c*ramba)", + "Limited HR data available for today.": "Quase nada de dados de FC hoje. Cadê o anel?", + "Log Meal": "Alimentar o registro", + "Log a drink": "Confessar uma bebida", + "Log a drink in one tap": "Confesse uma bebida com um toque", + "Log a few evenings with drinks and PulseLoop will compare those nights with your dry ones.": "Registre algumas noites de birita e o PulseLoop vai comparar essas noites com as noites sem álcool. A verdade dói.", + "Log a meal": "Alimentar o registro", + "Log drinks": "Confessar bebidas", + "Log meal": "Alimentar o registro", + "Log meals to see food next to the calories you burn, and to link late meals and drinks to your sleep.": "Registre refeições pra ver a alimentação ao lado das calorias que você queima — e flagrar refeições e bebidas tardias detonando seu sono.", + "Log this": "Registra isso, p*rra", + "Long stretches without moving are linked to poorer health, even on days you exercise. A short walk every hour helps.": "Ficar horas sentado está ligado a uma saúde pior, mesmo nos dias em que você se exercita. Levanta essa b*nda pra uma caminhada curta a cada hora.", + "Long-term insights appear as more nights are tracked.": "Insights de longo prazo aparecem conforme você registra mais noites. Sem atalho.", + "Looks like a strong night after a more active day. Your duration was solid and deep sleep made up a healthy part of the night, which kept the score high.": "Opa, uma noite forte depois de um dia mais ativo. A duração foi boa e o sono profundo ocupou uma parte saudável da noite, então a pontuação ficou alta. Não vai se achar.", + "Low fatigue — well recovered.": "Fadiga baixa — bem recuperado. Suspeito.", + "Low stress score — relaxed.": "Estresse baixo — relaxado. Quem é você?", + "Lowest heart rate {0} before waking": "Frequência cardíaca mais baixa {0} antes de acordar. O corpo ainda tava fazendo hora extra.", + "Measuring… updates when complete": "Medindo… relaxa, atualiza quando terminar", + "Measuring… {0}s": "Medindo… {0}s. Paciência.", + "Meet daily goals": "Bate a droga das metas diárias", + "Message the coach": "Encher o saco do coach", + "Mild fatigue.": "Fadiga leve. Meh.", + "Missed": "Perdida. De novo.", + "Morning": "Manhã. Aff.", + "Morning type": "Pessoa da manhã (irritante)", + "Move every hour": "Mexe essa b*nda a cada hora", + "Move reminder": "Puxão de orelha pra levantar", + "Near baseline": "Perto da linha de base. Sem graça.", + "Needs 5 nights in the last 2 weeks": "Precisa de 5 noites nas últimas 2 semanas. Usa o anel.", + "Needs care": "Requer atenção. Na moral.", + "Needs work": "Precisa melhorar. Bastante.", + "Never mind": "Esquece", + "New chat": "Novo desabafo", + "Night owl": "Noturno. Claro que é.", + "Nightly sleep": "Sono por noite (ou a falta dele)", + "Nightly sleep: no nights tracked in this range": "Sono por noite: zero noites registradas neste período. Zero.", + "No HR samples yet — sync your ring to start your trend.": "Ainda não há amostras de HR. Sincroniza a droga do anel pra começar sua tendência.", + "No HRV data yet — HRV builds up over a few hours of wear.": "Ainda não há dados de HRV. Usa o anel umas horas, a HRV não se forma sozinha.", + "No SpO₂ samples yet — take a reading to start your trend.": "Ainda não há amostras de SpO₂. Faz logo uma medição pra começar sua tendência.", + "No activity records synced for {0} yet.": "Nenhuma atividade sincronizada para {0} ainda. Você se mexeu, pelo menos?", + "No blood pressure data yet.": "Ainda não há dados de pressão arterial. Nada. Necas.", + "No blood sugar data yet.": "Ainda não há dados de glicemia. Chocante.", + "No data yet today": "Ainda sem dados hoje. Acorda, anel.", + "No daytime stress readings today yet.": "Ainda não há leituras de estresse diurno hoje. Aproveita enquanto dura.", + "No drinks this week": "Nenhuma bebida nesta semana. Quem é você?", + "No drinks yet this week": "Nenhuma bebida ainda nesta semana. Ainda.", + "No events yet. Sync the ring or trigger a measurement to see data.": "Nenhum evento ainda. Sincroniza o anel ou inicia uma medição, c*ralho, aí você vê os dados.", + "No nights tracked in this range yet.": "Nenhuma noite registrada neste período ainda. Que p*rra você tava fazendo?", + "No obvious signs in your biometrics of something straining your body.": "Nenhum sinal claro nos seus dados biométricos de algo sobrecarregando seu corpo. Opa. Sem graça, mas bom.", + "No readiness today: {0}. Wear the ring snugly tonight.": "Sem prontidão hoje: {0}. Usa a droga do anel bem ajustado esta noite.", + "No ring connected": "Nenhum anel conectado. Que solidão.", + "No ring paired": "Nenhum anel pareado. Então tamo fazendo o quê aqui?", + "No rings found yet": "Nenhum anel encontrado ainda. Brincando de esconde-esconde, pelo visto.", + "No signs": "Sem sinais. Ufa.", + "No sleep captured last night": "Nenhum sono captado na noite passada. Que p*rra aconteceu?", + "No sleep recorded": "Nenhum sono registrado. Você foi pra cama, pelo menos?", + "No sleep recorded for last night yet. Sync your ring after you wake up.": "Ainda não há sono da noite passada. Sincroniza o anel depois de acordar, dorminhoco.", + "No sleep tracked last night": "Nenhum sono registrado na noite passada. Virou vampiro?", + "No sleep yet": "Ainda sem sono. Óbvio.", + "No stress data yet — take a measurement.": "Ainda não há dados de estresse. Faz uma medição. Estressante, eu sei.", + "No temperature data yet — temperature trends appear after overnight wear.": "Ainda não há dados de temperatura. Usa o anel durante a noite que as tendências aparecem. Paciência, p*rra.", + "No workouts recorded today": "Nenhum treino hoje. O sofá agradece.", + "No workouts yet — recorded workouts will appear here.": "Nenhum treino ainda. Quando você finalmente suar, eles aparecem aqui.", + "Not enough data for this period.": "Dados insuficientes para este período. Não dá pra trabalhar com migalha.", + "Not enough monthly data": "Dados mensais insuficientes. Continua usando.", + "Not enough nights yet": "Noites insuficientes por enquanto. Dorme mais. Com o anel.", + "Not enough of a trend to estimate runtime yet — it appears after a few hours of discharge.": "Ainda não há tendência suficiente pra estimar a autonomia. Dá umas horas de descarga, poxa.", + "Not enough recent weigh-ins for a trend yet (needs 3 across a week).": "Ainda não há pesagens recentes suficientes para uma tendência (são necessárias 3 em uma semana). Sobe na balança, bora.", + "Not enough weekly data": "Dados semanais insuficientes. Continua usando.", + "Not enough yearly data": "Dados anuais insuficientes. Volta daqui a, sei lá, um ano.", + "Not enough {0} data for this view yet.": "Ainda não há dados de {0} suficientes para esta visualização. Paciência, p*rra.", + "Not enough {0} data yet": "Ainda não há dados de {0} suficientes. Aff.", + "Not now": "Aff, agora não", + "Not yet": "Ainda não, relaxa", + "Notably below your typical HRV — often linked to stress, poor sleep, or strain.": "Bem abaixo da sua HRV habitual. Estresse, sono uma b*sta ou sobrecarga? Escolhe um — provavelmente os três.", + "Nothing logged yet": "Nada registrado ainda. Que surpresa.", + "Nothing new to upload": "Nada novo pra enviar. Vai fazer alguma coisa.", + "Nothing stood out": "Nada se destacou. Uau. Emocionante.", + "Nothing to compare yet. Check back after the first full day and night.": "Nada pra comparar ainda. Volta depois de um dia e uma noite inteiros, apressadinho.", + "Nothing tonight": "Nada esta noite. Sei. Vamos ver.", + "On track": "No caminho certo. Não se acha, não.", + "On until {0}/{1}: activity nudges paused, the coach eases off.": "Ativo até {0}/{1}: sem lembretes de atividade, e o Coach fica mais quietinho.", + "Open Drinks: this week, your plan and what drinking does to your nights": "Abrir Bebidas: esta semana, seu plano e o que a p*rra da bebida faz com suas noites", + "Open PulseLoop to sync": "Abre o PulseLoop pra sincronizar, c*ralho", + "Optimal": "Ideal. Suspeito.", + "Other ideas": "Outras ideias geniais", + "Out of sync": "Fora de sincronia. Clássico.", + "Own your ring data": "Seus dados do anel são seus, p*rra", + "Pair your ring first.": "Pareia o anel primeiro. Bora.", + "Pay attention": "Ei! Presta atenção", + "Pick the number before the first drink. It's easier to keep a number you chose beforehand.": "Escolhe o número ANTES da primeira dose. Depois dela, você vai negociar feito advogado.", + "Plan the next few days with the coach.": "Planeja os próximos dias com o coach. Alguém tem que planejar.", + "Plan tonight": "Planejar esta noite (antes que ela planeje você)", + "Plan: dry night": "Plano: noite sem álcool. Ousado.", + "Possible nap": "Possível cochilo. Tarde de preguiça, né?", + "PulseLoop learns your baseline over time": "O PulseLoop aprende sua linha de base com o tempo. Ele não é vidente.", + "PulseLoop · from my ring, compared with last week": "PulseLoop · do meu anel, comparado com a semana passada. Segura essa.", + "REM sleep supports memory and mood. It usually makes up 20 to 25% of a night, about 90 minutes or more.": "O sono REM segura sua memória e seu humor antes que vire tudo m*rda. Normalmente ocupa de 20 a 25% da noite, uns 90 minutos ou mais.", + "Reading your drinks…": "Lendo suas bebidas… ih, rapaz…", + "Reading your history…": "Fuçando no seu histórico…", + "Ready to start the day? Take a measurement and I'll help you plan it.": "Já acordou? Tá bom. Faz uma medição que eu te ajudo a planejar a p*rra do dia.", + "Reconnect last ring": "Trazer o último anel de volta", + "Relaxed": "Relaxado. Pra variar.", + "Resilience {0} over {1} days": "Resiliência {0} em {1} dias. Nem bom, nem ruim.", + "Rest days let your body adapt to training. One or two easier days a week is enough for most people.": "Dias de descanso são quando o corpo se adapta de verdade. Um ou dois dias mais leves por semana bastam pra maioria das pessoas. Não, sete não.", + "Resting heart rate trending down": "Frequência cardíaca em repouso em queda. Tá, parabéns, que seja.", + "Resting heart rate up": "Frequência cardíaca em repouso em alta. Que que cê aprontou?", + "Restored {0} · relaxed {1} · engaged {2} · stressed {3}": "Restaurado {0} · de boa {1} · na correria {2} · surtando {3}", + "Ride it out": "Aguenta firme, guerreiro", + "Right at your limit": "Exatamente no seu limite. Para. Aí. Mesmo.", + "Right at your usual {0} bpm": "Exatamente no seu habitual de {0} bpm. Sem graça. Ótimo.", + "Ring hasn't synced in >12h — today's data may be stale.": "O anel não sincroniza há mais de 12h. Os dados de hoje podem estar velhos pra c*ralho.", + "Saved & sent to ring ✓": "Salvo e empurrado pro anel ✓", + "Saved — will sync on next connect": "Salvo. Sincroniza na próxima conexão, relaxa", + "Screens in bed": "Telas na cama. Tá de sacanagem?", + "See what affects you": "Veja que p*rra afeta você", + "See what drinking does to your own nights": "Veja o que a bebida faz com suas próprias noites. Spoiler: nada de bom.", + "See your vitals": "Ver seus sinais vitais. Se tiver coragem.", + "Set up · under a minute": "Configuração · menos de um minuto. Sem desculpa.", + "Set your typical week in settings to see drinks, money and calories saved.": "Define sua semana típica nas configurações pra ver as bebidas, o dinheiro e as calorias que você não torrou.", + "Setup complete": "Configuração concluída. Até que enfim.", + "Shaded: your usual range over the last 30 days": "Área sombreada: sua faixa habitual nos últimos 30 dias. Fica nela.", + "Share my week": "Compartilhar minha semana (corajoso)", + "Short duration": "Curto. Curto demais.", + "Skip for now": "Pular por enquanto, medroso", + "Sleep a night": "Dormir uma noite. Inteirinha.", + "Sleep midpoint varies by about {0} min": "O ponto médio do sono varia uns {0} min. Escolhe um horário pra deitar, c*ralho.", + "Sleep pending": "Sono pendente. Esperando…", + "Sleep synced": "Sono sincronizado. Bora ver o estrago.", + "Sleep {0} a night": "Dormir {0} por noite. Não é sugestão.", + "Sleeping less this week": "Dormindo menos nesta semana. Que p*rra tá acontecendo com seu sono?!", + "Sleeping more this week": "Dormindo mais nesta semana. Olha só, hibernando.", + "Slightly below": "Um pouco abaixo. Meh.", + "Slightly low": "Um pouco baixo. Hmm.", + "Slightly off": "Um pouco fora. Típico.", + "Slow breathing: in for 4 seconds, out for 6.": "Respiração lenta: inspira por 4 segundos, expira por 6. Se acalma, c*ralho.", + "Small signs in your biometrics of something straining your body.": "Sinais leves nos seus dados biométricos de que algo tá sobrecarregando seu corpo. Aff.", + "Snap your plate; the AI estimates it": "Fotografa o prato; a IA faz a estimativa (e o julgamento)", + "So far (preliminary)": "Até agora (não se empolga)", + "Solid": "Boa. Irritantemente boa.", + "Solid night overall": "Boa noite no geral. Não deixa subir à cabeça.", + "Some of your signals look unusual": "Alguns dos seus sinais estão esquisitos pra c*ralho", + "Some signals look unusual": "Alguns sinais estão esquisitos", + "Sorry, something went wrong: {0}": "Bom, deu m*rda. Algo deu errado: {0}", + "Start a breathing session": "Respira, c*ralho", + "Start tracking": "Começa a monitorar logo", + "Start using PulseLoop": "Tá, começa a usar o PulseLoop", + "Start with recommended targets. You can change these anytime.": "Começa com as metas recomendadas. Dá pra mudar quando quiser, e você vai mexer mesmo.", + "Steady build": "Evolução constante. Devagar, mas vai.", + "Stop scanning": "Para a busca logo", + "Stressful day": "Dia estressante. Claro que foi.", + "Strong language ahead": "Palavrões pra c*ralho à vista", + "Strong recovery signal": "Sinal forte de recuperação. Não deixa subir à cabeça.", + "Stronger signs in your biometrics of something straining your body.": "Seus dados biométricos estão gritando mais alto agora. Algo tá sobrecarregando seu corpo, p*rra.", + "Summarize my week": "Esculacha minha semana", + "Sunday evening: your week compared with the last one, and one thing to focus on.": "Domingo à noite: sua semana contra a anterior, e a única p*rra de coisa pra consertar.", + "Swipe to find your model, then tap to connect.\nYou can also explore first and pair later.": "Desliza pra achar seu modelo e toca pra conectar. Não é física quântica.\nVocê também pode explorar primeiro e parear depois.", + "Sync Now": "Sincronizar agora, c*ralho", + "Sync all history": "Arrancar todo o histórico", + "Sync failed": "Falha na sincronização. Aff.", + "Sync now": "Sincroniza agora, c*ralho", + "Sync your ring to start collecting movement, heart rate, blood oxygen, and recovery context.": "Sincroniza esse anel logo. Sem sincronizar, nada de movimento, frequência cardíaca, oxigênio no sangue ou dados de recuperação. Só uns cards vazios e tristes.", + "Syncing latest data…": "Arrancando os dados mais recentes do seu anel…", + "Syncing…": "Sincronizando… segura a onda, p*rra.", + "TODAY'S BRIEF": "RESUMO DE HOJE, P*RRA", + "Tag your day": "Confessa o seu dia", + "Tag your days for a couple of weeks. Once a tag has at least {0} nights after it, PulseLoop compares those nights with your others.": "Marca seus dias por umas semanas. Quando uma marcação tiver pelo menos {0} noites depois dela, o PulseLoop compara essas noites com as outras e te conta o que tá ferrando com elas.", + "Tag {0} more {1} to see an effect": "Marca mais {0} {1}. Aí a gente conversa.", + "Take it easy": "Vai com calma. Na moral.", + "Talk it through": "Desembucha", + "Tell the coach, and it plans with your scale, ring and food data.": "Conta pro coach. Ele planeja com os dados da sua balança, do anel e da alimentação, e ainda te julga um pouquinho.", + "That app shares nothing PulseLoop can compare.": "Esse app não compartilha nada que o PulseLoop possa comparar. Inútil.", + "The AI didn't return a usable estimate. Try again or enter the meal manually.": "A IA engasgou e devolveu m*rda nenhuma. Tenta de novo ou digita a refeição na mão.", + "The activity must end in the past.": "A atividade precisa terminar no passado. Não dá pra registrar o futuro, gênio.", + "The import failed. Try again in a moment.": "A importação falhou. Óbvio. Tenta de novo daqui a pouco.", + "The ring disconnected during measurement.": "O anel vazou no meio da medição. Que falta de educação.", + "The ring recorded this night in {0} parts": "O anel registrou esta noite em {0} partes. Que que cê tava fazendo aí?", + "The scan failed. Try again in a moment.": "A busca falhou. Aff. Tenta de novo daqui a pouco.", + "The share of your time in bed spent asleep. Around 85% or more is considered good.": "Quanto do seu tempo na cama você dormiu de verdade, e não ficou rolando o feed. Uns 85% ou mais é considerado bom.", + "The stage mix was useful, but total sleep time was short for a full recovery window. A slightly earlier wind-down would likely improve tomorrow's score.": "A combinação de estágios foi boa, mas você dormiu pouco pra c*ralho pra uma recuperação completa. Começa a relaxar um pouco mais cedo que a pontuação de amanhã agradece.", + "The target date has passed; agree a new one.": "A data-alvo veio e foi embora. Define uma nova, e dessa vez leva a sério.", + "The workout must finish before now.": "O treino tem que terminar antes de agora. Sem viagem no tempo, campeão.", + "There's room to move more today.": "Ainda dá pra se mexer mais hoje. Bem mais.", + "There's room to move more. Start with your {0}.": "O sofá tá ganhando. Começa pelo seu {0}.", + "This is a test check-in notification.": "Esta é uma notificação de check-in de teste. Oi. Aff.", + "This week is {0}% less active than your monthly average": "Esta semana está {0}% menos ativa que sua média mensal. Que p*rra aconteceu?", + "This week is {0}% more active than your monthly average": "Esta semana está {0}% mais ativa que sua média mensal. Exibido.", + "This week matches your monthly rhythm": "Esta semana segue seu ritmo mensal. Que emoção.", + "This workout is no longer in local storage. It may have been deleted or replaced.": "Este treino sumiu do armazenamento local. Excluído ou substituído. Puf.", + "Thriving": "Excelente, pelo visto", + "Time asleep": "Tempo dormindo de verdade", + "Time for {0}": "Hora de {0}. Bora.", + "Time to move": "Levanta essa b*nda daí", + "Time to wind down": "Hora de relaxar. Larga a p*rra do celular.", + "Tired": "Cansado. Que surpresa.", + "Tired — consider lighter activity and good sleep.": "Cansado. Pega leve hoje e dorme direito à noite, pelo amor de deus, c*ralho.", + "Today's steps against your step goal. It fills up as the day goes on.": "Os passos de hoje em relação à sua meta. A barra enche ao longo do dia. Se você se mexer.", + "Tonight: {0} drink{1}": "Hoje à noite: {0} bebida{1}. Saúde, né.", + "Total workout time this week. Health guidelines suggest at least 150 minutes of moderate activity a week.": "Tempo total de treino nesta semana. As diretrizes de saúde pedem pelo menos 150 minutos de atividade moderada por semana. Sem desculpa.", + "Track more nights this month to see a monthly average.": "Registra mais noites este mês. Não dá pra tirar média do que você nem usou.", + "Tracked {0} {1} this year": "Este ano você registrou {0} {1}. Nada mal, acho.", + "Try again": "Tenta de novo, c*ralho", + "Turn on Bluetooth to find and connect your ring.": "Liga o Bluetooth. Não dá pra achar seu anel por telepatia.", + "Two-hour 140–199 is above the typical range.": "Duas horas após: 140–199 está acima da faixa típica. Hmm.", + "Under 100 steps in an hour, 9:00 to 20:00, at most every two hours. Off in Rest Mode.": "Te enche o saco com menos de 100 passos em uma hora, das 9:00 às 20:00, no máximo a cada duas horas. Fica quieto no Modo descanso.", + "Under 100 steps in the last hour. A few minutes on your feet helps your energy and your sleep.": "Menos de 100 passos na última hora?! Fica de pé uns minutinhos. Sua energia e seu sono agradecem.", + "Unusual last night: ": "Coisa esquisita pra c*ralho na última noite: ", + "Unusual signals alert": "Alerta de coisa esquisita", + "Upload failed: {0}": "Falha no envio, aff: {0}", + "Uploaded 1 workout": "1 treino enviado. Um. Uau.", + "Uploaded {0} workouts": "{0} treinos enviados. Olha só você.", + "Use without a ring": "Usar sem anel, na raça", + "User profile is incomplete — insights may be less personalized.": "Seu perfil tá feito nas coxas — os insights podem ser menos personalizados. Preenche isso.", + "Usual sleep midpoint {0} · this week {1}": "Ponto médio habitual do sono {0} · esta semana {1}. Hmm.", + "Variable nights": "Noites caóticas", + "Waiting for first sync": "Aguardando a primeira sincronização. Ainda esperando…", + "Waiting for the first import": "Aguardando a primeira importação. Batendo o pé.", + "Waiting for {0} to deliver {1} day{2}. Open the app that syncs it to send it sooner; otherwise those days are scored 24 hours after they end.": "Ainda esperando {0} soltar {1} dia{2}. Abre o app que sincroniza pra mandar antes; senão esses dias são avaliados 24 horas depois de terminarem.", + "Wake the ring by tapping or moving it, and keep it close.": "Acorda a p*rra do anel tocando ou mexendo nele, e deixa ele por perto.", + "Want to drink less? Track drinks, set a weekly limit and see what each drink does to your nights": "Quer beber menos? Registra as bebidas, define um limite semanal e vê o que cada dose faz com suas noites. Spoiler: nada de bom.", + "Warmer than typical. Trends matter more than a single reading.": "Mais quente que o normal. Calma, a tendência importa mais que uma leitura isolada.", + "Wear your ring during the day and sync after sleep. Trends become more personal after a few days.": "Usa o anel durante o dia e sincroniza depois de dormir. Dá uns dias até as tendências ficarem pessoais. E julgadoras.", + "Wear your ring overnight for a few nights to build a weekly view.": "Usa o anel à noite por algumas noites. Sem anel, sem visão semanal. Simples.", + "Wear your ring overnight so PulseLoop can track your next night.": "Dorme com o anel, pelo amor de deus, c*ralho, pro PulseLoop acompanhar sua próxima noite.", + "Wear your ring overnight to see your hypnogram here.": "Usa o anel à noite e aí você ganha um hipnograma. Antes disso, não.", + "Wear your ring today. Your baseline builds from here.": "Usa o anel hoje. Sua linha de base não vai se construir sozinha.", + "What affects you": "O que te ferra", + "What changed": "Que p*rra mudou", + "What did you do?": "Que p*rra você fez?", + "What's your goal?": "E aí, qual é a p*rra da meta?", + "When the ring is at 30% or less a couple of hours before your usual bedtime.": "Quando o anel estiver com 30% ou menos algumas horas antes do seu horário habitual de dormir. Carrega essa b*sta.", + "When two or more of last night's signals are outside your usual range.": "Quando dois ou mais sinais da última noite saírem dos trilhos da sua faixa habitual.", + "When you want a drink": "Quando bater a vontade de beber", + "Where the ring falls short": "Onde o anel faz m*rda", + "Whether your sleep lines up with your body clock. A midpoint between midnight and about 3:30 am is ideal for most people.": "Se o seu sono tá alinhado com seu relógio biológico ou se você tá vivendo feito vampiro. Um ponto médio entre meia-noite e cerca de 3h30 é o ideal para a maioria das pessoas.", + "Why there's no score today": "Por que c*ralhos não tem pontuação hoje", + "Wind-down reminder": "Lembrete chato de ir dormir", + "Woke up": "Acordou. Aff.", + "Workout history": "Histórico de treinos (as provas)", + "Workout in progress": "Treino em andamento. Continua.", + "Workout not found": "Treino não encontrado. Será que rolou mesmo?", + "Yes, a nap": "Sim, um cochilo. Pode julgar.", + "Yesterday's steps compared with your usual. Both a very inactive day and an unusually heavy one lower this.": "Os passos de ontem contra o seu habitual. Tanto um dia de sofá quanto um dia de maluco puxam isso pra baixo.", + "You are now a developer!": "Agora você é um desenvolvedor! Que Deus nos ajude.", + "You averaged {0} across the full week. Your nights were tracked consistently, so this is a dependable picture of where your sleep sits right now.": "Sua média foi {0} na semana inteira. Você registrou todas as noites, então pela primeira vez este é um retrato confiável de como está seu sono.", + "You averaged {0} across {1} tracked nights this week. That's a useful read, but {2} missing {3} mean the trend is still incomplete.": "Sua média foi {0} em {1} noites registradas esta semana. Meio útil, mas {2} {3} faltando deixam a tendência cheia de buraco.", + "You can pair a ring later from Settings.": "Tá, pareia um anel depois em Configurações.", + "You hit your {0} step goal — nice work.": "Você bateu sua meta de {0} passos. C*ralho. Olha só, hein.", + "You logged {0}h {1}m of sleep. Here's to a strong day — get moving when you can.": "Você registrou {0}h {1}m de sono. Que seja um dia daqueles — agora se mexe quando puder.", + "You moved less than last week. A daily walk is an easy way back.": "Você se mexeu menos que na semana passada. Que p*rra é essa? Uma caminhada diária é um jeito fácil de voltar.", + "You slept long enough, but awake time was a bit elevated. If this repeats, look at late caffeine, alcohol, temperature, or stress near bedtime.": "Você dormiu o suficiente, mas ficou acordando feito coruja. Se isso se repetir, olha a cafeína tarde, o álcool, a temperatura ou o estresse perto da hora de dormir.", + "You're all set": "Tudo pronto. Até que enfim.", + "You're at %,d steps, %dh %02dm of sleep, and your latest reading is %s.": "Você está com %,d passos, %dh %02dm de sono, e sua leitura mais recente é %s. Podia ser pior.", + "You're at %,d steps. Sync after waking to add recovery context.": "Você está com %,d passos. Sincroniza depois de acordar, senão não dá pra te dizer o tamanho do estrago.", + "You're at {0} of {1}. About {2} minutes of walking closes it.": "Você está em {0} de {1}. Uns {2} minutos de caminhada fecham isso. Bora.", + "You're in good shape today. Your usual plans should feel fine.": "Você está em boa forma hoje. Aff, tá bom. Seus planos habituais devem correr bem.", + "You're well recovered. A good day to take on something demanding.": "Você está bem recuperado. Hoje não tem desculpa. Vai fazer algo puxado.", + "You're {0} g short of today's protein, so this leans on protein.": "Faltam {0} g da proteína de hoje, então esta opção prioriza proteína. Come a p*rra da proteína.", + "You're {0} step{1} away from Developer options.": "Faltam {0} passo{1} para as Opções do desenvolvedor. Continua tocando, nerd.", + "Your HRV dipped this week. Lighter days and consistent sleep help it recover.": "Sua HRV despencou esta semana. Dias mais leves e sono regular ajudam a recuperar. Tenta aí.", + "Your average sleep over the last two weeks compared with your goal. It shows whether sleep debt is building up.": "Seu sono médio nas últimas duas semanas contra sua meta. Mostra se a dívida de sono tá acumulando feito louça na pia.", + "Your body is asking for rest. Make recovery today's priority.": "Seu corpo tá implorando por descanso. Faz da recuperação a prioridade de hoje, c*ralho.", + "Your body is asking for rest. Make recovery today's priority: your {0} is furthest from your usual.": "Seu corpo tá implorando por descanso. Faz da recuperação a prioridade de hoje: seu {0} tá bem longe do habitual.", + "Your body is still recovering. Go a little easier today and watch your {0}.": "Seu corpo ainda está se recuperando. Pega um pouco mais leve hoje e fica de olho no seu {0}.", + "Your body is still recovering. Go a little easier today.": "Seu corpo ainda está se recuperando. Maneira um pouco hoje, p*rra.", + "Your data has been restored from the backup.": "Seus dados voltaram do backup. De nada.", + "Your health, on your terms — no subscription, no cloud.": "Sua saúde, do seu jeito. Sem assinatura, sem nuvem, sem p*taria.", + "Your heart rate variability over the last few nights, weighted toward last night, compared with your usual. Higher than usual generally means you're well recovered; a drop suggests strain.": "Sua variabilidade da frequência cardíaca nas últimas noites, com mais peso para a última, contra o seu habitual. Acima do habitual geralmente indica boa recuperação; uma queda quer dizer que algo tá te moendo.", + "Your long-term sleep trend": "A novela do seu sono no longo prazo", + "Your lowest sustained heart rate last night, compared with your usual over recent nights. A resting heart rate a few beats above normal can mean your body is working on recovery, stress, or an oncoming illness.": "Sua frequência cardíaca mais baixa sustentada na noite passada, contra o seu habitual nas noites recentes. Alguns batimentos acima do normal podem indicar que seu corpo tá ocupado com recuperação, estresse ou uma doença chegando.", + "Your month in sleep": "Seu mês de sono. Segura essa.", + "Your monthly average is {0} across {1}. The biggest lever is consistency — a few short nights move this number more than any single great one.": "Sua média mensal é {0} em {1}. A maior alavanca é a regularidade — umas noites curtas de m*rda mexem mais nesse número do que qualquer noite excelente.", + "Your monthly average is {0}, but coverage is low ({1}), so I'd treat that number cautiously. More nights tracked will sharpen the trend.": "Sua média mensal é {0}, mas a cobertura tá uma porcaria ({1}), então não confia muito nesse número. Usa o anel em mais noites que a tendência fica mais clara.", + "Your nights against your own normal, kept as a log": "Suas noites contra o seu próprio normal, guardadas como um registro da vergonha", + "Your nights look like your usual. That's an answer too.": "Suas noites parecem as de sempre. Sem graça. Isso também é uma resposta.", + "Your personalized baseline unlocks": "Sua linha de base personalizada é liberada. Uma hora.", + "Your preference: ": "Sua preferência, pelo visto: ", + "Your resting heart rate is up on last week. Prioritise recovery and sleep.": "Sua frequência cardíaca em repouso subiu em relação à semana passada. Que p*rra é essa? Prioriza recuperação e sono.", + "Your ring and phone agree within 5% ({0} days).": "Seu anel e seu celular concordam dentro de 5% ({0} dias). Milagre.", + "Your ring counts about {0}% fewer steps than your phone ({1} days).": "Seu anel conta cerca de {0}% menos passos que seu celular ({1} dias). Mão de vaca, hein.", + "Your ring counts about {0}% more steps than your phone ({1} days).": "Seu anel conta cerca de {0}% mais passos que seu celular ({1} dias). Generoso, né?", + "Your sleep duration and stage balance were strong. Deep sleep looked supportive, which helped keep the overall score high.": "A duração do sono e o equilíbrio entre os estágios foram ótimos. O sono profundo finalmente deu as caras, o que segurou a pontuação lá em cima. Não se acha.", + "Your sleep was in a workable range, with the score shaped mostly by duration and stage balance. Deep and light sleep were readable enough to give a useful recovery snapshot.": "Seu sono foi… dá pro gasto. Meh. A pontuação veio mais da duração e do equilíbrio dos estágios, e o sono profundo e o leve foram legíveis o bastante pra dar um bom retrato da recuperação.", + "Your week at a glance": "Sua semana num relance. Segura essa.", + "Your workout is still recording. Finish it now, or keep recording?": "Seu treino ainda está sendo gravado. Terminou ou tá só enrolando? Finalizar agora ou continuar gravando?", + "{0} awake during the night": "{0} acordado durante a noite. Rolou festa?", + "{0} bpm lower over two weeks than the four before. Often a sign of improving fitness or recovery.": "{0} bpm mais baixa nas últimas duas semanas que nas quatro anteriores. Muitas vezes é sinal de melhora do condicionamento ou da recuperação. Aff, tá bom, parabéns.", + "{0} bpm over the last 3 nights against your usual {1}. Illness, alcohol, stress, heat or hard training can all raise it.": "{0} bpm nas últimas 3 noites contra seu habitual de {1}. Doença, álcool, estresse, calor ou treino pesado podem jogar ela lá pra cima.", + "{0} complete": "{0} concluído. Até que enfim.", + "{0} days left": "Faltam {0} dias. Tic-tac.", + "{0} drinks this week": "{0} bebidas esta semana. Hmm.", + "{0} dry days in a row": "{0} dias seguidos sem álcool. C*ralho, olha só você.", + "{0} dry day{1} so far": "{0} dia{1} sem álcool até agora. Segue firme.", + "{0} inactive {1} since {2}:00": "{0} {1} de bunda no sofá desde as {2}:00", + "{0} left this week": "Restam {0} esta semana. Não estraga.", + "{0} min a night less than your usual over the last 7 nights.": "{0} min por noite a menos que o seu habitual nas últimas 7 noites. Pra onde c*ralhos tá indo seu sono?", + "{0} min a night more than your usual over the last 7 nights.": "{0} min por noite a mais que o seu habitual nas últimas 7 noites. Olha a Bela Adormecida aí.", + "{0} more dry day{1} to reach {2}": "Mais {0} dia{1} sem álcool para chegar a {2}. Você consegue, provavelmente.", + "{0} ms over the last 3 nights against your usual {1} ({2}%). Your body may be under extra load.": "{0} ms nas últimas 3 noites contra seu habitual de {1} ({2}%). Seu corpo tá carregando um peso extra do c*ralho agora.", + "{0} of {1} dry days; a fresh week starts Monday": "{0} de {1} dias sem álcool. Uma nova semana começa na segunda, graças a Deus.", + "{0} over your limit": "{0} acima do seu limite. Tá de sacanagem?", + "{0} steps at {1}.": "{0} passos às {1}. Só isso?", + "{0} steps to your goal.": "Faltam {0} passos para sua meta. Bora.", + "{0} steps today. {1} Time to start winding down.": "{0} passos hoje. {1} Agora larga a p*rra do celular e vai relaxar.", + "{0}% of the night asleep": "{0}% da noite dormindo de verdade" +} \ No newline at end of file diff --git a/app/src/main/assets/i18n/pt-BR.json b/app/src/main/assets/i18n/pt-BR.json index 9be81242..c1d72a6a 100644 --- a/app/src/main/assets/i18n/pt-BR.json +++ b/app/src/main/assets/i18n/pt-BR.json @@ -57,7 +57,6 @@ "4 or more times a week": "4 ou mais vezes por semana", "4 tbsp (100 g)": "4 colheres de sopa (100 g)", "5 or 6": "5 ou 6", - "56ff/Jring rings, blood sugar). Blood pressure is measured directly by the sensor.": "anéis 56ff/Jring, glicemia). A pressão arterial é medida diretamente pelo sensor.", "600 ml": "600 ml", "7 to 9": "7 a 9", "7d": "7d", @@ -65,16 +64,22 @@ "A bridge app: it copies another app's data (for example Huawei Health) into Health Connect.": "Um app ponte: ele copia dados de outro app (por exemplo, Huawei Health) para o Health Connect.", "A bridge app: name the watch behind it.": "Um app ponte: informe o relógio por trás dele.", "A check is already open.": "Já há uma verificação em andamento.", + "A device wellness score from 0–100 based on heart-rate patterns. Lower is calmer. It's an estimate, not a medical stress measure.": "Uma pontuação de bem-estar de 0 a 100 baseada nos padrões da frequência cardíaca. Quanto menor, mais calmo. É uma estimativa, não uma medida médica de estresse.", + "A device wellness score from 0–100 estimating tiredness. Higher means more fatigue. It's a ring estimate, not a clinical scale.": "Uma pontuação de bem-estar de 0 a 100 que estima o cansaço. Quanto maior, mais fadiga. É uma estimativa do anel, não uma escala clínica.", "A few more days of data and your routines show up here.": "Mais alguns dias de dados e suas rotinas aparecem aqui.", + "A headache that won't go away or gets worse": "Dor de cabeça que não passa ou piora", "A high reading regardless of context. Confirm with a meter.": "Uma leitura alta independentemente do contexto. Confirme com um medidor.", "A high resting heart rate. Talk to a clinician if it persists at rest.": "Frequência cardíaca em repouso alta. Fale com um profissional de saúde se persistir em repouso.", + "A hot, painful, red area on a breast with fever or chills": "Uma área quente, dolorida e vermelha na mama, com febre ou calafrios", "A little below your usual range.": "Um pouco abaixo da sua faixa habitual.", "A low resting heart rate is common with high fitness.": "Frequência cardíaca em repouso baixa é comum em quem tem bom condicionamento.", + "A low score. Keep checking in; how you feel can change in the months after birth.": "Uma pontuação baixa. Continue respondendo de tempos em tempos; o que você sente pode mudar nos meses depois do parto.", "A normal blood-oxygen level is 95–100%.{0}": "Um nível normal de oxigênio no sangue é 95–100%.{0}", "A nudge about 30 minutes before your suggested bedtime.": "Um lembrete cerca de 30 minutos antes do horário sugerido para dormir.", + "A painful, red or swollen leg or arm": "Uma perna ou braço dolorido, vermelho ou inchado", "A record for you and your doctor. PulseLoop doesn't check interactions or doses; ask your pharmacist.": "Um registro para você e seu médico. O PulseLoop não verifica interações nem doses; consulte seu farmacêutico.", - "A ring estimate is not a substitute for a cuff.": "Uma estimativa do anel não substitui um medidor de pressão de braço.", "A ring is paired. Forget it in Settings → Wearable first: the two would count the same steps and nights.": "Há um anel pareado. Esqueça-o primeiro em Configurações → Wearable: os dois contariam os mesmos passos e noites.", + "A screening questionnaire, not a diagnosis.": "Um questionário de rastreamento, não um diagnóstico.", "A solid active day so far.": "Um dia ativo e consistente até agora.", "A steady week. Keep it up.": "Uma semana estável. Continue assim.", "A typical daytime stress score.": "Um nível de estresse diurno típico.", @@ -85,6 +90,7 @@ "ADD DETAIL (OPTIONAL)": "ADICIONAR DETALHES (OPCIONAL)", "AI Coach": "Coach de IA", "AI Coach is off": "Coach de IA desativado", + "AI analysis needs the coach enabled with a configured provider (Settings → AI Coach). You can still search the database or enter the meal manually.": "A análise por IA precisa do coach ativado com um provedor configurado (Configurações → Coach de IA). Você ainda pode buscar no banco de dados ou registrar a refeição manualmente.", "AI estimate": "Estimativa da IA", "AI health coach": "Coach de saúde com IA", "AI meal log": "Registro de refeição com IA", @@ -138,6 +144,7 @@ "After 3 or more": "Depois de 3 ou mais", "After 3 or more drinks, your HRV runs {0}% {1} than on dry nights.": "Depois de 3 ou mais bebidas, sua HRV fica {0}% {1} do que nas noites sem álcool.", "After a session": "Depois de uma sessão", + "After birth, sleep is broken rather than short. The longest unbroken stretch is the number to watch; it usually grows over the first months.": "Depois do parto, o sono fica fragmentado, mais do que curto. O maior trecho sem interrupção é o número a acompanhar; ele costuma crescer nos primeiros meses.", "After the period, until about two weeks before the next one.": "Depois da menstruação, até cerca de duas semanas antes da próxima.", "Against your {0} dry nights since you started. A pattern in your data, not proof of cause.": "Comparado com suas {0} noites sem álcool desde que começou. Um padrão nos seus dados, não prova de causa.", "Age": "Idade", @@ -145,17 +152,17 @@ "Aim for an earlier bedtime: you averaged {0} against a {1} goal.": "Tente dormir mais cedo: sua média foi {0} contra uma meta de {1}.", "Aim to be in bed by {0} to get your {1} hours before your usual {2} wake-up.": "Tente estar na cama até {0} para ter suas {1} horas antes do seu despertar habitual às {2}.", "Alcohol": "Álcool", + "Alcohol: estimated clear for feeding around {0}": "Álcool: estimativa de liberação para amamentar por volta de {0}", "Alcoólicos Anônimos": "Alcoólicos Anônimos", "Alerts when your ring's battery runs low": "Alerta quando a bateria do anel estiver baixa", "All models from {0} ({1})": "Todos os modelos de {0} ({1})", + "All three hold. LAM is about 98% effective only while all three do.": "As três condições valem. A LAM tem cerca de 98% de eficácia somente enquanto as três valerem.", "All-day heart rate": "Frequência cardíaca o dia todo", - "Allow ": "Permitir ", "Allow Bluetooth access": "Permitir acesso ao Bluetooth", "Allow access": "Permitir acesso", "Allow background access so imports also run while PulseLoop is closed.": "Permita o acesso em segundo plano para que as importações também rodem com o PulseLoop fechado.", "Allow background sync": "Permitir sincronização em segundo plano", "Allow camera access in Settings to scan barcodes, or enter the food manually instead.": "Permita o acesso à câmera em Configurações para ler códigos de barras, ou insira o alimento manualmente.", - "Allow it in Settings, or continue without a ring and pair one later.": "Permita nas Configurações ou continue sem anel e pareie um depois.", "Allow more": "Permitir mais", "An LLM-native health app that turns a cheap Bluetooth smart ring into a real, conversational health tracker. It talks to the ring directly over Bluetooth — no vendor cloud, no account — and layers an AI coach on top of your own data.": "Um app de saúde nativo de LLM que transforma um anel inteligente Bluetooth barato em um monitor de saúde de verdade, com conversa. Ele se comunica com o anel diretamente via Bluetooth — sem nuvem do fabricante, sem conta — e adiciona um coach de IA sobre os seus próprios dados.", "An estimated glucose value. No smart ring is cleared to measure glucose, so treat this as a wellness estimate only.": "Um valor estimado de glicose. Nenhum anel inteligente é aprovado para medir glicose, então trate isto apenas como uma estimativa de bem-estar.", @@ -202,6 +209,9 @@ "Awake {0} between": "Acordado {0} entre", "BMI {0}": "IMC {0}", "BP & HRV": "PA e HRV", + "BREASTFEEDING AS CONTRACEPTION (LAM)": "AMAMENTAÇÃO COMO CONTRACEPÇÃO (LAM)", + "Baby under 6 months": "Bebê com menos de 6 meses", + "Baby's birth date": "Data de nascimento do bebê", "Back": "Voltar", "Back up now": "Fazer backup agora", "Backend proxy": "Proxy de backend", @@ -236,6 +246,8 @@ "Blood oxygen (SpO₂) is the percentage of oxygen your blood carries. 95–100% is normal; altitude and lung conditions can lower it.": "O oxigênio no sangue (SpO₂) é a porcentagem de oxigênio que seu sangue transporta. De 95 a 100% é normal; altitude e problemas pulmonares podem reduzi-lo.", "Blood pressure": "Pressão arterial", "Blood pressure calibration": "Calibração da pressão arterial", + "Blood pressure is systolic over diastolic (mmHg). The category is the worse of the two. A ring estimate is not a substitute for a cuff.": "A pressão arterial é sistólica sobre diastólica (mmHg). A categoria é a pior das duas. A estimativa do anel não substitui um medidor de braço.", + "Blood pressure of 160/110 or higher is an emergency. A ring's blood pressure isn't validated: confirm with a cuff, and never let a normal ring reading reassure you.": "Pressão de 160/110 ou mais é uma emergência. A pressão medida pelo anel não é validada: confirme com um medidor de braço e nunca se tranquilize com uma leitura normal do anel.", "Blood sugar": "Glicemia", "Blood sugar calibration": "Calibração da glicemia", "Bluetooth access needed": "Acesso ao Bluetooth necessário", @@ -244,6 +256,11 @@ "Body fat {0}%": "Gordura corporal {0}%", "Body metrics": "Medidas corporais", "Body temperature": "Temperatura corporal", + "Breastfeeding and formula": "Amamentação e fórmula", + "Breastfeeding only": "Só amamentação", + "Breastfeeding only, day and night": "Só amamentação, de dia e de noite", + "Breastfeeding uses about {0} kcal a day more; your intake goal includes it.": "A amamentação gasta cerca de {0} kcal a mais por dia; sua meta de consumo já inclui isso.", + "Breastfeeding: estimated clear around {0}": "Amamentação: estimativa de liberação por volta de {0}", "Breathe": "Respirar", "Breathe in": "Inspire", "Breathe out": "Expire", @@ -254,6 +271,10 @@ "Building momentum": "Ganhando ritmo", "Built on your phone from your ring's data. No AI key needed.": "Gerado no seu celular a partir dos dados do anel. Não precisa de chave de IA.", "CAPS AD": "CAPS AD", + "CDC suggests waiting at least 2 hours per standard drink before breastfeeding. It's an estimate: bodies differ, and pumping and dumping doesn't make it faster. Not drinking is the safest choice.": "O CDC sugere esperar pelo menos 2 horas por dose padrão antes de amamentar. É uma estimativa: cada corpo é diferente, e tirar o leite e descartar não acelera nada. Não beber é a escolha mais segura.", + "CDC suggests waiting at least 2 hours per standard drink before feeding. It's an estimate: bodies differ, and pumping and dumping doesn't make it faster. Not drinking is the safest choice.": "O CDC sugere esperar pelo menos 2 horas por dose padrão antes de amamentar. É uma estimativa: cada corpo é diferente, e tirar o leite e descartar não acelera nada. Não beber é a escolha mais segura.", + "CVV (emotional support, 24 h)": "CVV (apoio emocional, 24 h)", + "CVV listens 24 hours a day, free and anonymous. In danger now, call SAMU.": "O CVV escuta 24 horas por dia, de graça e com sigilo. Se houver perigo agora, ligue para o SAMU.", "CVV · 188": "CVV · 188", "Caffeine after 2 pm": "Cafeína depois das 14h", "Café com leite": "Café com leite", @@ -262,6 +283,8 @@ "Calibrated ✓ (offset %+.0f mg/dL)": "Calibrado ✓ (ajuste %+.0f mg/dL)", "Calibration": "Calibração", "Calibration cleared": "Calibração apagada", + "Call CVV 188": "Ligar para o CVV 188", + "Call SAMU 192": "Ligar para o SAMU 192", "Calm": "Calmo", "Calories": "Calorias", "Calories (kcal)": "Calorias (kcal)", @@ -277,6 +300,7 @@ "Castanhas": "Castanhas", "Casual or brisk walking": "Caminhada leve ou rápida", "Change": "Alterar", + "Changes in your vision": "Alterações na visão", "Charge before bed": "Carregue antes de dormir", "Charge your ring before bed": "Carregue seu anel antes de dormir", "Chart": "Gráfico", @@ -391,6 +415,7 @@ "Deep sleep is when the body does most of its physical recovery. Around 1 to 1.5 hours is typical for younger adults, and it tends to shrink with age.": "O sono profundo é quando o corpo faz a maior parte da recuperação física. Cerca de 1 a 1,5 hora é típico para adultos mais jovens, e tende a diminuir com a idade.", "Deep sleep strong": "Sono profundo forte", "Default": "Padrão", + "Default ports — Ollama 11434 · LM Studio 1234 · llama.cpp 8080 · vLLM 8000 · SGLang 30000. The /v1 path is added for you.": "Portas padrão — Ollama 11434 · LM Studio 1234 · llama.cpp 8080 · vLLM 8000 · SGLang 30000. O caminho /v1 é adicionado para você.", "Delete": "Excluir", "Delete drink?": "Excluir bebida?", "Delete every record PulseLoop wrote to Health Connect and reset the export to start fresh. Your ring data in PulseLoop is untouched.": "Exclua todos os registros que o PulseLoop gravou no Health Connect e redefina a exportação para começar do zero. Os dados do anel no PulseLoop não são afetados.", @@ -427,11 +452,14 @@ "Disconnected": "Desconectado", "Disconnected from Strava": "Desconectado do Strava", "Dismiss": "Dispensar", + "Disque Saúde (find a human milk bank)": "Disque Saúde (encontre um banco de leite humano)", "Distance": "Distância", "Distance, calories, and heart-rate stats are recalculated for the new window.": "Distância, calorias e estatísticas de frequência cardíaca são recalculadas para o novo período.", + "Dizziness or fainting": "Tontura ou desmaio", "Done": "Concluído", "Dose (optional)": "Dose (opcional)", "Drink less, sleep better": "Beba menos, durma melhor", + "Drink to thirst and keep water where you feed. Ask your clinician about iodine, DHA and your baby's vitamin D. This is no time for a diet.": "Beba conforme a sede e deixe água por perto onde você amamenta. Pergunte ao seu profissional de saúde sobre iodo, DHA e a vitamina D do bebê. Não é hora de fazer dieta.", "Drinks": "Bebidas", "Drinks settings": "Configurações de bebidas", "Drinks the user logged themselves, in standard drinks of the given grams. Effects compare the user's own nights after drinking with their dry nights; a pattern, not proof.": "Bebidas que o usuário registrou, em doses padrão com os gramas informados. Os efeitos comparam as noites do próprio usuário após beber com suas noites sem álcool; um padrão, não prova.", @@ -471,8 +499,6 @@ "Ended early: a different ring was paired.": "Encerrado antes do previsto: outro anel foi pareado.", "Ends": "Termina", "Energy and sleep can dip; resting heart rate is often at its lowest.": "Energia e sono podem cair; a frequência cardíaca em repouso costuma estar no ponto mais baixo.", - "English, with attitude. Strong language.": "Em inglês, com atitude. Linguagem forte.", - "Enter a recent lab/meter reading (mg/dL) to offset the displayed value to match.": "Informe uma leitura recente de laboratório/medidor (mg/dL) para ajustar o valor exibido.", "Enter a valid mg/dL reading": "Insira uma leitura válida em mg/dL", "Enter a weight between {0} and {1} {2}.": "Informe um peso entre {0} e {1} {2}.", "Enter your weight in {0}": "Informe seu peso em {0}", @@ -482,9 +508,11 @@ "Estimated": "Estimado", "Estimated cost": "Custo estimado", "Estimated from HRV — your ring doesn't measure stress": "Estimado a partir da HRV — seu anel não mede estresse", + "Estimated from HRV — your ring doesn't measure stress. Scored against your own recent HRV readings, so it says how this reading compares with your normal, not how you compare with anyone else.": "Estimado a partir do HRV — seu anel não mede estresse. A pontuação compara com suas próprias leituras recentes de HRV, então mostra como esta leitura se compara com o seu normal, não com outras pessoas.", "Estimated from resting heart rate and age": "Estimado a partir da frequência cardíaca em repouso e da idade", "Estimated from the current discharge at %.1f %%/h.": "Estimado a partir da descarga atual de %.1f %%/h.", "Estimated wellness metric": "Métrica de bem-estar estimada", + "Estimated wellness metric — not for dosing or diabetes decisions. No smart ring or watch is FDA-authorized to measure or estimate glucose on its own.": "Métrica de bem-estar estimada — não use para dosar medicamentos nem para decisões sobre diabetes. Nenhum anel ou relógio inteligente tem autorização da FDA para medir ou estimar glicose sozinho.", "Estimated · calibrate with a cuff": "Estimado · calibre com um medidor de pressão", "Estimated — not for dosing or diagnosis": "Estimado — não serve para dosagem nem diagnóstico", "Estimates from your ring compared with your own recent normal, not medical measurements.": "Estimativas do seu anel comparadas com o seu próprio normal recente, não medições médicas.", @@ -492,7 +520,6 @@ "Evening": "Noite", "Evening check-in": "Check-in da noite", "Evening type": "Vespertino", - "Every screen, the coach and your insights then work from that data.": "Todas as telas, o Coach e seus insights passam a usar esses dados.", "Every {0} min": "A cada {0} min", "Everything compared agrees within its band.": "Tudo o que foi comparado está dentro da faixa.", "Excellent": "Excelente", @@ -517,7 +544,7 @@ "Exported only when switched on. A row stays dim until its permission is granted.": "Exportado somente quando ativado. Uma linha fica esmaecida até que sua permissão seja concedida.", "Exporting all history can take a while on the first run.": "Exportar todo o histórico pode demorar um pouco na primeira vez.", "Exporting…": "Exportando…", - "FDA-authorized to measure or estimate glucose on its own.": "Autorizado pela FDA para medir ou estimar glicose por conta própria.", + "Extreme swelling of your hands or face": "Inchaço intenso nas mãos ou no rosto", "Factory Reset Ring": "Restaurar anel de fábrica", "Factory reset erases all data stored on the ring itself and resets it to factory state. Your synced data in the app is kept.": "A restauração de fábrica apaga todos os dados armazenados no próprio anel e o retorna ao estado de fábrica. Seus dados sincronizados no app são mantidos.", "Factory reset ring?": "Restaurar anel de fábrica?", @@ -530,11 +557,13 @@ "Fat (g)": "Gordura (g)", "Fat Burn": "Queima de gordura", "Fatigue": "Fadiga", + "Feeding": "Alimentação do bebê", "Feeling unwell": "Sentindo-se mal", "Feeling unwell? Pause activity nudges for 3 days.": "Não está se sentindo bem? Pause os lembretes de atividade por 3 dias.", "Feijão": "Feijão", "Fell asleep": "Adormeceu", "Female": "Feminino", + "Fever of 38 °C or higher": "Febre de 38 °C ou mais", "Filter models": "Filtrar modelos", "Filter, e.g. claude": "Filtrar, ex.: claude", "Find ring": "Encontrar anel", @@ -569,6 +598,7 @@ "Gemini API Key": "Chave de API do Gemini", "General": "Geral", "Get a daily check-in from your coach. You can change this anytime in Coach Check-Ins.": "Receba um check-in diário do seu coach. Você pode alterar isso a qualquer momento em Check-ins do Coach.", + "Get care now if you notice": "Procure atendimento agora se notar", "Get notified when your ring drops below 20% and 10%, so tracking doesn't stop mid-day.": "Seja avisado quando a bateria do anel ficar abaixo de 20% e 10%, para o monitoramento não parar no meio do dia.", "Get started": "Começar", "Glucose": "Glicose", @@ -588,6 +618,7 @@ "Great balance of movement and recovery. Keep it up.": "Ótimo equilíbrio entre movimento e recuperação. Continue assim.", "Grounds suggestions in your city's current weather": "Baseia as sugestões no clima atual da sua cidade", "Gym": "Academia", + "HELP": "AJUDA", "HR collected": "HR coletada", "HR pending": "HR pendente", "HR, SpO₂, HRV & stress": "HR, SpO₂, HRV e estresse", @@ -597,14 +628,12 @@ "HRV is personal. Wear your ring for about a week to learn your baseline.": "A HRV é pessoal. Use seu anel por cerca de uma semana para aprendermos sua linha de base.", "HRV lower than usual": "HRV mais baixa que o normal", "HRV readings": "Leituras de HRV", - "HRV readings, so it says how this reading compares with your normal, not how you compare with anyone else.": "leituras de HRV, então indica como esta leitura se compara com o seu normal, não com outras pessoas.", "HRV trending up": "HRV em alta", "HRV usually takes {0} night{1} to come back.": "A HRV geralmente leva {0} noite{1} para se recuperar.", "HRV {0}% {1} your dry nights": "HRV {0}% {1} que nas suas noites sem álcool", "Habits & routines · 30-day averages": "Hábitos e rotinas · médias de 30 dias", "Hard workout": "Treino intenso", "Health Connect": "Health Connect", - "Health Connect and shows where the ring agrees and where it falls short.": "Health Connect e mostra onde o anel concorda e onde fica aquém.", "Health Connect isn't available on this device. Install the Health Connect app to use this feature.": "O Health Connect não está disponível neste dispositivo. Instale o app Health Connect para usar este recurso.", "Health Connect isn't available on this phone.": "O Health Connect não está disponível neste celular.", "Health Connect permissions revoked": "Permissões do Health Connect revogadas", @@ -625,6 +654,7 @@ "Heart rate {0} → {1} bpm": "Frequência cardíaca {0} → {1} bpm", "Heart-rate readings": "Leituras de frequência cardíaca", "Heart-rate variability is the variation between beats. It's highly individual, so we track it against your personal baseline rather than a universal cutoff.": "A variabilidade da frequência cardíaca é a variação entre os batimentos. Ela é muito individual, então a acompanhamos em relação à sua linha de base pessoal, e não a um limite universal.", + "Heavy bleeding or discharge": "Sangramento intenso ou corrimento", "Height": "Altura", "Hi! I'm your PulseLoop coach. I can answer questions about your sleep, heart rate, activity, and recovery. What would you like to know?": "Olá! Sou seu coach do PulseLoop. Posso responder perguntas sobre seu sono, frequência cardíaca, atividade e recuperação. O que você gostaria de saber?", "Hide": "Ocultar", @@ -656,6 +686,7 @@ "How often the ring measures in the background. Shorter heart-rate intervals give finer history at the cost of battery.": "Com que frequência o anel mede em segundo plano. Intervalos menores de frequência cardíaca dão um histórico mais detalhado, mas gastam mais bateria.", "How often you exercised this week. Three or more sessions a week is a good target.": "Com que frequência você se exercitou nesta semana. Três ou mais sessões por semana é uma boa meta.", "How your ring compares with {0}, the device you chose to trust. This is agreement between two consumer devices, not a lab measurement.": "Como seu anel se compara com {0}, o dispositivo em que você escolheu confiar. É a concordância entre dois aparelhos de consumo, não uma medição de laboratório.", + "Human milk banks (rBLH)": "Bancos de leite humano (rBLH)", "I don't see sleep data for last night. Wear your ring overnight and sync in the morning so I can compare your sleep against your baseline.": "Não vejo dados de sono da noite passada. Use o anel durante a noite e sincronize de manhã para eu comparar seu sono com sua linha de base.", "I only have {0} tracked {1} for this {2}. Wear the ring overnight for a few more nights and I'll build a reliable {3}ly picture.": "Só tenho {0} {1} registradas para este período ({2}). Use o anel à noite por mais algumas noites e vou montar uma visão confiável por {3}.", "I wear an Oura or another device": "Uso um Oura ou outro dispositivo", @@ -665,7 +696,6 @@ "Idle": "Inativo", "Idle between syncs": "Ocioso entre sincronizações", "Idle · {0}%": "Inativo · {0}%", - "If the switch is greyed out, open PulseLoop's App info, tap ⋮ → Allow restricted settings, then come back here.": "Se a chave estiver cinza, abra as Informações do app do PulseLoop, toque em ⋮ → Permitir configurações restritas e volte aqui.", "If your watch syncs through an app like Health Sync, check that it's set to write to Health Connect.": "Se o seu relógio sincroniza por um app como o Health Sync, verifique se ele está configurado para gravar no Health Connect.", "Image attachments": "Anexos de imagem", "Imperial": "Imperial", @@ -689,8 +719,7 @@ "Input tokens": "Tokens de entrada", "Install Health Connect": "Instalar Health Connect", "Iogurte natural": "Iogurte natural", - "It's a ring estimate, not a clinical scale.": "É uma estimativa do anel, não uma escala clínica.", - "It's an estimate, not a medical stress measure.": "É uma estimativa, não uma medida médica de estresse.", + "It changes what PulseLoop shows and what it works out from it (zones, resting baseline, calorie estimate). Your ring's stored readings and what goes to Health Connect stay as measured.": "Isso muda o que o PulseLoop mostra e o que ele calcula a partir disso (zonas, linha de base em repouso, estimativa de calorias). As leituras guardadas do anel e o que vai para o Health Connect ficam como foram medidos.", "It's at {0}%. A short charge now keeps tonight's sleep tracked.": "Está em {0}%. Uma carga rápida agora garante o registro do sono desta noite.", "Journal": "Diário", "Keep": "Manter", @@ -706,6 +735,7 @@ "LAST CAFFEINE": "ÚLTIMA CAFEÍNA", "LAST NIGHT": "ONTEM À NOITE", "LEFT METRIC": "MÉTRICA DA ESQUERDA", + "LIFE STAGE": "FASE DA VIDA", "Language": "Idioma", "Laranja": "Laranja", "Last 14 nights, recent nights weigh more": "Últimas 14 noites, as mais recentes pesam mais", @@ -713,6 +743,7 @@ "Last 7 nights against the 3 weeks before; rising means better recovery": "Últimas 7 noites contra as 3 semanas anteriores; alta indica melhor recuperação", "Last 8 weeks": "Últimas 8 semanas", "Last Sleep": "Último sono", + "Last check-in {0}: score {1} of 30": "Último check-in {0}: pontuação {1} de 30", "Last night": "Ontem à noite", "Last night's heart rate and HRV readings weren't enough to score recovery": "As leituras de frequência cardíaca e HRV da noite passada não foram suficientes para calcular a recuperação", "Last night: {0}. A few dry nights will show what it does to you.": "Noite passada: {0}. Algumas noites sem álcool vão mostrar o efeito em você.", @@ -787,6 +818,7 @@ "Lowest heart rate {0} before waking": "Frequência cardíaca mais baixa {0} antes de acordar", "Lowest {0} · {1} readings": "Mínimo {0} · {1} leituras", "Luteal": "Lútea", + "MOOD CHECK-IN": "CHECK-IN DE HUMOR", "MY WEEK": "MINHA SEMANA", "Major signs": "Sinais fortes", "Male": "Masculino", @@ -812,6 +844,7 @@ "Medication": "Medicamento", "Medication reminders": "Lembretes de medicamentos", "Medications & supplements": "Medicamentos e suplementos", + "Medicines while breastfeeding": "Medicamentos na amamentação", "Meditation or relaxing": "Meditação ou relaxamento", "Meet daily goals": "Cumprir metas diárias", "Meetings across the country: aa.org.br": "Reuniões em todo o país: aa.org.br", @@ -837,6 +870,7 @@ "Monthly Sleep": "Sono mensal", "Monthly average": "Média mensal", "Monthly or less": "Uma vez por mês ou menos", + "Mood check-in": "Check-in de humor", "More": "Mais", "Morning": "Manhã", "Morning type": "Matutino", @@ -847,6 +881,7 @@ "My Health": "Minha saúde", "My Health & Trends": "Minha saúde e tendências", "NEXT MEAL IDEA · {0}": "IDEIA PARA A PRÓXIMA REFEIÇÃO · {0}", + "NUTRITION": "NUTRIÇÃO", "Name": "Nome", "Near baseline": "Perto da linha de base", "Needs 5 nights in the last 2 weeks": "Precisa de 5 noites nas últimas 2 semanas", @@ -868,6 +903,7 @@ "No HR samples yet — sync your ring to start your trend.": "Ainda não há amostras de HR — sincronize seu anel para começar sua tendência.", "No HRV data yet — HRV builds up over a few hours of wear.": "Ainda não há dados de HRV — a HRV se forma após algumas horas de uso.", "No Health Connect permissions granted — nothing to export.": "Nenhuma permissão do Health Connect concedida — nada para exportar.", + "No PulseLoop ring? If your Oura, Galaxy Ring, Fitbit or watch app writes to Health Connect, PulseLoop can read it from there: sleep, heart rate, HRV, blood oxygen, steps, calories, workouts and periods. Every screen, the coach and your insights then work from that data.": "Não tem um anel PulseLoop? Se o app do seu Oura, Galaxy Ring, Fitbit ou relógio grava no Health Connect, o PulseLoop pode ler de lá: sono, frequência cardíaca, HRV, oxigênio no sangue, passos, calorias, treinos e menstruações. Todas as telas, o coach e seus insights passam a usar esses dados.", "No SpO₂ samples yet — take a reading to start your trend.": "Ainda não há amostras de SpO₂ — faça uma medição para começar sua tendência.", "No access granted. You can allow it in Health Connect's settings.": "Acesso não concedido. Você pode permitir nas configurações do Health Connect.", "No accuracy check for this ring yet. Corrections from another ring don't carry over.": "Ainda não há verificação de precisão para este anel. Correções de outro anel não são aproveitadas.", @@ -891,6 +927,7 @@ "No nights tracked in this range yet.": "Nenhuma noite registrada neste período ainda.", "No obvious signs in your biometrics of something straining your body.": "Nenhum sinal claro nos seus dados biométricos de algo sobrecarregando seu corpo.", "No other app wrote readable data in the last {0} days.": "Nenhum outro app gravou dados legíveis nos últimos {0} dias.", + "No period since 8 weeks after birth": "Sem menstruação desde 8 semanas após o parto", "No readiness today: {0}. Wear the ring snugly tonight.": "Sem prontidão hoje: {0}. Use o anel bem ajustado esta noite.", "No reading": "Sem leitura", "No ring connected": "Nenhum anel conectado", @@ -916,7 +953,9 @@ "Normal blood pressure is below 120/80.": "A pressão arterial normal é abaixo de 120/80.", "Normal diastolic is below 80.": "A diastólica normal é abaixo de 80.", "Not a diagnosis. Rest, fluids and an easier day help; see a doctor if you feel unwell.": "Não é um diagnóstico. Descanso, hidratação e um dia mais leve ajudam; procure um médico se não estiver se sentindo bem.", + "Not all three hold, so LAM doesn't apply now.": "Nem todas as três condições valem, então a LAM não se aplica agora.", "Not allowed to read: ": "Sem permissão para ler: ", + "Not breastfeeding": "Não estou amamentando", "Not connected": "Não conectado", "Not enough data for this period.": "Dados insuficientes para este período.", "Not enough data yet — battery history builds up as the ring reports its level.": "Dados insuficientes por enquanto — o histórico de bateria se forma à medida que o anel informa o nível.", @@ -936,7 +975,6 @@ "Not this": "Não é isso", "Not yet": "Ainda não", "Notably below your typical HRV — often linked to stress, poor sleep, or strain.": "Bem abaixo da sua HRV habitual — muitas vezes ligado a estresse, sono ruim ou sobrecarga.", - "Nothing is shared off your phone.": "Nada é compartilhado para fora do seu celular.", "Nothing logged yet": "Nada registrado ainda", "Nothing new to upload": "Nada novo para enviar", "Nothing stood out": "Nada se destacou", @@ -967,6 +1005,8 @@ "Open Nutrition Log": "Abrir registro de nutrição", "Open PulseLoop to sync": "Abra o PulseLoop para sincronizar", "Open Settings": "Abrir Configurações", + "Open postpartum view": "Abrir visão do pós-parto", + "Open profile": "Abrir perfil", "Open ring settings": "Abrir configurações do anel", "Open settings": "Abrir configurações", "Open today's activity": "Abrir atividade de hoje", @@ -977,13 +1017,16 @@ "OpenRouter API Key": "Chave de API do OpenRouter", "Optimal": "Ideal", "Optional": "Opcional", + "Optional refinements to how your vitals are interpreted. Leave anything unset and PulseLoop uses sensible defaults.": "Ajustes opcionais de como seus sinais vitais são interpretados. Deixe em branco o que quiser e o PulseLoop usa padrões sensatos.", "Optional. Both can change what's expected for your heart rate or oxygen, so we adjust labels instead of alarming.": "Opcional. Ambos podem mudar o esperado para sua frequência cardíaca ou oxigenação, então ajustamos os rótulos em vez de alarmar.", "Optional. Enter a recent cuff reading so the ring offsets its values to match.": "Opcional. Informe uma medição recente de um medidor de braço para o anel ajustar os valores dele.", + "Optional. The ring estimates glucose from your profile, not a real sensor. Enter a recent lab/meter reading (mg/dL) to offset the displayed value to match.": "Opcional. O anel estima a glicose a partir do seu perfil, não de um sensor de verdade. Informe uma leitura recente de laboratório/glicosímetro (mg/dL) para ajustar o valor exibido.", "Other": "Outro", "Other ideas": "Outras ideias", "Out of sync": "Fora de sincronia", "Outdoor or treadmill runs": "Corridas ao ar livre ou na esteira", "Output tokens": "Tokens de saída", + "Overwhelming tiredness": "Cansaço extremo", "Ovos mexidos": "Ovos mexidos", "Own your ring data": "Seus dados do anel são seus", "Pace": "Ritmo", @@ -995,6 +1038,7 @@ "Pause": "Pausar", "Paused by the accuracy check": "Pausado pela verificação de precisão", "Paused by the accuracy check: ": "Pausado pela verificação de precisão: ", + "Pauses cycle predictions while breastfeeding, adds an alcohol-to-feeding estimate, a mood check-in and warning signs, and tells the coach.": "Pausa as previsões do ciclo durante a amamentação, adiciona uma estimativa de álcool antes de amamentar, um check-in de humor e sinais de alerta, e avisa o coach.", "Pay attention": "Atenção", "Peak": "Pico", "Peak {0}": "Pico {0}", @@ -1019,6 +1063,11 @@ "Port from iOS · Open Source": "Portado do iOS · Código aberto", "Possible nap": "Possível cochilo", "Possible {0}": "Possível {0}", + "Postpartum": "Pós-parto", + "Postpartum / breastfeeding": "Pós-parto / amamentação", + "Postpartum · week {0}": "Pós-parto · semana {0}", + "Postpartum: your baseline is still settling after birth, so read the score against recent weeks, not against before.": "Pós-parto: sua linha de base ainda está se ajustando depois do parto, então compare a pontuação com as últimas semanas, não com antes.", + "Predictions are paused after birth: while breastfeeding, and until your first period, cycles don't follow their usual pattern.": "As previsões ficam pausadas depois do parto: durante a amamentação e até a primeira menstruação, os ciclos não seguem o padrão de sempre.", "Previous": "Anterior", "Previous day": "Dia anterior", "Previous day activity": "Atividade do dia anterior", @@ -1035,12 +1084,15 @@ "PulseLoop": "PulseLoop", "PulseLoop Coach": "PulseLoop Coach", "PulseLoop checks for new data every hour and whenever you open the app. A night usually appears once ": "O PulseLoop verifica novos dados a cada hora e sempre que você abre o app. Uma noite costuma aparecer quando ", + "PulseLoop doesn't detect mastitis, fever, depression, preeclampsia, milk supply or returning fertility. The ring's numbers are context, not a diagnosis.": "O PulseLoop não detecta mastite, febre, depressão, pré-eclâmpsia, produção de leite nem o retorno da fertilidade. Os números do anel são contexto, não diagnóstico.", "PulseLoop isn't allowed to read Health Connect any more.": "O PulseLoop não tem mais permissão para ler o Health Connect.", "PulseLoop learns your baseline over time": "O PulseLoop aprende sua linha de base com o tempo", + "PulseLoop needs Bluetooth permission to find and connect to your ring. Allow it in Settings, or continue without a ring and pair one later.": "O PulseLoop precisa da permissão de Bluetooth para encontrar e conectar seu anel. Permita nas Configurações ou continue sem anel e pareie um depois.", "PulseLoop no longer has any Health Connect permissions. Reset the export so a later re-grant re-exports your history?": "O PulseLoop não tem mais nenhuma permissão do Health Connect. Redefinir a exportação para que, se você conceder de novo, seu histórico seja exportado novamente?", "PulseLoop reads only the app you choose, and doesn't write that data back to Health Connect.": "O PulseLoop lê apenas o app que você escolher e não grava esses dados de volta no Health Connect.", "PulseLoop shows the day of your cycle and its phase from the dates you log, next to your sleep and recovery.": "O PulseLoop mostra o dia do seu ciclo e a fase dele a partir das datas que você registra, junto ao seu sono e recuperação.", - "PulseLoop uses sensible defaults.": "O PulseLoop usa padrões sensatos.", + "PulseLoop uses Bluetooth to find and connect your ring. Allow {0} for PulseLoop in Settings.": "O PulseLoop usa o Bluetooth para encontrar e conectar seu anel. Permita {0} para o PulseLoop nas Configurações.", + "PulseLoop uses Bluetooth to find and connect your ring. Nothing is shared off your phone.": "O PulseLoop usa o Bluetooth para encontrar e conectar seu anel. Nada sai do seu celular.", "PulseLoop v{0} ({1})": "PulseLoop v{0} ({1})", "PulseLoop will stop uploading workouts. Workouts already on Strava stay there.": "O PulseLoop vai parar de enviar treinos. Os treinos que já estão no Strava continuam lá.", "PulseLoop {0} (Android)": "PulseLoop {0} (Android)", @@ -1051,6 +1103,7 @@ "Quiet from": "Silêncio a partir de", "Quiet hours schedule:": "Horário de silêncio:", "Quiet until": "Silêncio até", + "RECOVERY, WEEK BY WEEK": "RECUPERAÇÃO, SEMANA A SEMANA", "REFERENCE ZONES": "ZONAS DE REFERÊNCIA", "REM sleep": "Sono REM", "REM sleep supports memory and mood. It usually makes up 20 to 25% of a night, about 90 minutes or more.": "O sono REM ajuda a memória e o humor. Normalmente ocupa de 20 a 25% da noite, cerca de 90 minutos ou mais.", @@ -1068,9 +1121,11 @@ "Recompute": "Recalcular", "Reconnect last ring": "Reconectar último anel", "Record activity": "Registrar atividade", + "Recording a workout needs the Physical activity permission. You can allow it in Android Settings › Apps › PulseLoop › Permissions.": "Gravar um treino precisa da permissão de Atividade física. Você pode permitir em Configurações do Android › Apps › PulseLoop › Permissões.", "Records": "Registros", "Recovery index": "Índice de recuperação", "Recovery time": "Tempo de recuperação", + "Recovery, nights, mood check-in and warning signs": "Recuperação, noites, check-in de humor e sinais de alerta", "Reference device": "Dispositivo de referência", "Refresh": "Atualizar", "Relaxed": "Relaxado", @@ -1080,6 +1135,7 @@ "Remove PulseLoop data?": "Remover dados do PulseLoop?", "Remove exported data": "Remover dados exportados", "Remove photo": "Remover foto", + "Removes all demo measurements, activity, sleep, and the demo device. Synced ring data is not affected.": "Remove todas as medições, atividades, sono e o dispositivo de demonstração. Os dados sincronizados do anel não são afetados.", "Removes health values, ring serial & MAC addresses. Keeps models, opcodes & errors.": "Remove valores de saúde, número de série e endereços MAC do anel. Mantém modelos, opcodes e erros.", "Removing…": "Removendo…", "Reorder or hide cards": "Reordenar ou ocultar cartões", @@ -1112,6 +1168,7 @@ "Resting HR": "FC em repouso", "Resting calibrating": "Calibrando repouso", "Resting heart rate": "Frequência cardíaca em repouso", + "Resting heart rate often drops below your old normal around week 7 and takes months to settle; HRV tends to climb back. Differences between women are large.": "A frequência cardíaca em repouso costuma cair abaixo do seu normal antigo por volta da semana 7 e leva meses para se estabilizar; o HRV tende a voltar a subir. As diferenças entre mulheres são grandes.", "Resting heart rate reflects how hard your heart works at rest. A typical adult range is 60–100 bpm; fitness, medication, caffeine, and stress all shift it.": "A frequência cardíaca em repouso mostra o quanto seu coração trabalha em repouso. A faixa típica de um adulto é de 60–100 bpm; condicionamento, medicamentos, cafeína e estresse a alteram.", "Resting heart rate trending down": "Frequência cardíaca em repouso em queda", "Resting heart rate up": "Frequência cardíaca em repouso em alta", @@ -1135,7 +1192,9 @@ "Ring steps vs your phone": "Passos do anel vs. do seu celular", "Road, trail, or stationary": "Rua, trilha ou estacionária", "Route by": "Rotear por", + "Row counts include demo and real rows. Tap a table to see its newest rows. Stored health rows are never included in a diagnostics export.": "As contagens incluem linhas de demonstração e reais. Toque numa tabela para ver as linhas mais recentes. Dados de saúde armazenados nunca entram numa exportação de diagnóstico.", "Running": "Corrida", + "SAMU (emergencies)": "SAMU (emergências)", "Salada verde com tomate": "Salada verde com tomate", "Same as heart rate": "Igual à frequência cardíaca", "Save": "Salvar", @@ -1164,6 +1223,7 @@ "See Raw Packets above.": "Veja Pacotes brutos acima.", "See Ring Events above.": "Veja Eventos do anel acima.", "See and edit recent drinks": "Ver e editar bebidas recentes", + "See my score": "Ver minha pontuação", "See result": "Ver resultado", "See what affects you": "Veja o que afeta você", "See what drinking does to your own nights": "Veja o que beber faz com suas próprias noites", @@ -1175,15 +1235,18 @@ "Server address": "Endereço do servidor", "Server address needed": "Endereço do servidor necessário", "Session saved": "Sessão salva", + "Set": "Definir", "Set by your goal: ": "Definido pela sua meta: ", "Set goals, log, edit data": "Defina metas, registre e edite dados", "Set up PulseLoop": "Configurar o PulseLoop", "Set up a ring": "Configurar um anel", "Set up · under a minute": "Configuração · menos de um minuto", + "Set your baby's birth date in your profile to see this view.": "Defina a data de nascimento do bebê no seu perfil para ver esta tela.", "Set your typical week in settings to see drinks, money and calories saved.": "Defina sua semana típica nas configurações para ver as bebidas, o dinheiro e as calorias economizados.", "Settings": "Configurações", "Setup complete": "Configuração concluída", "Severe": "Grave", + "Severe belly pain, nausea or vomiting": "Dor forte na barriga, náusea ou vômito", "Severe range (diastolic >120). Seek care if confirmed.": "Faixa grave (diastólica >120). Procure atendimento se confirmado.", "Severe range (systolic >180). Seek care if confirmed.": "Faixa grave (sistólica >180). Procure atendimento se confirmado.", "Sex": "Sexo", @@ -1206,6 +1269,7 @@ "Show {0}": "Mostrar {0}", "Show {0} more": "Mostrar mais {0}", "Skin temperature": "Temperatura da pele", + "Skin temperature from the ring runs cooler than core body temperature. Trends over time matter more than any single reading.": "A temperatura da pele medida pelo anel é mais baixa que a temperatura central do corpo. A tendência ao longo do tempo importa mais que qualquer leitura isolada.", "Skin temperature up": "Temperatura da pele em alta", "Skip": "Pular", "Skip for now": "Pular por enquanto", @@ -1248,6 +1312,7 @@ "Sopa de legumes com frango": "Sopa de legumes com frango", "Sorry, something went wrong: {0}": "Desculpe, algo deu errado: {0}", "Source on GitHub": "Código-fonte no GitHub", + "Source: CDC Hear Her urgent maternal warning signs.": "Fonte: sinais de alerta materno urgentes da campanha Hear Her, do CDC.", "SpO₂": "SpO₂", "Speed": "Velocidade", "Spirit (shot)": "Destilado (dose)", @@ -1268,6 +1333,7 @@ "Start": "Iniciar", "Start a breathing session": "Iniciar uma sessão de respiração", "Start an accuracy check": "Iniciar uma verificação de precisão", + "Start check-in": "Começar check-in", "Start one manually when your ring misses an activity.": "Inicie um manualmente quando o anel não registrar uma atividade.", "Start time must be before end time.": "O horário de início deve ser anterior ao de término.", "Start tracking": "Começar a monitorar", @@ -1285,7 +1351,6 @@ "Steps {0}{1}%": "Passos {0}{1}%", "Stop scanning": "Parar busca", "Stop using Health Connect": "Parar de usar o Health Connect", - "Stored health rows are never included in a diagnostics export.": "Os dados de saúde armazenados nunca são incluídos em uma exportação de diagnóstico.", "Stored securely in Android Keystore. Never leaves your device except to call the model. Provider changes apply from your next message.": "Armazenada com segurança no Android Keystore. Nunca sai do seu dispositivo, exceto para chamar o modelo. Mudanças de provedor valem a partir da sua próxima mensagem.", "Strava": "Strava", "Strava Integration": "Integração com o Strava", @@ -1300,6 +1365,7 @@ "Strong recovery signal": "Sinal forte de recuperação", "Stronger signs in your biometrics of something straining your body.": "Sinais fortes nos seus dados biométricos de algo sobrecarregando seu corpo.", "Studio, cardio, or freestyle": "Aula, cardio ou livre", + "Suggested next check-in: {0}": "Próximo check-in sugerido: {0}", "Summarize my week": "Resumir minha semana", "Summary copied. It holds counts and timings only, no readings.": "Resumo copiado. Ele contém apenas contagens e horários, nenhuma leitura.", "Sunday evening: your week compared with the last one, and one thing to focus on.": "Domingo à noite: sua semana comparada com a anterior e um ponto para focar.", @@ -1316,7 +1382,6 @@ "Sync from your scale": "Sincronizar com sua balança", "Sync now": "Sincronizar agora", "Sync your ring to start collecting movement, heart rate, blood oxygen, and recovery context.": "Sincronize seu anel para começar a coletar movimento, frequência cardíaca, oxigênio no sangue e dados de recuperação.", - "Synced ring data is not affected.": "Os dados sincronizados do anel não são afetados.", "Synced {0}": "Sincronizado {0}", "Syncing latest data…": "Sincronizando dados mais recentes…", "Syncing…": "Sincronizando…", @@ -1341,9 +1406,9 @@ "Tell the coach, and it plans with your scale, ring and food data.": "Conte ao coach, e ele planeja com os dados da sua balança, do anel e da alimentação.", "Temperature": "Temperatura", "Temperature trend": "Tendência de temperatura", + "Ten quick questions about the last 7 days, used by health services worldwide to spot postpartum depression early.": "Dez perguntas rápidas sobre os últimos 7 dias, usadas por serviços de saúde no mundo todo para identificar cedo a depressão pós-parto.", "That app shares nothing PulseLoop can compare.": "Esse app não compartilha nada que o PulseLoop possa comparar.", "That looks like PulseLoop's own data coming back through a sync app, so this report would compare the ring with itself. Check the sync direction in that app.": "Parecem ser dados do próprio PulseLoop voltando por um app de sincronização, então este relatório compararia o anel com ele mesmo. Verifique a direção da sincronização nesse app.", - "The /v1 path is added for you.": "O caminho /v1 é adicionado para você.", "The AI didn't return a usable estimate. Try again or enter the meal manually.": "A IA não retornou uma estimativa utilizável. Tente novamente ou insira a refeição manualmente.", "The Health Connect app on this device needs an update before it can be used.": "O app Health Connect deste dispositivo precisa ser atualizado antes de ser usado.", "The WHO's short alcohol check (AUDIT-C). Three questions, under a minute. A screen, not a diagnosis.": "O teste rápido sobre álcool da OMS (AUDIT-C). Três perguntas, menos de um minuto. Uma triagem, não um diagnóstico.", @@ -1372,9 +1437,12 @@ "This deletes every record PulseLoop wrote to Health Connect and resets the export. It cannot be undone, and your ring data in PulseLoop is not affected.": "Isso exclui todos os registros que o PulseLoop gravou no Health Connect e redefine a exportação. Não é possível desfazer, e os dados do seu anel no PulseLoop não são afetados.", "This erases all data stored on the ring and resets it to factory state. We'll sync its latest data into the app first, but this can't be undone. The ring will need to be re-paired afterward.": "Isso apaga todos os dados armazenados no anel e o restaura para o estado de fábrica. Primeiro vamos sincronizar os dados mais recentes com o app, mas isso não pode ser desfeito. O anel precisará ser pareado novamente depois.", "This is a test check-in notification.": "Esta é uma notificação de check-in de teste.", + "This is information, not contraception advice. Talk to your clinician about the method that suits you.": "Isto é informação, não orientação contraceptiva. Converse com seu profissional de saúde sobre o método mais adequado para você.", "This permanently deletes everything currently in the app and replaces it with the contents of this file. This can't be undone.": "Isso exclui permanentemente tudo o que está no app e substitui pelo conteúdo deste arquivo. Não é possível desfazer.", "This permanently erases all your data — metrics, sleep, activity, coach history, settings, and saved API keys — and can't be undone.": "Isso apaga permanentemente todos os seus dados — métricas, sono, atividade, histórico do coach, configurações e chaves de API salvas — e não pode ser desfeito.", "This record runs {0} – {1}. You can only shorten it.": "Este registro vai de {0} a {1}. Você só pode encurtá-lo.", + "This score suggests depression is likely. Please talk to your doctor, nurse or midwife this week.": "Esta pontuação sugere que a depressão é provável. Por favor, converse com seu médico, enfermeira ou obstetriz ainda esta semana.", + "This score suggests possible depression. Talk to your doctor, nurse or midwife soon.": "Esta pontuação sugere possível depressão. Converse em breve com seu médico, enfermeira ou obstetriz.", "This unbinds the ring and removes it from the app. Your synced data is kept, but you'll need to pair the ring again to keep syncing.": "Isso desvincula o anel e o remove do app. Seus dados sincronizados são mantidos, mas você precisará parear o anel novamente para continuar sincronizando.", "This unpairs your ring, then permanently erases all your data — metrics, sleep, activity, coach history, settings, and saved API keys — and can't be undone.": "Isso despareia seu anel e depois apaga permanentemente todos os seus dados — métricas, sono, atividade, histórico do coach, configurações e chaves de API salvas — e não pode ser desfeito.", "This week": "Esta semana", @@ -1385,6 +1453,7 @@ "This will replace all existing demo data. Your synced ring data — including sleep history — will not be affected.": "Isso substituirá todos os dados de demonstração existentes. Os dados sincronizados do anel — incluindo o histórico de sono — não serão afetados.", "This workout is no longer in local storage. It may have been deleted or replaced.": "Este treino não está mais no armazenamento local. Ele pode ter sido excluído ou substituído.", "This {0} will be removed from your log.": "Este item ({0}) será removido do seu registro.", + "Thoughts of harming yourself or your baby": "Pensamentos de machucar a si mesma ou o bebê", "Thriving": "Excelente", "Tilápia grelhada": "Tilápia grelhada", "Time": "Horário", @@ -1397,6 +1466,7 @@ "Timing": "Horário", "Tired": "Cansado", "Tired — consider lighter activity and good sleep.": "Cansado — prefira atividades mais leves e uma boa noite de sono.", + "To log when Bedtime or Do Not Disturb turns on and off while PulseLoop is in the background, Android requires Notification access. PulseLoop only listens for Mode changes and does not read your notifications.\n\nIf the switch is greyed out, open PulseLoop's App info, tap ⋮ → Allow restricted settings, then come back here.": "Para registrar quando o modo Hora de dormir ou Não perturbe liga e desliga com o PulseLoop em segundo plano, o Android exige acesso às notificações. O PulseLoop só escuta as mudanças de modo e não lê suas notificações.\n\nSe a chave estiver cinza, abra as Informações do app do PulseLoop, toque em ⋮ → Permitir configurações restritas e volte aqui.", "Today": "Hoje", "Today's steps against your step goal. It fills up as the day goes on.": "Os passos de hoje em relação à sua meta. A barra enche ao longo do dia.", "Today: {0}": "Hoje: {0}", @@ -1414,8 +1484,8 @@ "Treats a low resting heart rate as a sign of fitness rather than a concern, and relaxes the low-HR threshold.": "Trata uma frequência cardíaca em repouso baixa como sinal de condicionamento, e não de preocupação, e flexibiliza o limite de HR baixa.", "Trend": "Tendência", "Trends": "Tendências", - "Trends over time matter more than any single reading.": "A tendência ao longo do tempo importa mais que qualquer leitura isolada.", "Trigger real-time ring readings": "Acionar leituras do anel em tempo real", + "Trouble breathing, chest pain or a racing heart": "Falta de ar, dor no peito ou coração acelerado", "Try again": "Tentar novamente", "Turn off": "Desativar", "Turn off Drinks": "Desativar Bebidas", @@ -1488,6 +1558,7 @@ "We suggest a quarter less to start": "Sugerimos um quarto a menos para começar", "Wear both as usual. Health Connect export paused for: {0}.": "Use os dois normalmente. Exportação para o Health Connect pausada para: {0}.", "Wear both devices as you normally would, including at night.": "Use os dois dispositivos normalmente, inclusive à noite.", + "Wear the ring and a watch or band you trust for a few days. PulseLoop reads that device's data from Health Connect and shows where the ring agrees and where it falls short.": "Use o anel e um relógio ou pulseira em que você confia por alguns dias. O PulseLoop lê os dados desse aparelho no Health Connect e mostra onde o anel concorda e onde fica devendo.", "Wear your ring during the day and sync after sleep. Trends become more personal after a few days.": "Use o anel durante o dia e sincronize depois de dormir. As tendências ficam mais personalizadas após alguns dias.", "Wear your ring overnight for a few nights to build a weekly view.": "Use o anel durante a noite por algumas noites para montar uma visão semanal.", "Wear your ring overnight so PulseLoop can track your next night.": "Use o anel durante a noite para que o PulseLoop acompanhe sua próxima noite.", @@ -1496,6 +1567,8 @@ "Wearable": "Wearable", "Web Search": "Pesquisa na web", "Week": "Semana", + "Week {0} after birth": "Semana {0} após o parto", + "Week {0}: resting HR {1} · HRV {2}": "Semana {0}: FC em repouso {1} · HRV {2}", "Weekly": "Semanal", "Weekly Sleep": "Sono semanal", "Weekly limit": "Limite semanal", @@ -1516,10 +1589,12 @@ "When the ring is at 30% or less a couple of hours before your usual bedtime.": "Quando o anel estiver com 30% ou menos algumas horas antes do seu horário habitual de dormir.", "When the ring says… what {0} says (minutes)": "Quando o anel diz… o que {0} diz (minutos)", "When two or more of last night's signals are outside your usual range.": "Quando dois ou mais sinais da última noite estiverem fora da sua faixa habitual.", + "When was your baby born?": "Quando seu bebê nasceu?", "When you want a drink": "Quando você quiser beber", "Where the ring falls short": "Onde o anel deixa a desejar", "Whether your sleep lines up with your body clock. A midpoint between midnight and about 3:30 am is ideal for most people.": "Se o seu sono está alinhado com seu relógio biológico. Um ponto médio entre meia-noite e cerca de 3h30 é o ideal para a maioria das pessoas.", "While a check runs, PulseLoop stops exporting the types the other device also writes, so Health Connect doesn't count your steps, sleep and heart rate twice.": "Enquanto uma verificação está em andamento, o PulseLoop para de exportar os tipos que o outro dispositivo também grava, para que o Health Connect não conte seus passos, sono e frequência cardíaca em dobro.", + "While breastfeeding: check in e-lactancia or LactMed, and ask your clinician": "Na amamentação: consulte o e-lactancia ou o LactMed e pergunte ao seu profissional de saúde", "Why there's no score today": "Por que não há pontuação hoje", "Wind-down reminder": "Lembrete para relaxar", "Wine": "Vinho", @@ -1544,13 +1619,12 @@ "You are now a developer!": "Agora você é um desenvolvedor!", "You averaged {0} across the full week. Your nights were tracked consistently, so this is a dependable picture of where your sleep sits right now.": "Sua média foi {0} na semana inteira. Suas noites foram registradas com regularidade, então este é um retrato confiável de como está seu sono agora.", "You averaged {0} across {1} tracked nights this week. That's a useful read, but {2} missing {3} mean the trend is still incomplete.": "Sua média foi {0} em {1} noites registradas esta semana. É uma boa leitura, mas {2} {3} faltando indicam que a tendência ainda está incompleta.", - "You can allow it in Android Settings › Apps › PulseLoop › Permissions.": "Você pode permitir em Configurações do Android › Apps › PulseLoop › Permissões.", "You can pair a ring later from Settings.": "Você pode parear um anel depois em Configurações.", - "You can still search the database or enter the meal manually.": "Você ainda pode pesquisar no banco de dados ou inserir a refeição manualmente.", "You can use either a comma or a period as the decimal separator.": "Você pode usar vírgula ou ponto como separador decimal.", "You hit your {0} step goal — nice work.": "Você bateu sua meta de {0} passos — muito bem.", "You logged {0}h {1}m of sleep. Here's to a strong day — get moving when you can.": "Você registrou {0}h {1}m de sono. Que seja um ótimo dia — mexa-se quando puder.", "You moved less than last week. A daily walk is an easy way back.": "Você se mexeu menos que na semana passada. Uma caminhada diária é um jeito fácil de retomar.", + "You said thoughts of harming yourself have come up. Please talk to someone today.": "Você disse que pensamentos de se machucar apareceram. Por favor, converse com alguém hoje.", "You slept long enough, but awake time was a bit elevated. If this repeats, look at late caffeine, alcohol, temperature, or stress near bedtime.": "Você dormiu o suficiente, mas o tempo acordado ficou um pouco alto. Se isso se repetir, observe cafeína tarde, álcool, temperatura ou estresse perto da hora de dormir.", "You're all set": "Tudo pronto", "You're at %,d steps, %dh %02dm of sleep, and your latest reading is %s.": "Você está com %,d passos, %dh %02dm de sono, e sua leitura mais recente é %s.", @@ -1562,12 +1636,15 @@ "You're {0} step{1} away from Developer options.": "Faltam {0} passo{1} para as Opções do desenvolvedor.", "You've reached today's target. Water or tea if you're hungry": "Você atingiu a meta de hoje. Água ou chá se estiver com fome", "Your HRV dipped this week. Lighter days and consistent sleep help it recover.": "Sua HRV caiu esta semana. Dias mais leves e sono regular ajudam a recuperá-la.", + "Your age, sex, height and weight let the ring compute accurate calories (and, on 56ff/Jring rings, blood sugar). Blood pressure is measured directly by the sensor.": "Sua idade, sexo, altura e peso permitem que o anel calcule as calorias com precisão (e, nos anéis 56ff/Jring, a glicose). A pressão arterial é medida diretamente pelo sensor.", + "Your answers stay on this phone. They aren't in backups, diagnostics or Health Connect.": "Suas respostas ficam neste celular. Não entram em backups, diagnósticos nem no Health Connect.", "Your answers suggest drinking at a level that is likely affecting your health. Please talk to a doctor. If you drink most days, don't stop all at once: stopping suddenly can be dangerous, and a doctor can help you cut down safely.": "Suas respostas sugerem um consumo de álcool que provavelmente está afetando sua saúde. Converse com um médico. Se você bebe na maioria dos dias, não pare de uma vez: parar de repente pode ser perigoso, e um médico pode ajudar você a reduzir com segurança.", "Your answers suggest drinking at a level that raises health risks. Cutting down gradually, with a weekly limit and dry days, is the usual first step.": "Suas respostas sugerem um consumo de álcool que aumenta os riscos à saúde. Reduzir aos poucos, com um limite semanal e dias sem álcool, é o primeiro passo habitual.", "Your answers suggest lower-risk drinking. Keeping some dry days each week helps keep it that way.": "Suas respostas sugerem um consumo de menor risco. Manter alguns dias sem álcool por semana ajuda a continuar assim.", "Your average sleep over the last two weeks compared with your goal. It shows whether sleep debt is building up.": "Seu sono médio nas últimas duas semanas comparado com sua meta. Mostra se está acumulando dívida de sono.", "Your body is asking for rest. Make recovery today's priority.": "Seu corpo está pedindo descanso. Faça da recuperação a prioridade de hoje.", "Your body is asking for rest. Make recovery today's priority: your {0} is furthest from your usual.": "Seu corpo está pedindo descanso. Faça da recuperação a prioridade de hoje: seu {0} é o que está mais longe do habitual.", + "Your body is still recovering. Broken nights and a resting heart rate that wanders are expected for months, so compare yourself with last week, not with before.": "Seu corpo ainda está se recuperando. Noites fragmentadas e uma frequência cardíaca em repouso que oscila são esperadas por meses, então compare-se com a semana passada, não com antes.", "Your body is still recovering. Go a little easier today and watch your {0}.": "Seu corpo ainda está se recuperando. Pegue um pouco mais leve hoje e fique de olho no seu {0}.", "Your body is still recovering. Go a little easier today.": "Seu corpo ainda está se recuperando. Pegue um pouco mais leve hoje.", "Your data has been restored from the backup.": "Seus dados foram restaurados a partir do backup.", @@ -1592,8 +1669,8 @@ "Your ring counts about {0}% fewer steps than your phone ({1} days).": "Seu anel conta cerca de {0}% menos passos que seu celular ({1} dias).", "Your ring counts about {0}% more steps than your phone ({1} days).": "Seu anel conta cerca de {0}% mais passos que seu celular ({1} dias).", "Your ring logs heart rate every few minutes, so short sessions may show none.": "Seu anel registra a frequência cardíaca a cada poucos minutos, então sessões curtas podem não mostrar nenhuma.", - "Your ring's stored readings and what goes to Health Connect stay as measured.": "As leituras armazenadas do anel e o que vai para o Health Connect continuam como foram medidos.", "Your schedule, today's doses and a week's record": "Seus horários, as doses de hoje e o registro da semana", + "Your score: {0} of 30": "Sua pontuação: {0} de 30", "Your skin temperature last night compared with your usual. A rise of half a degree or more can come with illness, a hard training load, alcohol or the menstrual cycle.": "Sua temperatura da pele na noite passada comparada com o seu habitual. Um aumento de meio grau ou mais pode acompanhar doença, treino pesado, álcool ou o ciclo menstrual.", "Your sleep duration and stage balance were strong. Deep sleep looked supportive, which helped keep the overall score high.": "A duração do sono e o equilíbrio entre os estágios foram ótimos. O sono profundo ajudou, o que manteve a pontuação geral alta.", "Your sleep was in a workable range, with the score shaped mostly by duration and stage balance. Deep and light sleep were readable enough to give a useful recovery snapshot.": "Seu sono ficou numa faixa razoável, com a pontuação definida principalmente pela duração e pelo equilíbrio dos estágios. O sono profundo e o leve foram legíveis o bastante para dar um bom retrato da recuperação.", @@ -1641,6 +1718,7 @@ "your limit of {0}": "seu limite de {0}", "{0} % of {1} min on the same stage": "{0} % de {1} min no mesmo estágio", "{0} / week": "{0} / semana", + "{0} asleep · woke {1} times · longest stretch {2}": "{0} dormindo · acordou {1} vezes · maior trecho {2}", "{0} awake during the night": "{0} acordado durante a noite", "{0} bpm above your usual {1}": "{0} bpm acima do seu habitual de {1}", "{0} bpm avg": "{0} bpm média", @@ -1654,6 +1732,7 @@ "{0} confidence": "Confiança {0}", "{0} days": "{0} dias", "{0} days left": "Faltam {0} dias", + "{0} days to go": "faltam {0} dias", "{0} doesn't list “{1}” any more — it may have been retired. Pick another model.": "{0} não lista mais “{1}” — ele pode ter sido descontinuado. Escolha outro modelo.", "{0} drinks this week": "{0} bebidas esta semana", "{0} drink{1}": "{0} bebida{1}", diff --git a/app/src/main/java/com/pulseloop/PulseLoopApplication.kt b/app/src/main/java/com/pulseloop/PulseLoopApplication.kt index 141321a6..4d596187 100644 --- a/app/src/main/java/com/pulseloop/PulseLoopApplication.kt +++ b/app/src/main/java/com/pulseloop/PulseLoopApplication.kt @@ -27,6 +27,7 @@ class PulseLoopApplication : Application() { super.onCreate() CrashLogger.install(this) com.pulseloop.service.DrinkPrefs.init(this) + com.pulseloop.service.Postpartum.init(this) com.pulseloop.ui.theme.FairyMode.init(this) com.pulseloop.ui.i18n.L10n.init(this) com.pulseloop.health.source.HealthConnectSource.isEnabled(this) // warms [HealthConnectSource.enabledNow] diff --git a/app/src/main/java/com/pulseloop/coach/context/CoachContextBuilder.kt b/app/src/main/java/com/pulseloop/coach/context/CoachContextBuilder.kt index 3c518612..f645d463 100644 --- a/app/src/main/java/com/pulseloop/coach/context/CoachContextBuilder.kt +++ b/app/src/main/java/com/pulseloop/coach/context/CoachContextBuilder.kt @@ -110,6 +110,7 @@ object CoachContextBuilder { environment = environment, primaryGoal = runCatching { com.pulseloop.service.GoalPlan.load(db, now) }.getOrNull(), drinks = com.pulseloop.service.DrinksContext.build(db, now), + postpartum = com.pulseloop.service.PostpartumContext.build(), ) } diff --git a/app/src/main/java/com/pulseloop/coach/context/CoachPromptBuilder.kt b/app/src/main/java/com/pulseloop/coach/context/CoachPromptBuilder.kt index 6f194b5b..861b03cc 100644 --- a/app/src/main/java/com/pulseloop/coach/context/CoachPromptBuilder.kt +++ b/app/src/main/java/com/pulseloop/coach/context/CoachPromptBuilder.kt @@ -75,6 +75,8 @@ data class CoachContextPacket( val primaryGoal: com.pulseloop.service.GoalPlan.Plan? = null, /** Drinks, when the user tracks them (docs/drinks-plan.md); null otherwise. */ val drinks: com.pulseloop.service.DrinksContext? = null, + /** The postpartum life stage, when she switched it on in her profile; null otherwise. */ + val postpartum: com.pulseloop.service.PostpartumContext? = null, ) { @kotlinx.serialization.Serializable data class ProfileContext( diff --git a/app/src/main/java/com/pulseloop/service/Postpartum.kt b/app/src/main/java/com/pulseloop/service/Postpartum.kt new file mode 100644 index 00000000..9a8864a1 --- /dev/null +++ b/app/src/main/java/com/pulseloop/service/Postpartum.kt @@ -0,0 +1,212 @@ +package com.pulseloop.service + +import android.content.Context +import android.content.SharedPreferences +import com.pulseloop.ring.SleepStage +import kotlinx.serialization.Serializable +import java.time.LocalDate +import java.time.temporal.ChronoUnit + +/** + * Postpartum and breastfeeding (docs/postpartum-breastfeeding-research.md). Opt-in from the user's + * profile: the baby's birth date and how she feeds. The mode mostly changes defaults — cycle + * predictions pause while breastfeeding, an alcohol estimate appears beside drinks, the coach knows + * the life stage — and adds a postpartum view with recovery, nights, a mood check-in and warning + * signs. + * + * What it must never claim (research §4): that the ring detects mastitis, fever, depression, + * preeclampsia, milk supply or returning fertility; that an alcohol estimate makes milk "safe"; + * that the LAM criteria are contraception advice; that a medication is safe. + */ +object Postpartum { + + enum class Feeding(val key: String) { + EXCLUSIVE("exclusive"), MIXED("mixed"), NONE("none"); + val breastfeeding: Boolean get() = this != NONE + + companion object { + fun of(key: String?) = entries.firstOrNull { it.key == key } ?: EXCLUSIVE + } + } + + // ── Settings ───────────────────────────────────────────────────────────────────────────── + + @Volatile private var prefs: SharedPreferences? = null + + fun init(context: Context) { + if (prefs == null) prefs = context.applicationContext.getSharedPreferences("postpartum", Context.MODE_PRIVATE) + } + + private fun p() = prefs + + val enabled: Boolean get() = p()?.getBoolean("enabled", false) == true + + val birthDate: LocalDate? + get() = p()?.getString("birthDate", null)?.let { runCatching { LocalDate.parse(it) }.getOrNull() } + + val feeding: Feeding get() = Feeding.of(p()?.getString("feeding", null)) + + fun set(enabled: Boolean, birthDate: LocalDate?, feeding: Feeding) { + p()?.edit()?.putBoolean("enabled", enabled) + ?.putString("birthDate", birthDate?.toString()) + ?.putString("feeding", feeding.key) + ?.apply() + } + + /** kcal this mode added to the intake goal, so turning it off can take exactly that back. */ + var appliedCalorieBonus: Int + get() = p()?.getInt("appliedBonus", 0) ?: 0 + set(v) { p()?.edit()?.putInt("appliedBonus", v)?.apply() } + + /** On, with a birth date in the last two years. */ + fun active(today: LocalDate = LocalDate.now()): Boolean { + val b = birthDate ?: return false + return enabled && !b.isAfter(today) && b.isAfter(today.minusYears(2)) + } + + val breastfeeding: Boolean get() = enabled && feeding.breastfeeding + + // ── Pure rules (tested) ────────────────────────────────────────────────────────────────── + + fun weeksSince(birth: LocalDate, today: LocalDate): Int = (ChronoUnit.DAYS.between(birth, today) / 7).toInt() + + fun monthsSince(birth: LocalDate, today: LocalDate): Int = ChronoUnit.MONTHS.between(birth, today).toInt() + + /** + * Cycle predictions pause while breastfeeding, and until a period after birth: a breastfeeding + * body's first bleeds are often without ovulation, and the ring's temperature can't tell + * (research §2, Natural Cycles' approach). + */ + fun pausesCycle(enabled: Boolean, birth: LocalDate?, feeding: Feeding, periodStarts: List): Boolean { + if (!enabled || birth == null) return false + if (feeding.breastfeeding) return true + return periodStarts.none { it.isAfter(birth.plusDays(55)) } + } + + /** Dietary Guidelines 2020–2025: +330 kcal a day in months 0–6, +400 in 7–12, for exclusive breastfeeding; half for mixed. */ + fun calorieBonus(birth: LocalDate, today: LocalDate, feeding: Feeding): Int { + val months = monthsSince(birth, today) + val full = when { + months < 6 -> 330 + months < 12 -> 400 + else -> 0 + } + return when (feeding) { + Feeding.EXCLUSIVE -> full + Feeding.MIXED -> full / 2 + Feeding.NONE -> 0 + } + } + + /** The lactational amenorrhoea method's three conditions, each with whether it holds. Information, not advice. */ + data class Lam(val babyUnderSixMonths: Boolean, val noPeriodSinceBirth: Boolean, val fullBreastfeeding: Boolean, val daysToSixMonths: Long) { + val allHold: Boolean get() = babyUnderSixMonths && noPeriodSinceBirth && fullBreastfeeding + } + + fun lam(birth: LocalDate, today: LocalDate, feeding: Feeding, periodStarts: List): Lam { + val sixMonths = birth.plusMonths(6) + return Lam( + babyUnderSixMonths = today.isBefore(sixMonths), + // Bleeding in the first 56 days after birth isn't counted as a return of menses. + noPeriodSinceBirth = periodStarts.none { it.isAfter(birth.plusDays(55)) }, + fullBreastfeeding = feeding == Feeding.EXCLUSIVE, + daysToSixMonths = ChronoUnit.DAYS.between(today, sixMonths).coerceAtLeast(0), + ) + } + + /** + * When a drink should be out of her milk, by CDC's rule of thumb: at least two hours per + * standard drink (14 g of alcohol). Drinks are (time ms, grams); those more than 12 hours old + * are done. Each drink clears two hours after the previous one has, so a drink taken while + * earlier ones are still clearing adds its two hours on top. Null when nothing is pending. + */ + fun alcoholClearAt(drinks: List>, now: Long): Long? { + var clear = 0L + drinks.filter { it.first in (now - 12 * 3_600_000L)..now && it.second > 0 }.sortedBy { it.first }.forEach { (t, g) -> + clear = maxOf(clear, t) + (g / 14.0 * 2 * 3_600_000L).toLong() + } + return clear.takeIf { it > now } + } + + /** How broken a night was: separate wakings between stretches of sleep, and the longest unbroken stretch. */ + data class NightBreaks(val wakings: Int, val longestSleepMin: Int, val asleepMin: Int) + + /** [stages] is the night minute by minute. A waking is one or more awake minutes with sleep on both sides. */ + fun nightBreaks(stages: List): NightBreaks { + var wakings = 0; var run = 0; var longest = 0; var asleep = 0; var sawSleep = false; var inWake = false + for (s in stages) { + if (s == SleepStage.AWAKE) { + if (sawSleep && !inWake) inWake = true + run = 0 + } else { + if (inWake) { wakings++; inWake = false } + sawSleep = true; run++; asleep++ + longest = maxOf(longest, run) + } + } + return NightBreaks(wakings, longest, asleep) + } + + /** Median of each week since birth (week 0 = the first seven days), for a recovery trend. */ + fun weeklyMedians(values: List>, birth: LocalDate): List> = + values.filter { !it.first.isBefore(birth) } + .groupBy { weeksSince(birth, it.first) } + .toSortedMap() + .map { (w, v) -> w to v.map { it.second }.sorted().let { s -> if (s.size % 2 == 1) s[s.size / 2] else (s[s.size / 2 - 1] + s[s.size / 2]) / 2 } } + + // ── Mood check-in (EPDS) ───────────────────────────────────────────────────────────────── + + /** Score bands from the Brazilian validation (cut-off 10); item 10 is acted on whatever the total. */ + enum class EpdsBand { LOW, POSSIBLE, LIKELY } + + fun epdsBand(score: Int): EpdsBand = when { + score >= 13 -> EpdsBand.LIKELY + score >= 10 -> EpdsBand.POSSIBLE + else -> EpdsBand.LOW + } + + @Serializable + data class EpdsResult(val date: String, val score: Int, val selfHarm: Int) + + private val json = kotlinx.serialization.json.Json { ignoreUnknownKeys = true } + + /** Kept only on this phone: not in the data archive, the diagnostics export or Health Connect. */ + fun epdsHistory(): List = + p()?.getString("epds", null)?.let { runCatching { json.decodeFromString(kotlinx.serialization.builtins.ListSerializer(EpdsResult.serializer()), it) }.getOrNull() }.orEmpty() + + fun saveEpds(result: EpdsResult) { + val all = (epdsHistory().filter { it.date != result.date } + result).sortedBy { it.date }.takeLast(24) + p()?.edit()?.putString("epds", json.encodeToString(kotlinx.serialization.builtins.ListSerializer(EpdsResult.serializer()), all))?.apply() + } + + /** Suggested check-ins at about 2 and 6 weeks, 3 and 6 months; the next one not yet answered near its time. */ + fun nextCheckIn(birth: LocalDate, today: LocalDate, history: List): LocalDate? { + val points = listOf(birth.plusWeeks(2), birth.plusWeeks(6), birth.plusMonths(3), birth.plusMonths(6)) + val done = history.mapNotNull { runCatching { LocalDate.parse(it.date) }.getOrNull() } + return points.firstOrNull { pt -> done.none { d -> !d.isBefore(pt.minusDays(7)) } && pt.plusDays(21).isAfter(today) } + } +} + +/** The postpartum life stage as the coach sees it; null when the mode is off. */ +@Serializable +data class PostpartumContext( + val weeksSinceBirth: Int, + val feeding: String, + val note: String = "The user is postpartum and set this herself. Resting heart rate and HRV are still settling " + + "after birth (RHR often dips below her old normal around week 7 and takes months to settle), and broken " + + "sleep is expected. Never say the ring detects mastitis, fever, depression, preeclampsia, milk supply or " + + "returning fertility. Alcohol while breastfeeding: not drinking is safest; CDC suggests waiting at least " + + "2 hours per standard drink before nursing; pumping and dumping doesn't speed it up. Never call a " + + "medication safe while breastfeeding: point to LactMed or e-lactancia and her clinician. No weight-loss " + + "framing. Urgent warning signs (fever 38 °C or higher, severe headache, vision changes, chest pain, " + + "trouble breathing, heavy bleeding, thoughts of harming herself or the baby) mean contacting a clinician " + + "or emergency services now; in Brazil, SAMU 192 and CVV 188.", +) { + companion object { + fun build(today: LocalDate = LocalDate.now()): PostpartumContext? { + if (!Postpartum.active(today)) return null + val birth = Postpartum.birthDate ?: return null + return PostpartumContext(Postpartum.weeksSince(birth, today), Postpartum.feeding.key) + } + } +} diff --git a/app/src/main/java/com/pulseloop/ui/PulseLoopApp.kt b/app/src/main/java/com/pulseloop/ui/PulseLoopApp.kt index 2b0c9dd7..b00d86d1 100644 --- a/app/src/main/java/com/pulseloop/ui/PulseLoopApp.kt +++ b/app/src/main/java/com/pulseloop/ui/PulseLoopApp.kt @@ -222,6 +222,8 @@ fun PulseLoopApp() { com.pulseloop.notifications.GuidanceWorker.schedule(context.applicationContext) com.pulseloop.health.HealthConnectBodyImport.schedule(context.applicationContext) com.pulseloop.health.source.HealthConnectSource.schedule(context.applicationContext) + // The breastfeeding allowance grows at six months and ends at twelve. + runCatching { com.pulseloop.ui.screens.syncCalorieGoal(context.applicationContext) } runCatching { com.pulseloop.health.ProfileAging.refresh(db) } // NOTE: demo data is never auto-seeded. A clean install starts empty so the UI @@ -608,7 +610,7 @@ fun PulseLoopApp() { CheckInsSettingsScreen(onBack = { navController.popBackStack() }) } paddedComposable("settings/profile") { - ProfileSettingsScreen(coordinator, onBack = { navController.popBackStack() }) + ProfileSettingsScreen(coordinator, onBack = { navController.popBackStack() }, onOpenPostpartum = { navController.navigate("postpartum") }) } paddedComposable("settings/physiology") { PhysiologySettingsScreen(onBack = { navController.popBackStack() }) @@ -710,6 +712,13 @@ fun PulseLoopApp() { onWhatChanged = { navController.navigate("what_changed") }, onCycle = { navController.navigate("cycle") }, onMeds = { navController.navigate("meds") }, + onPostpartum = { navController.navigate("postpartum") }, + ) + } + paddedComposable("postpartum") { + com.pulseloop.ui.screens.PostpartumScreen( + onBack = { navController.popBackStack() }, + onOpenProfile = { navController.navigate("settings/profile") }, ) } paddedComposable("meds") { diff --git a/app/src/main/java/com/pulseloop/ui/i18n/L10n.kt b/app/src/main/java/com/pulseloop/ui/i18n/L10n.kt index 302a4dfe..cb94f563 100644 --- a/app/src/main/java/com/pulseloop/ui/i18n/L10n.kt +++ b/app/src/main/java/com/pulseloop/ui/i18n/L10n.kt @@ -35,6 +35,10 @@ enum class AppLanguage( "fh-en", "F*cking Health", "en", listOf("i18n/en-FH.json"), Voice.FUNNY, caption = "English, with attitude. Strong language.", ), + FUCKING_HEALTH_PT( + "fh-pt", "Saúde do C*ralho", "pt-BR", listOf("i18n/pt-BR-FH.json", "i18n/pt-BR.json"), Voice.FUNNY, + caption = "Português, com atitude. Linguagem forte.", + ), } /** @@ -119,7 +123,8 @@ object L10n { "\n\nVOICE: The user picked \"F*cking Health\", the app's sarcastic, foul-mouthed persona. Talk like a " + "grumpy best friend who happens to know physiology: blunt, funny, a bit theatrical, complaining about " + "the numbers even when they're good. Swear, but censor it with asterisks the way the app does " + - "(f*cking, sh*t, WTF, damn). Short punchy sentences, rhetorical questions, the odd exclamation. " + + "(f*cking, sh*t, WTF, damn; in Portuguese, Brazilian swearing censored the same way: p*rra, c*ralho, " + + "m*rda, f*da). Short punchy sentences, rhetorical questions, the odd exclamation. " + "The facts, numbers and advice must stay exactly as accurate and useful as in plain mode; the " + "attitude is the wrapping, not the content. Roast the habits, never the person: no jokes about " + "weight, body shape, age, gender, illness or appearance. Drop the act completely and be calm, kind " + diff --git a/app/src/main/java/com/pulseloop/ui/screens/AccuracyCheckUi.kt b/app/src/main/java/com/pulseloop/ui/screens/AccuracyCheckUi.kt index 20ee4a67..ce51295e 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/AccuracyCheckUi.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/AccuracyCheckUi.kt @@ -134,7 +134,7 @@ fun AccuracyCheckSettingsScreen(onBack: () -> Unit) { Text(tr("Compare your ring with another device"), fontSize = 15.sp, fontWeight = FontWeight.Bold, color = PulseColors.textPrimary) Text( tr("Wear the ring and a watch or band you trust for a few days. PulseLoop reads that device's data from " + - tr("Health Connect and shows where the ring agrees and where it falls short.")), + "Health Connect and shows where the ring agrees and where it falls short."), fontSize = 13.sp, color = PulseColors.textSecondary, ) Text( diff --git a/app/src/main/java/com/pulseloop/ui/screens/AccuracyReportUi.kt b/app/src/main/java/com/pulseloop/ui/screens/AccuracyReportUi.kt index 0392bbb5..03296beb 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/AccuracyReportUi.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/AccuracyReportUi.kt @@ -352,7 +352,7 @@ private fun CorrectionDialog( Text( trf("Fitted from this check so your ring matches {0}: {1}. ", ref, AccuracyCorrections.formatValue(metric, fitted)) + tr("It changes what PulseLoop shows and what it works out from it (zones, resting baseline, calorie estimate). " + - tr("Your ring's stored readings and what goes to Health Connect stay as measured.")), + "Your ring's stored readings and what goes to Health Connect stay as measured."), fontSize = 12.sp, ) Text(AccuracyCorrections.formatValue(metric, value), fontSize = 20.sp, fontWeight = FontWeight.Bold) diff --git a/app/src/main/java/com/pulseloop/ui/screens/ActivityScreen.kt b/app/src/main/java/com/pulseloop/ui/screens/ActivityScreen.kt index 6207308a..67803143 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/ActivityScreen.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/ActivityScreen.kt @@ -278,7 +278,7 @@ fun ActivityScreen( text = { Text( tr("Recording a workout needs the Physical activity permission. " + - tr("You can allow it in Android Settings › Apps › PulseLoop › Permissions.")), + "You can allow it in Android Settings › Apps › PulseLoop › Permissions."), ) }, confirmButton = { TextButton(onClick = { permissionDenied = false }) { Text("OK") } }, diff --git a/app/src/main/java/com/pulseloop/ui/screens/CycleUi.kt b/app/src/main/java/com/pulseloop/ui/screens/CycleUi.kt index 3c2bf6a8..ae105c96 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/CycleUi.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/CycleUi.kt @@ -76,7 +76,15 @@ fun CycleScreen(onBack: () -> Unit) { } else { Text(trf("Day {0} · {1}", status.cycleDay, status.phase.label), fontSize = 22.sp, fontWeight = FontWeight.Bold, color = PulseColors.textPrimary) Text(status.phase.note, fontSize = 13.sp, color = PulseColors.textSecondary) - status.nextStart?.let { next -> + val paused = com.pulseloop.service.Postpartum.pausesCycle( + com.pulseloop.service.Postpartum.active(today), com.pulseloop.service.Postpartum.birthDate, + com.pulseloop.service.Postpartum.feeding, periods.map { LocalDate.ofEpochDay(it.startDay) }, + ) + if (paused) Text( + tr("Predictions are paused after birth: while breastfeeding, and until your first period, cycles don't follow their usual pattern."), + fontSize = 13.sp, color = PulseColors.textSecondary, + ) + status.nextStart?.takeIf { !paused }?.let { next -> val d = status.daysToNext ?: 0 Text( if (d >= 0) trf("Next period around {0} (in {1} day{2}), from your usual {3}-day cycle.", next.format(fmt), d, if (d == 1) "" else "s", status.usualLength) diff --git a/app/src/main/java/com/pulseloop/ui/screens/DebugScreen.kt b/app/src/main/java/com/pulseloop/ui/screens/DebugScreen.kt index 5b83bb8c..6f8ff294 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/DebugScreen.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/DebugScreen.kt @@ -128,7 +128,7 @@ fun DebugScreen(viewModel: DiagnosticsViewModel, onBack: () -> Unit = {}) { item { DebugCard(tr("Database")) { Text(tr("Row counts include demo and real rows. Tap a table to see its newest rows. " + - tr("Stored health rows are never included in a diagnostics export.")), + "Stored health rows are never included in a diagnostics export."), style = MaterialTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant) counts.forEach { count -> Row( diff --git a/app/src/main/java/com/pulseloop/ui/screens/DrinksUi.kt b/app/src/main/java/com/pulseloop/ui/screens/DrinksUi.kt index 0d823bdd..3b556cf3 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/DrinksUi.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/DrinksUi.kt @@ -243,6 +243,7 @@ fun DrinksScreen(onBack: () -> Unit, onBreathe: () -> Unit, onCoach: ((String) - } else when (tab) { 0 -> { WeekHero(s) + BreastfeedingAlcoholCard(s) LogCard(db, s) { refresh++ } InsightCard(s) } @@ -270,6 +271,26 @@ fun DrinksScreen(onBack: () -> Unit, onBreathe: () -> Unit, onCoach: ((String) - // ── Welcome ───────────────────────────────────────────────────────────────────────────────── +/** + * While breastfeeding (Postpartum mode): when the drinks just logged should be out of her milk, by + * CDC's two-hours-per-drink rule. An estimate, said as one, with what doesn't help (pumping and + * dumping) and what is safest (not drinking). + */ +@Composable +private fun BreastfeedingAlcoholCard(s: DrinksRepository.Snapshot) { + if (!com.pulseloop.service.Postpartum.breastfeeding) return + val now = System.currentTimeMillis() + val clear = com.pulseloop.service.Postpartum.alcoholClearAt(s.recent.map { it.timestamp to it.grams }, now) ?: return + val time = DateTimeFormatter.ofPattern("HH:mm").format(java.time.Instant.ofEpochMilli(clear).atZone(ZoneId.systemDefault())) + DrinkCard { + Text(trf("Breastfeeding: estimated clear around {0}", time), fontSize = 15.sp, fontWeight = FontWeight.Bold, color = PulseColors.warning) + Text( + tr("CDC suggests waiting at least 2 hours per standard drink before feeding. It's an estimate: bodies differ, and pumping and dumping doesn't make it faster. Not drinking is the safest choice."), + fontSize = 12.sp, color = PulseColors.textSecondary, + ) + } +} + @Composable private fun Benefit(icon: ImageVector, text: String) { Row(verticalAlignment = Alignment.CenterVertically, horizontalArrangement = Arrangement.spacedBy(12.dp)) { diff --git a/app/src/main/java/com/pulseloop/ui/screens/HealthConnectSourceUi.kt b/app/src/main/java/com/pulseloop/ui/screens/HealthConnectSourceUi.kt index 3a4e78fc..94f4f100 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/HealthConnectSourceUi.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/HealthConnectSourceUi.kt @@ -127,7 +127,7 @@ fun HealthConnectSourceContent(onEnabled: (() -> Unit)? = null) { Text( tr("No PulseLoop ring? If your Oura, Galaxy Ring, Fitbit or watch app writes to Health Connect, PulseLoop can " + "read it from there: sleep, heart rate, HRV, blood oxygen, steps, calories, workouts and periods. " + - tr("Every screen, the coach and your insights then work from that data.")), + "Every screen, the coach and your insights then work from that data."), fontSize = 13.sp, color = PulseColors.textSecondary, ) Text( diff --git a/app/src/main/java/com/pulseloop/ui/screens/MealAnalysisSheet.kt b/app/src/main/java/com/pulseloop/ui/screens/MealAnalysisSheet.kt index e4b83b5a..49fffeec 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/MealAnalysisSheet.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/MealAnalysisSheet.kt @@ -726,7 +726,7 @@ object MealEstimator { if (!keyStore.coachEnabled || resolution.key == null) { return@withContext Result.Failure( tr("AI analysis needs the coach enabled with a configured provider (Settings → AI Coach). " + - tr("You can still search the database or enter the meal manually.")), + "You can still search the database or enter the meal manually."), ) } val model = CoachClientResolver.activeModel(providerStore.snapshot(), keyStore.model) diff --git a/app/src/main/java/com/pulseloop/ui/screens/MedsUi.kt b/app/src/main/java/com/pulseloop/ui/screens/MedsUi.kt index a66f78de..a0ed6469 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/MedsUi.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/MedsUi.kt @@ -113,6 +113,22 @@ fun MedsScreen(onBack: () -> Unit) { Text(m.name + (m.dose?.let { " · $it" } ?: ""), fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = if (m.active) PulseColors.textPrimary else PulseColors.textMuted) val adherence = Meds.adherence(m, answers, today) + if (com.pulseloop.service.Postpartum.breastfeeding) { + Text( + tr("While breastfeeding: check in e-lactancia or LactMed, and ask your clinician"), + fontSize = 12.sp, color = PulseColors.accent, + modifier = Modifier.clickable { + runCatching { + context.startActivity( + android.content.Intent( + android.content.Intent.ACTION_VIEW, + android.net.Uri.parse("https://www.e-lactancia.org/buscar/?term=" + android.net.Uri.encode(m.name)), + ).addFlags(android.content.Intent.FLAG_ACTIVITY_NEW_TASK), + ) + } + }, + ) + } Text( (if (m.kind == "supplement") tr("Supplement") else tr("Medication")) + " · " + Meds.times(m).joinToString(", ") + (adherence?.let { trf(" · {0}% taken this week", it) } ?: "") + if (!m.active) tr(" · paused") else "", diff --git a/app/src/main/java/com/pulseloop/ui/screens/MyHealthUi.kt b/app/src/main/java/com/pulseloop/ui/screens/MyHealthUi.kt index 0c6514e0..0aadab99 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/MyHealthUi.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/MyHealthUi.kt @@ -132,7 +132,7 @@ private fun Sparkline(values: List, color: Color, modifier: Modifier = M } @Composable -fun MyHealthScreen(onBack: () -> Unit, onBreathe: () -> Unit, onWhatChanged: () -> Unit = {}, onCycle: () -> Unit = {}, onMeds: () -> Unit = {}) { +fun MyHealthScreen(onBack: () -> Unit, onBreathe: () -> Unit, onWhatChanged: () -> Unit = {}, onCycle: () -> Unit = {}, onMeds: () -> Unit = {}, onPostpartum: () -> Unit = {}) { val context = LocalContext.current val db = remember { PulseLoopDatabase.getInstance(context) } var refresh by remember { mutableIntStateOf(0) } @@ -189,6 +189,20 @@ fun MyHealthScreen(onBack: () -> Unit, onBreathe: () -> Unit, onWhatChanged: () } Text("›", fontSize = 22.sp, color = PulseColors.textMuted) } + if (com.pulseloop.service.Postpartum.active()) { + Row( + Modifier.fillMaxWidth().clip(RoundedCornerShape(8.dp)).background(PulseColors.card) + .clickable(onClick = onPostpartum).padding(16.dp), + verticalAlignment = Alignment.CenterVertically, + ) { + Column(Modifier.weight(1f)) { + val birth = com.pulseloop.service.Postpartum.birthDate!! + Text(trf("Postpartum · week {0}", com.pulseloop.service.Postpartum.weeksSince(birth, java.time.LocalDate.now())), fontSize = 15.sp, fontWeight = FontWeight.Bold, color = PulseColors.textPrimary) + Text(tr("Recovery, nights, mood check-in and warning signs"), fontSize = 12.sp, color = PulseColors.textMuted) + } + Text("›", fontSize = 22.sp, color = PulseColors.textMuted) + } + } val periods by remember { db.periodDao().allFlow() }.collectAsState(initial = emptyList()) val cycle = Cycle.status(periods.map { it.toPeriod() }, java.time.LocalDate.now()) Row( diff --git a/app/src/main/java/com/pulseloop/ui/screens/OnboardingScreen.kt b/app/src/main/java/com/pulseloop/ui/screens/OnboardingScreen.kt index d6171e59..fb46e6a9 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/OnboardingScreen.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/OnboardingScreen.kt @@ -339,7 +339,7 @@ private fun WelcomeStep( if (permissionDenied) { Text( tr("PulseLoop needs Bluetooth permission to find and connect to your ring. " + - tr("Allow it in Settings, or continue without a ring and pair one later.")), + "Allow it in Settings, or continue without a ring and pair one later."), fontSize = 13.sp, color = PulseColors.textSecondary, textAlign = TextAlign.Center, diff --git a/app/src/main/java/com/pulseloop/ui/screens/PairingScreen.kt b/app/src/main/java/com/pulseloop/ui/screens/PairingScreen.kt index 997b23e2..e992c46a 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/PairingScreen.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/PairingScreen.kt @@ -742,13 +742,13 @@ private fun BluetoothPermissionCard(permanentlyDenied: Boolean, onRequest: () -> ) Text( if (permanentlyDenied) { - tr("PulseLoop uses Bluetooth to find and connect your ring. " + - tr("Allow ")) + - (if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) tr("\"Nearby devices\"") else tr("Location")) + - " for PulseLoop in Settings." + trf( + "PulseLoop uses Bluetooth to find and connect your ring. Allow {0} for PulseLoop in Settings.", + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) tr("\"Nearby devices\"") else tr("Location"), + ) } else { tr("PulseLoop uses Bluetooth to find and connect your ring. " + - tr("Nothing is shared off your phone.")) + "Nothing is shared off your phone.") }, fontSize = 14.sp, color = PulseColors.textSecondary, diff --git a/app/src/main/java/com/pulseloop/ui/screens/PostpartumUi.kt b/app/src/main/java/com/pulseloop/ui/screens/PostpartumUi.kt new file mode 100644 index 00000000..98b3b8ce --- /dev/null +++ b/app/src/main/java/com/pulseloop/ui/screens/PostpartumUi.kt @@ -0,0 +1,519 @@ +package com.pulseloop.ui.screens + +import android.content.Context +import android.content.Intent +import android.net.Uri +import androidx.compose.foundation.background +import androidx.compose.foundation.border +import androidx.compose.foundation.clickable +import androidx.compose.foundation.layout.* +import androidx.compose.foundation.rememberScrollState +import androidx.compose.foundation.shape.RoundedCornerShape +import androidx.compose.foundation.verticalScroll +import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.automirrored.filled.ArrowBack +import androidx.compose.material3.Button +import androidx.compose.material3.DatePicker +import androidx.compose.material3.DatePickerDialog +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.Icon +import androidx.compose.material3.IconButton +import androidx.compose.material3.OutlinedButton +import androidx.compose.material3.Switch +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.material3.rememberDatePickerState +import androidx.compose.runtime.* +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.draw.clip +import androidx.compose.ui.platform.LocalContext +import androidx.compose.ui.text.font.FontWeight +import androidx.compose.ui.unit.dp +import androidx.compose.ui.unit.sp +import com.pulseloop.data.PulseLoopDatabase +import com.pulseloop.ring.SleepStage +import com.pulseloop.service.Postpartum +import com.pulseloop.service.ReadinessRepository +import com.pulseloop.ui.i18n.L10n +import com.pulseloop.ui.i18n.tr +import com.pulseloop.ui.i18n.trf +import com.pulseloop.ui.theme.PulseColors +import kotlinx.coroutines.launch +import kotlinx.serialization.Serializable +import kotlinx.serialization.json.Json +import java.time.Instant +import java.time.LocalDate +import java.time.ZoneId +import java.time.ZoneOffset +import java.time.format.DateTimeFormatter +import kotlin.math.roundToInt + +// ── Profile: switching the mode on ────────────────────────────────────────────────────────── + +/** User Profile → Life stage. The postpartum mode is only ever switched on here, by her. */ +@OptIn(ExperimentalMaterial3Api::class, ExperimentalLayoutApi::class) +@Composable +fun PostpartumProfileCard(onOpen: () -> Unit) { + val context = LocalContext.current + val scope = rememberCoroutineScope() + var enabled by remember { mutableStateOf(Postpartum.enabled) } + var birth by remember { mutableStateOf(Postpartum.birthDate) } + var feeding by remember { mutableStateOf(Postpartum.feeding) } + var picking by remember { mutableStateOf(false) } + val fmt = remember { DateTimeFormatter.ofPattern("d MMM yyyy") } + + fun save() { + Postpartum.set(enabled, birth, feeding) + scope.launch { syncCalorieGoal(context) } + } + + Column( + Modifier.fillMaxWidth().clip(RoundedCornerShape(8.dp)).background(PulseColors.card).padding(16.dp), + verticalArrangement = Arrangement.spacedBy(10.dp), + ) { + Text(tr("LIFE STAGE"), fontSize = 11.sp, letterSpacing = 1.6.sp, color = PulseColors.textMuted) + Row(verticalAlignment = Alignment.CenterVertically) { + Column(Modifier.weight(1f)) { + Text(tr("Postpartum / breastfeeding"), fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = PulseColors.textPrimary) + Text( + tr("Pauses cycle predictions while breastfeeding, adds an alcohol-to-feeding estimate, a mood check-in and warning signs, and tells the coach."), + fontSize = 12.sp, color = PulseColors.textMuted, + ) + } + Switch(checked = enabled, onCheckedChange = { + enabled = it + if (it && birth == null) picking = true + save() + }) + } + if (enabled) { + Row(verticalAlignment = Alignment.CenterVertically) { + Text(tr("Baby's birth date"), fontSize = 14.sp, color = PulseColors.textSecondary, modifier = Modifier.weight(1f)) + TextButton(onClick = { picking = true }) { Text(birth?.format(fmt) ?: tr("Set")) } + } + Text(tr("Feeding"), fontSize = 14.sp, color = PulseColors.textSecondary) + FlowRow(horizontalArrangement = Arrangement.spacedBy(6.dp), verticalArrangement = Arrangement.spacedBy(6.dp)) { + listOf( + Postpartum.Feeding.EXCLUSIVE to tr("Breastfeeding only"), + Postpartum.Feeding.MIXED to tr("Breastfeeding and formula"), + Postpartum.Feeding.NONE to tr("Not breastfeeding"), + ).forEach { (f, label) -> Chip(label, feeding == f) { feeding = f; save() } } + } + if (birth != null) OutlinedButton(onClick = onOpen, modifier = Modifier.fillMaxWidth()) { Text(tr("Open postpartum view")) } + } + } + + if (picking) { + val state = rememberDatePickerState( + initialSelectedDateMillis = (birth ?: LocalDate.now()).atStartOfDay(ZoneOffset.UTC).toInstant().toEpochMilli(), + ) + DatePickerDialog( + onDismissRequest = { picking = false }, + confirmButton = { + TextButton(onClick = { + state.selectedDateMillis?.let { Instant.ofEpochMilli(it).atZone(ZoneOffset.UTC).toLocalDate() } + ?.takeIf { !it.isAfter(LocalDate.now()) }?.let { birth = it; save() } + picking = false + }) { Text(tr("Save")) } + }, + dismissButton = { TextButton(onClick = { picking = false }) { Text(tr("Cancel")) } }, + ) { + Text(tr("When was your baby born?"), modifier = Modifier.padding(start = 24.dp, top = 16.dp), fontSize = 16.sp, fontWeight = FontWeight.SemiBold) + DatePicker(state = state, showModeToggle = false) + } + } +} + +/** + * Keeps the intake goal's breastfeeding allowance in step with the mode: adds the difference between + * what the stage calls for and what was added before, so switching off or weaning takes exactly that + * back and a goal the user edited by hand otherwise stays hers. + */ +suspend fun syncCalorieGoal(context: Context, today: LocalDate = LocalDate.now()) { + val db = PulseLoopDatabase.getInstance(context) + val goal = db.userGoalDao().get() ?: return + val target = Postpartum.birthDate?.takeIf { Postpartum.active(today) } + ?.let { Postpartum.calorieBonus(it, today, Postpartum.feeding) } ?: 0 + val delta = target - Postpartum.appliedCalorieBonus + if (delta == 0 || goal.intakeCalories == null) return + db.userGoalDao().upsert(goal.copy(intakeCalories = goal.intakeCalories + delta)) + Postpartum.appliedCalorieBonus = target +} + +@Composable +private fun Chip(label: String, on: Boolean, onClick: () -> Unit) { + val shape = RoundedCornerShape(16.dp) + Text( + label, fontSize = 13.sp, + color = if (on) PulseColors.onAccent else PulseColors.textSecondary, + modifier = Modifier.clip(shape).background(if (on) PulseColors.accent else PulseColors.cardSoft) + .border(1.dp, if (on) PulseColors.accent else PulseColors.borderSubtle, shape) + .clickable(onClick = onClick).padding(horizontal = 12.dp, vertical = 8.dp), + ) +} + +// ── The postpartum view ───────────────────────────────────────────────────────────────────── + +private data class PostpartumData( + val alcoholClearAt: Long?, + val lastNight: Postpartum.NightBreaks?, + val restingHr: List>, + val hrv: List>, + val lam: Postpartum.Lam?, +) + +private suspend fun loadPostpartum(db: PulseLoopDatabase, birth: LocalDate, now: Long, zone: ZoneId): PostpartumData { + val today = Instant.ofEpochMilli(now).atZone(zone).toLocalDate() + val drinks = db.drinkDao().between(now - 13 * 3_600_000L, now + 1).map { it.timestamp to it.grams } + val inputs = runCatching { ReadinessRepository.loadInputs(db, now, zone) }.getOrNull() + val nights = inputs?.let { it.history + listOfNotNull(it.lastNight) }.orEmpty() + val last = db.sleepSessionDao().recent(3).firstOrNull { it.endAt > now - 30 * 3_600_000L } + val breaks = last?.let { s -> + val blocks = db.sleepStageBlockDao().forSession(s.id).sortedBy { it.startAt } + val minutes = ((s.endAt - s.startAt) / 60_000L).toInt().coerceIn(0, 24 * 60) + val stages = MutableList(minutes) { SleepStage.AWAKE } + blocks.forEach { b -> + val from = ((b.startAt - s.startAt) / 60_000L).toInt() + val stage = runCatching { SleepStage.valueOf(b.stageRaw) }.getOrDefault(SleepStage.UNKNOWN) + for (m in from until from + b.durationMinutes) if (m in stages.indices) stages[m] = stage + } + Postpartum.nightBreaks(stages) + } + val periods = db.periodDao().all().map { LocalDate.ofEpochDay(it.startDay) } + return PostpartumData( + alcoholClearAt = if (Postpartum.breastfeeding) Postpartum.alcoholClearAt(drinks, now) else null, + lastNight = breaks, + restingHr = Postpartum.weeklyMedians(nights.mapNotNull { n -> n.restingHr?.let { n.day to it } }, birth), + hrv = Postpartum.weeklyMedians(nights.mapNotNull { n -> n.hrv?.let { n.day to it } }, birth), + lam = if (Postpartum.breastfeeding) Postpartum.lam(birth, today, Postpartum.feeding, periods) else null, + ) +} + +@Composable +fun PostpartumScreen(onBack: () -> Unit, onOpenProfile: () -> Unit) { + val context = LocalContext.current + val db = remember { PulseLoopDatabase.getInstance(context) } + val zone = remember { ZoneId.systemDefault() } + val today = remember { LocalDate.now() } + val birth = Postpartum.birthDate?.takeIf { Postpartum.active(today) } + var data by remember { mutableStateOf(null) } + var checkIn by remember { mutableStateOf(false) } + var history by remember { mutableStateOf(Postpartum.epdsHistory()) } + LaunchedEffect(birth) { if (birth != null) data = loadPostpartum(db, birth, System.currentTimeMillis(), zone) } + + if (checkIn) { + EpdsCheckIn(onDone = { result -> + if (result != null) { Postpartum.saveEpds(result); history = Postpartum.epdsHistory() } + checkIn = false + }) + return + } + + Column(Modifier.fillMaxSize().background(PulseColors.background)) { + Box(Modifier.fillMaxWidth().padding(vertical = 4.dp)) { + IconButton(onClick = onBack, modifier = Modifier.align(Alignment.CenterStart)) { Icon(Icons.AutoMirrored.Filled.ArrowBack, tr("Back")) } + Text(tr("Postpartum"), modifier = Modifier.align(Alignment.Center), fontSize = 17.sp, fontWeight = FontWeight.Bold) + } + Column( + Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(horizontal = 16.dp, vertical = 8.dp), + verticalArrangement = Arrangement.spacedBy(12.dp), + ) { + if (birth == null) { + Card { + Text(tr("Set your baby's birth date in your profile to see this view."), fontSize = 14.sp, color = PulseColors.textSecondary) + Button(onClick = onOpenProfile) { Text(tr("Open profile")) } + } + return@Column + } + val weeks = Postpartum.weeksSince(birth, today) + Card { + Text(trf("Week {0} after birth", weeks), fontSize = 22.sp, fontWeight = FontWeight.Bold, color = PulseColors.textPrimary) + Text( + when (Postpartum.feeding) { + Postpartum.Feeding.EXCLUSIVE -> tr("Breastfeeding only") + Postpartum.Feeding.MIXED -> tr("Breastfeeding and formula") + Postpartum.Feeding.NONE -> tr("Not breastfeeding") + }, + fontSize = 13.sp, color = PulseColors.textSecondary, + ) + Text( + tr("Your body is still recovering. Broken nights and a resting heart rate that wanders are expected for months, so compare yourself with last week, not with before."), + fontSize = 13.sp, color = PulseColors.textPrimary, + ) + } + + val d = data + d?.alcoholClearAt?.let { clear -> + val time = DateTimeFormatter.ofPattern("HH:mm").format(Instant.ofEpochMilli(clear).atZone(zone)) + Card { + Text(trf("Alcohol: estimated clear for feeding around {0}", time), fontSize = 15.sp, fontWeight = FontWeight.Bold, color = PulseColors.warning) + Text( + tr("CDC suggests waiting at least 2 hours per standard drink before breastfeeding. It's an estimate: bodies differ, and pumping and dumping doesn't make it faster. Not drinking is the safest choice."), + fontSize = 12.sp, color = PulseColors.textSecondary, + ) + } + } + + d?.lastNight?.let { n -> + Card { + Text(tr("LAST NIGHT"), fontSize = 11.sp, letterSpacing = 1.6.sp, color = PulseColors.textMuted) + Text( + trf("{0} asleep · woke {1} times · longest stretch {2}", fmtMin(n.asleepMin), n.wakings, fmtMin(n.longestSleepMin)), + fontSize = 15.sp, color = PulseColors.textPrimary, + ) + Text( + tr("After birth, sleep is broken rather than short. The longest unbroken stretch is the number to watch; it usually grows over the first months."), + fontSize = 12.sp, color = PulseColors.textMuted, + ) + } + } + + if (d != null && (d.restingHr.isNotEmpty() || d.hrv.isNotEmpty())) { + Card { + Text(tr("RECOVERY, WEEK BY WEEK"), fontSize = 11.sp, letterSpacing = 1.6.sp, color = PulseColors.textMuted) + val weeksShown = (d.restingHr.map { it.first } + d.hrv.map { it.first }).distinct().sorted().takeLast(8) + weeksShown.forEach { w -> + val rhr = d.restingHr.firstOrNull { it.first == w }?.second + val hrv = d.hrv.firstOrNull { it.first == w }?.second + Text( + trf("Week {0}: resting HR {1} · HRV {2}", w, rhr?.let { "${it.roundToInt()} bpm" } ?: "–", hrv?.let { "${it.roundToInt()} ms" } ?: "–"), + fontSize = 13.sp, color = PulseColors.textPrimary, + ) + } + Text( + tr("Resting heart rate often drops below your old normal around week 7 and takes months to settle; HRV tends to climb back. Differences between women are large."), + fontSize = 12.sp, color = PulseColors.textMuted, + ) + } + } + + // Mood check-in: the EPDS, the validated questionnaire. Answers stay on this phone. + Card { + Text(tr("MOOD CHECK-IN"), fontSize = 11.sp, letterSpacing = 1.6.sp, color = PulseColors.textMuted) + val last = history.lastOrNull() + if (last != null) { + Text(trf("Last check-in {0}: score {1} of 30", last.date, last.score), fontSize = 14.sp, color = PulseColors.textPrimary) + EpdsGuidance(last.score, last.selfHarm) + } else { + Text(tr("Ten quick questions about the last 7 days, used by health services worldwide to spot postpartum depression early."), fontSize = 13.sp, color = PulseColors.textSecondary) + } + Postpartum.nextCheckIn(birth, today, history)?.let { next -> + Text(trf("Suggested next check-in: {0}", next.format(DateTimeFormatter.ofPattern("d MMM"))), fontSize = 12.sp, color = PulseColors.textMuted) + } + Button(onClick = { checkIn = true }) { Text(tr("Start check-in")) } + Text(tr("Your answers stay on this phone. They aren't in backups, diagnostics or Health Connect."), fontSize = 11.sp, color = PulseColors.textMuted) + } + + d?.lam?.let { lam -> + Card { + Text(tr("BREASTFEEDING AS CONTRACEPTION (LAM)"), fontSize = 11.sp, letterSpacing = 1.6.sp, color = PulseColors.textMuted) + LamRow(tr("Baby under 6 months"), lam.babyUnderSixMonths, if (lam.babyUnderSixMonths) trf("{0} days to go", lam.daysToSixMonths) else null) + LamRow(tr("No period since 8 weeks after birth"), lam.noPeriodSinceBirth, null) + LamRow(tr("Breastfeeding only, day and night"), lam.fullBreastfeeding, null) + Text( + if (lam.allHold) tr("All three hold. LAM is about 98% effective only while all three do.") + else tr("Not all three hold, so LAM doesn't apply now."), + fontSize = 13.sp, color = PulseColors.textPrimary, + ) + Text(tr("This is information, not contraception advice. Talk to your clinician about the method that suits you."), fontSize = 11.sp, color = PulseColors.textMuted) + } + } + + Card { + Text(tr("NUTRITION"), fontSize = 11.sp, letterSpacing = 1.6.sp, color = PulseColors.textMuted) + val bonus = Postpartum.calorieBonus(birth, today, Postpartum.feeding) + if (bonus > 0) Text(trf("Breastfeeding uses about {0} kcal a day more; your intake goal includes it.", bonus), fontSize = 13.sp, color = PulseColors.textPrimary) + Text( + tr("Drink to thirst and keep water where you feed. Ask your clinician about iodine, DHA and your baby's vitamin D. This is no time for a diet."), + fontSize = 12.sp, color = PulseColors.textSecondary, + ) + } + + WarningSignsCard() + ResourcesCard(context) + Text( + tr("PulseLoop doesn't detect mastitis, fever, depression, preeclampsia, milk supply or returning fertility. The ring's numbers are context, not a diagnosis."), + fontSize = 11.sp, color = PulseColors.textMuted, + ) + Spacer(Modifier.height(24.dp)) + } + } +} + +private fun fmtMin(m: Int): String = if (m >= 60) "${m / 60}h ${m % 60}m" else "${m}m" + +@Composable +private fun Card(content: @Composable ColumnScope.() -> Unit) { + Column( + Modifier.fillMaxWidth().clip(RoundedCornerShape(8.dp)).background(PulseColors.card).padding(16.dp), + verticalArrangement = Arrangement.spacedBy(8.dp), + content = content, + ) +} + +@Composable +private fun LamRow(label: String, holds: Boolean, detail: String?) { + Row(verticalAlignment = Alignment.CenterVertically) { + Text(if (holds) "✓" else "✗", fontSize = 15.sp, color = if (holds) PulseColors.accent else PulseColors.warning, modifier = Modifier.width(24.dp)) + Text(label, fontSize = 13.sp, color = PulseColors.textPrimary, modifier = Modifier.weight(1f)) + detail?.let { Text(it, fontSize = 12.sp, color = PulseColors.textMuted) } + } +} + +/** CDC "Hear Her" urgent maternal warning signs, for up to a year after birth. Always plain, never hidden. */ +@Composable +private fun WarningSignsCard() { + Card { + Text(tr("Get care now if you notice"), fontSize = 15.sp, fontWeight = FontWeight.Bold, color = PulseColors.danger) + listOf( + tr("A headache that won't go away or gets worse"), + tr("Dizziness or fainting"), + tr("Changes in your vision"), + tr("Fever of 38 °C or higher"), + tr("Extreme swelling of your hands or face"), + tr("Thoughts of harming yourself or your baby"), + tr("Trouble breathing, chest pain or a racing heart"), + tr("Severe belly pain, nausea or vomiting"), + tr("Heavy bleeding or discharge"), + tr("A painful, red or swollen leg or arm"), + tr("A hot, painful, red area on a breast with fever or chills"), + tr("Overwhelming tiredness"), + ).forEach { Text("• $it", fontSize = 13.sp, color = PulseColors.textPrimary) } + Text(tr("Blood pressure of 160/110 or higher is an emergency. A ring's blood pressure isn't validated: confirm with a cuff, and never let a normal ring reading reassure you."), fontSize = 12.sp, color = PulseColors.textSecondary) + Text(tr("Source: CDC Hear Her urgent maternal warning signs."), fontSize = 11.sp, color = PulseColors.textMuted) + } +} + +@Composable +private fun ResourcesCard(context: Context) { + Card { + Text(tr("HELP"), fontSize = 11.sp, letterSpacing = 1.6.sp, color = PulseColors.textMuted) + ResourceRow(tr("SAMU (emergencies)"), "192") { dial(context, "192") } + ResourceRow(tr("CVV (emotional support, 24 h)"), "188") { dial(context, "188") } + ResourceRow(tr("Disque Saúde (find a human milk bank)"), "136") { dial(context, "136") } + ResourceRow(tr("Medicines while breastfeeding"), "e-lactancia") { open(context, "https://www.e-lactancia.org/") } + ResourceRow(tr("Human milk banks (rBLH)"), "rblh.fiocruz.br") { open(context, "https://rblh.fiocruz.br/") } + } +} + +@Composable +private fun ResourceRow(label: String, action: String, onClick: () -> Unit) { + Row(Modifier.fillMaxWidth().clickable(onClick = onClick).padding(vertical = 6.dp), verticalAlignment = Alignment.CenterVertically) { + Text(label, fontSize = 14.sp, color = PulseColors.textPrimary, modifier = Modifier.weight(1f)) + Text(action, fontSize = 14.sp, fontWeight = FontWeight.Bold, color = PulseColors.accent) + } +} + +private fun dial(context: Context, number: String) { + runCatching { context.startActivity(Intent(Intent.ACTION_DIAL, Uri.parse("tel:$number")).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) } +} + +private fun open(context: Context, url: String) { + runCatching { context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse(url)).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)) } +} + +// ── EPDS ──────────────────────────────────────────────────────────────────────────────────── + +@Serializable +private data class EpdsOption(val text: String, val score: Int) + +@Serializable +private data class EpdsItem(val text: String, val options: List) + +@Serializable +private data class EpdsForm(val instruction: String, val items: List) + +@Serializable +private data class EpdsAsset(val en: EpdsForm, val pt: EpdsForm, val citation_en: String, val citation_pt: String) + +private val epdsJson = Json { ignoreUnknownKeys = true } + +/** What a score means, and item 10 first: any thought of self-harm gets the crisis lines, whatever the total. */ +@Composable +private fun EpdsGuidance(score: Int, selfHarm: Int) { + val context = LocalContext.current + if (selfHarm > 0) { + Column( + Modifier.fillMaxWidth().clip(RoundedCornerShape(8.dp)).background(PulseColors.danger.copy(alpha = 0.15f)).padding(12.dp), + verticalArrangement = Arrangement.spacedBy(6.dp), + ) { + Text(tr("You said thoughts of harming yourself have come up. Please talk to someone today."), fontSize = 14.sp, fontWeight = FontWeight.Bold, color = PulseColors.textPrimary) + Text(tr("CVV listens 24 hours a day, free and anonymous. In danger now, call SAMU."), fontSize = 13.sp, color = PulseColors.textPrimary) + Row(horizontalArrangement = Arrangement.spacedBy(8.dp)) { + Button(onClick = { dial(context, "188") }) { Text(tr("Call CVV 188")) } + OutlinedButton(onClick = { dial(context, "192") }) { Text(tr("Call SAMU 192")) } + } + } + } + Text( + when (Postpartum.epdsBand(score)) { + Postpartum.EpdsBand.LOW -> tr("A low score. Keep checking in; how you feel can change in the months after birth.") + Postpartum.EpdsBand.POSSIBLE -> tr("This score suggests possible depression. Talk to your doctor, nurse or midwife soon.") + Postpartum.EpdsBand.LIKELY -> tr("This score suggests depression is likely. Please talk to your doctor, nurse or midwife this week.") + }, + fontSize = 13.sp, color = PulseColors.textPrimary, + ) + Text(tr("A screening questionnaire, not a diagnosis."), fontSize = 11.sp, color = PulseColors.textMuted) +} + +/** The Edinburgh Postnatal Depression Scale, worded exactly as validated (assets/epds.json). */ +@Composable +private fun EpdsCheckIn(onDone: (Postpartum.EpdsResult?) -> Unit) { + val context = LocalContext.current + val asset = remember { + runCatching { epdsJson.decodeFromString(EpdsAsset.serializer(), context.assets.open("epds.json").bufferedReader().use { it.readText() }) }.getOrNull() + } + if (asset == null) { LaunchedEffect(Unit) { onDone(null) }; return } + val portuguese = L10n.isPortuguese + val form = if (portuguese) asset.pt else asset.en + val answers = remember { mutableStateListOf().apply { repeat(form.items.size) { add(null) } } } + var result by remember { mutableStateOf(null) } + + Column(Modifier.fillMaxSize().background(PulseColors.background)) { + Box(Modifier.fillMaxWidth().padding(vertical = 4.dp)) { + IconButton(onClick = { onDone(result) }, modifier = Modifier.align(Alignment.CenterStart)) { Icon(Icons.AutoMirrored.Filled.ArrowBack, tr("Back")) } + Text(tr("Mood check-in"), modifier = Modifier.align(Alignment.Center), fontSize = 17.sp, fontWeight = FontWeight.Bold) + } + Column( + Modifier.fillMaxSize().verticalScroll(rememberScrollState()).padding(horizontal = 16.dp, vertical = 8.dp), + verticalArrangement = Arrangement.spacedBy(12.dp), + ) { + val r = result + if (r != null) { + Card { + Text(trf("Your score: {0} of 30", r.score), fontSize = 22.sp, fontWeight = FontWeight.Bold, color = PulseColors.textPrimary) + EpdsGuidance(r.score, r.selfHarm) + } + Button(onClick = { onDone(r) }, modifier = Modifier.fillMaxWidth()) { Text(tr("Done")) } + return@Column + } + Text(form.instruction, fontSize = 14.sp, color = PulseColors.textSecondary) + form.items.forEachIndexed { i, item -> + Card { + Text("${i + 1}. ${item.text}", fontSize = 15.sp, fontWeight = FontWeight.SemiBold, color = PulseColors.textPrimary) + item.options.forEachIndexed { o, opt -> + val on = answers[i] == o + Text( + opt.text, fontSize = 14.sp, + color = if (on) PulseColors.onAccent else PulseColors.textPrimary, + modifier = Modifier.fillMaxWidth().clip(RoundedCornerShape(6.dp)) + .background(if (on) PulseColors.accent else PulseColors.cardSoft) + .clickable { answers[i] = o }.padding(horizontal = 12.dp, vertical = 10.dp), + ) + } + } + } + Button( + enabled = answers.all { it != null }, + onClick = { + val scores = form.items.mapIndexed { i, item -> item.options[answers[i]!!].score } + result = Postpartum.EpdsResult(LocalDate.now().toString(), scores.sum(), scores.last()) + }, + modifier = Modifier.fillMaxWidth(), + ) { Text(tr("See my score")) } + Text(if (portuguese) asset.citation_pt else asset.citation_en, fontSize = 11.sp, color = PulseColors.textMuted) + Spacer(Modifier.height(24.dp)) + } + } +} diff --git a/app/src/main/java/com/pulseloop/ui/screens/ReadinessUi.kt b/app/src/main/java/com/pulseloop/ui/screens/ReadinessUi.kt index 6669c44c..ded8a428 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/ReadinessUi.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/ReadinessUi.kt @@ -237,6 +237,12 @@ fun ReadinessScreen(db: PulseLoopDatabase, onBack: () -> Unit) { score?.let { Text(it.band.label, fontSize = 16.sp, fontWeight = FontWeight.SemiBold, color = bandColor(it.band)) } + if (com.pulseloop.service.Postpartum.active()) { + Text( + tr("Postpartum: your baseline is still settling after birth, so read the score against recent weeks, not against before."), + fontSize = 12.sp, color = PulseColors.textMuted, + ) + } if (result != null) { Text( ReadinessCopy.headline(result), fontSize = 15.sp, color = PulseColors.textSecondary, diff --git a/app/src/main/java/com/pulseloop/ui/screens/Screens.kt b/app/src/main/java/com/pulseloop/ui/screens/Screens.kt index b14b6a66..2b9e90c4 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/Screens.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/Screens.kt @@ -1204,10 +1204,10 @@ private fun zoneRangeText( private fun metricDisclaimer(metric: String, isDerived: Boolean): String? = when { metric == "stress" && isDerived -> tr("Estimated from HRV — your ring doesn't measure stress. Scored against your own recent " + - tr("HRV readings, so it says how this reading compares with your normal, not how you compare with anyone else.")) + "HRV readings, so it says how this reading compares with your normal, not how you compare with anyone else.") metric == "glucose" -> tr("Estimated wellness metric — not for dosing or diabetes decisions. No smart ring or watch is " + - tr("FDA-authorized to measure or estimate glucose on its own.")) + "FDA-authorized to measure or estimate glucose on its own.") metric == "bp" -> tr("Ring blood pressure is an estimate. Calibrate against a validated cuff in Settings → Calibration, " + "and talk to a clinician about persistent high or low readings.") @@ -1236,15 +1236,15 @@ private fun metricExplainer(metric: String): String = when (metric) { "hrv" -> tr("Heart-rate variability is the variation between beats. It's highly individual, so we track it " + "against your personal baseline rather than a universal cutoff.") "bp" -> tr("Blood pressure is systolic over diastolic (mmHg). The category is the worse of the two. " + - tr("A ring estimate is not a substitute for a cuff.")) + "A ring estimate is not a substitute for a cuff.") "stress" -> tr("A device wellness score from 0–100 based on heart-rate patterns. Lower is calmer. " + - tr("It's an estimate, not a medical stress measure.")) + "It's an estimate, not a medical stress measure.") "fatigue" -> tr("A device wellness score from 0–100 estimating tiredness. Higher means more fatigue. " + - tr("It's a ring estimate, not a clinical scale.")) + "It's a ring estimate, not a clinical scale.") "glucose" -> tr("An estimated glucose value. No smart ring is cleared to measure glucose, so treat this " + "as a wellness estimate only.") "temp" -> tr("Skin temperature from the ring runs cooler than core body temperature. " + - tr("Trends over time matter more than any single reading.")) + "Trends over time matter more than any single reading.") else -> "" } diff --git a/app/src/main/java/com/pulseloop/ui/screens/SettingsSubScreens.kt b/app/src/main/java/com/pulseloop/ui/screens/SettingsSubScreens.kt index d8315087..324e1765 100644 --- a/app/src/main/java/com/pulseloop/ui/screens/SettingsSubScreens.kt +++ b/app/src/main/java/com/pulseloop/ui/screens/SettingsSubScreens.kt @@ -507,7 +507,7 @@ fun CoachSettingsScreen(onBack: () -> Unit) { Text( urlProblem?.let { LocalEndpoint.message(it) } ?: tr("Default ports — Ollama 11434 · LM Studio 1234 · llama.cpp 8080 · vLLM 8000 · SGLang 30000. " + - tr("The /v1 path is added for you.")), + "The /v1 path is added for you."), style = MaterialTheme.typography.bodySmall, color = if (urlProblem != null) MaterialTheme.colorScheme.error else MaterialTheme.colorScheme.onSurfaceVariant, @@ -1171,7 +1171,7 @@ private fun GuidanceSwitch(title: String, subtitle: String, checked: Boolean, on * BP/glucose calibration moved to the capability-gated Calibration screen (iOS #49). */ @Composable -fun ProfileSettingsScreen(coordinator: RingSyncCoordinator?, onBack: () -> Unit) { +fun ProfileSettingsScreen(coordinator: RingSyncCoordinator?, onBack: () -> Unit, onOpenPostpartum: () -> Unit = {}) { val context = LocalContext.current val keyStore = remember { ApiKeyStore(context) } val db = remember { PulseLoopDatabase.getInstance(context) } @@ -1191,12 +1191,14 @@ fun ProfileSettingsScreen(coordinator: RingSyncCoordinator?, onBack: () -> Unit) SettingsSubScreen(title = tr("User Profile"), onBack = onBack) { Text( tr("Your age, sex, height and weight let the ring compute accurate calories (and, on " + - tr("56ff/Jring rings, blood sugar). Blood pressure is measured directly by the sensor.")), + "56ff/Jring rings, blood sugar). Blood pressure is measured directly by the sensor."), style = MaterialTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) // A smart scale's weight and body composition, read from Health Connect. HealthConnectBodyCard(onUpdated = { profileReload++ }) + // Postpartum / breastfeeding: only ever switched on here, by the user. + PostpartumProfileCard(onOpen = onOpenPostpartum) profileDraft?.let { draft -> // Shared editor (iOS #48) — same component as the onboarding Profile step, with @@ -1287,7 +1289,7 @@ fun PhysiologySettingsScreen(onBack: () -> Unit) { SettingsSubScreen(title = tr("Physiology"), onBack = onBack) { Text( tr("Optional refinements to how your vitals are interpreted. Leave anything unset and " + - tr("PulseLoop uses sensible defaults.")), + "PulseLoop uses sensible defaults."), style = MaterialTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) @@ -1476,7 +1478,7 @@ fun CalibrationSettingsScreen(coordinator: RingSyncCoordinator?, onBack: () -> U Text(tr("Blood sugar calibration"), style = MaterialTheme.typography.bodyMedium, fontWeight = FontWeight.SemiBold) Text( tr("Optional. The ring estimates glucose from your profile, not a real sensor. " + - tr("Enter a recent lab/meter reading (mg/dL) to offset the displayed value to match.")), + "Enter a recent lab/meter reading (mg/dL) to offset the displayed value to match."), style = MaterialTheme.typography.bodySmall, color = MaterialTheme.colorScheme.onSurfaceVariant, ) @@ -1891,7 +1893,7 @@ private fun QuietHoursCard() { tr("To log when Bedtime or Do Not Disturb turns on and off while PulseLoop is " + "in the background, Android requires Notification access. PulseLoop only " + "listens for Mode changes and does not read your notifications.\n\n" + - tr("If the switch is greyed out, open PulseLoop's App info, tap ⋮ → Allow restricted settings, then come back here.")), + "If the switch is greyed out, open PulseLoop's App info, tap ⋮ → Allow restricted settings, then come back here."), ) }, confirmButton = { @@ -2735,7 +2737,7 @@ fun PrivacyDataSettingsScreen( text = { Text( tr("Removes all demo measurements, activity, sleep, and the demo device. " + - tr("Synced ring data is not affected.")), + "Synced ring data is not affected."), ) }, confirmButton = { diff --git a/app/src/test/java/com/pulseloop/service/PostpartumTest.kt b/app/src/test/java/com/pulseloop/service/PostpartumTest.kt new file mode 100644 index 00000000..e8f9714a --- /dev/null +++ b/app/src/test/java/com/pulseloop/service/PostpartumTest.kt @@ -0,0 +1,90 @@ +package com.pulseloop.service + +import com.pulseloop.ring.SleepStage +import com.pulseloop.ring.SleepStage.AWAKE +import com.pulseloop.ring.SleepStage.DEEP +import com.pulseloop.ring.SleepStage.LIGHT +import org.junit.Assert.assertEquals +import org.junit.Assert.assertFalse +import org.junit.Assert.assertNull +import org.junit.Assert.assertTrue +import org.junit.Test +import java.time.LocalDate + +/** Postpartum mode's rules (docs/postpartum-breastfeeding-research.md). */ +class PostpartumTest { + + private val birth = LocalDate.of(2026, 6, 1) + private val h = 3_600_000L + + @Test + fun `cycle predictions pause while breastfeeding, and until a period after birth otherwise`() { + assertTrue(Postpartum.pausesCycle(true, birth, Postpartum.Feeding.EXCLUSIVE, listOf(birth.plusDays(90)))) + assertTrue(Postpartum.pausesCycle(true, birth, Postpartum.Feeding.NONE, emptyList())) + // Bleeding in the first 8 weeks isn't a period's return. + assertTrue(Postpartum.pausesCycle(true, birth, Postpartum.Feeding.NONE, listOf(birth.plusDays(20)))) + assertFalse(Postpartum.pausesCycle(true, birth, Postpartum.Feeding.NONE, listOf(birth.plusDays(70)))) + assertFalse(Postpartum.pausesCycle(false, birth, Postpartum.Feeding.EXCLUSIVE, emptyList())) + } + + @Test + fun `breastfeeding calories follow the guidelines, halved for mixed feeding`() { + assertEquals(330, Postpartum.calorieBonus(birth, birth.plusMonths(2), Postpartum.Feeding.EXCLUSIVE)) + assertEquals(400, Postpartum.calorieBonus(birth, birth.plusMonths(7), Postpartum.Feeding.EXCLUSIVE)) + assertEquals(165, Postpartum.calorieBonus(birth, birth.plusMonths(2), Postpartum.Feeding.MIXED)) + assertEquals(0, Postpartum.calorieBonus(birth, birth.plusMonths(13), Postpartum.Feeding.EXCLUSIVE)) + assertEquals(0, Postpartum.calorieBonus(birth, birth.plusMonths(2), Postpartum.Feeding.NONE)) + } + + @Test + fun `LAM holds only while all three conditions do`() { + val ok = Postpartum.lam(birth, birth.plusMonths(3), Postpartum.Feeding.EXCLUSIVE, emptyList()) + assertTrue(ok.allHold) + assertFalse(Postpartum.lam(birth, birth.plusMonths(7), Postpartum.Feeding.EXCLUSIVE, emptyList()).allHold) + assertFalse(Postpartum.lam(birth, birth.plusMonths(3), Postpartum.Feeding.MIXED, emptyList()).allHold) + assertFalse(Postpartum.lam(birth, birth.plusMonths(3), Postpartum.Feeding.EXCLUSIVE, listOf(birth.plusDays(70))).allHold) + } + + @Test + fun `alcohol clears two hours per standard drink, stacking drinks still clearing`() { + val now = 100 * h + // One standard drink (14 g) an hour ago: clear in another hour. + assertEquals(now + h, Postpartum.alcoholClearAt(listOf(now - h to 14.0), now)) + // Two drinks at the same time: four hours from then. + assertEquals(now + 3 * h, Postpartum.alcoholClearAt(listOf(now - h to 14.0, now - h to 14.0), now)) + // A second drink while the first is clearing starts after it. + assertEquals(now + 2 * h, Postpartum.alcoholClearAt(listOf(now - 2 * h to 14.0, now - h to 14.0), now)) + // Long done. + assertNull(Postpartum.alcoholClearAt(listOf(now - 5 * h to 14.0), now)) + } + + @Test + fun `a broken night counts wakings between sleep and its longest stretch`() { + val night = listOf(AWAKE, AWAKE) + List(90) { LIGHT } + listOf(AWAKE, AWAKE) + List(150) { DEEP } + listOf(AWAKE) + List(30) { LIGHT } + listOf(AWAKE) + val b = Postpartum.nightBreaks(night) + assertEquals(2, b.wakings) + assertEquals(150, b.longestSleepMin) + assertEquals(270, b.asleepMin) + assertEquals(0, Postpartum.nightBreaks(List(60) { LIGHT }).wakings) + } + + @Test + fun `EPDS bands follow the Brazilian cut-off`() { + assertEquals(Postpartum.EpdsBand.LOW, Postpartum.epdsBand(9)) + assertEquals(Postpartum.EpdsBand.POSSIBLE, Postpartum.epdsBand(10)) + assertEquals(Postpartum.EpdsBand.LIKELY, Postpartum.epdsBand(13)) + } + + @Test + fun `check-ins are suggested at two and six weeks, three and six months`() { + assertEquals(birth.plusWeeks(2), Postpartum.nextCheckIn(birth, birth.plusDays(10), emptyList())) + val answered = listOf(Postpartum.EpdsResult(birth.plusWeeks(2).toString(), 4, 0)) + assertEquals(birth.plusWeeks(6), Postpartum.nextCheckIn(birth, birth.plusWeeks(3), answered)) + } + + @Test + fun `weekly medians group readings by week since birth`() { + val v = listOf(birth.plusDays(1) to 60.0, birth.plusDays(3) to 64.0, birth.plusDays(8) to 58.0, birth.minusDays(3) to 70.0) + assertEquals(listOf(0 to 62.0, 1 to 58.0), Postpartum.weeklyMedians(v, birth)) + } +} diff --git a/app/src/test/java/com/pulseloop/ui/i18n/FuckingHealthCatalogTest.kt b/app/src/test/java/com/pulseloop/ui/i18n/FuckingHealthCatalogTest.kt index 59b69129..941921f2 100644 --- a/app/src/test/java/com/pulseloop/ui/i18n/FuckingHealthCatalogTest.kt +++ b/app/src/test/java/com/pulseloop/ui/i18n/FuckingHealthCatalogTest.kt @@ -15,11 +15,14 @@ import java.io.File */ class FuckingHealthCatalogTest { - private val catalog: Map = run { - val f = listOf("src/main/assets/i18n/en-FH.json", "app/src/main/assets/i18n/en-FH.json").map(::File).first { it.exists() } - Json.parseToJsonElement(f.readText()).jsonObject.mapValues { it.value.jsonPrimitive.content } + /** Both voices, English and Brazilian Portuguese, as (English key, voice line) pairs. */ + private val all: List> = listOf("en-FH.json", "pt-BR-FH.json").flatMap { name -> + val f = listOf("src/main/assets/i18n/$name", "app/src/main/assets/i18n/$name").map(::File).first { it.exists() } + Json.parseToJsonElement(f.readText()).jsonObject.map { (k, v) -> k to v.jsonPrimitive.content } } + private val catalog: Map = all.toMap() + @Test fun `safety, medical and crisis text keeps its plain wording`() { val serious = Regex( @@ -35,7 +38,7 @@ class FuckingHealthCatalogTest { fun `values, format specifiers and spacing survive the attitude`() { val ph = Regex("\\{\\d+\\}") val spec = Regex("%[0-9$,.]*[sdf]") - catalog.forEach { (en, fh) -> + all.forEach { (en, fh) -> assertEquals("placeholders: $en", ph.findAll(en).map { it.value }.sorted().toList(), ph.findAll(fh).map { it.value }.sorted().toList()) assertEquals("specifiers: $en", spec.findAll(en).map { it.value }.sorted().toList(), spec.findAll(fh).map { it.value }.sorted().toList()) assertEquals("leading space: $en", en.startsWith(" "), fh.startsWith(" ")) @@ -45,8 +48,11 @@ class FuckingHealthCatalogTest { @Test fun `the swearing is censored`() { - val raw = Regex("\\b(fuck\\w*|shit\\w*|asshole|bitch\\w*|cunt|dick)\\b", RegexOption.IGNORE_CASE) - val uncensored = catalog.values.filter { raw.containsMatchIn(it) } + val raw = Regex( + "\\b(fuck\\w*|shit\\w*|asshole|bitch\\w*|cunt|dick|porra|caralho|merda|foda\\w*|puta\\w*|buceta|cacete)\\b", + RegexOption.IGNORE_CASE, + ) + val uncensored = all.map { it.second }.filter { raw.containsMatchIn(it) } assertTrue("uncensored: ${uncensored.take(5)}", uncensored.isEmpty()) }