mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-16 23:33:29 +00:00
feat(i18n): register Brazilian Portuguese as a locale
Add pt-BR to the locale list and everything that hangs off it: the client loader, Intl and date-fns mapping, the reply-language footers of the Coach and insights prompts (English body, pt-BR footer, the same path Korean and Dutch take), the citation-coverage normative words, the no-key fallback copy, the AUDIT-C standard-drink line, country labels, period search, CSV yes/no cells and the Telegram bare-word aliases. The locale enums in the extract, managed-profile and record-settings schemas now derive from the locale list instead of repeating it, and the five notification and login-alert routes share one isLocale guard instead of hand-rolled chains, so a later locale is one edit there. A language tag is matched exactly and case-insensitively before its primary subtag, so pt-BR and pt-PT browsers land on the Portuguese bundle rather than English, and AUDIT-C no longer cuts a region tag to two letters. PHQ-9, GAD-7 and WHO-5 are not marked validated for pt-BR: the wording has not been read against the published Brazilian forms, so readers get the English items plus the existing note.
This commit is contained in:
1 parent
1619b2406a
commit
764794496c
72 files changed
+425
-159
No files matched your search
@@ -103,6 +103,7 @@ const VERDICT_STEADY: Localized<string> = {
|
||||
it: "Stabile, come al solito",
|
||||
pl: "Stabilnie, tak jak zwykle",
|
||||
nl: "Stabiel en zoals gewoonlijk",
|
||||
"pt-BR": "Estável e como de costume",
|
||||
};
|
||||
|
||||
const VERDICT_FAVOURABLE: Localized<string> = {
|
||||
@@ -113,6 +114,7 @@ const VERDICT_FAVOURABLE: Localized<string> = {
|
||||
it: "Sta andando nella direzione giusta",
|
||||
pl: "To zmierza w dobrym kierunku",
|
||||
nl: "Dit gaat de goede kant op",
|
||||
"pt-BR": "Isso está indo numa boa direção",
|
||||
};
|
||||
|
||||
const VERDICT_OFF_USUAL: Localized<string> = {
|
||||
@@ -123,6 +125,7 @@ const VERDICT_OFF_USUAL: Localized<string> = {
|
||||
it: "Ultimamente un po’ fuori dal tuo intervallo abituale",
|
||||
pl: "Ostatnio nieco poza twoim zwykłym zakresem",
|
||||
nl: "De laatste tijd iets buiten je gebruikelijke bereik",
|
||||
"pt-BR": "Ultimamente um pouco fora do seu padrão habitual",
|
||||
};
|
||||
|
||||
function verdictLead(
|
||||
@@ -196,6 +199,8 @@ const VALUE_VS_BASELINE: Localized<
|
||||
`${l} wynosi obecnie ${c} — ${higher ? "powyżej" : "poniżej"} twojej zwykłej średniej ${b}.`,
|
||||
nl: (l, c, b, higher) =>
|
||||
`${l} staat nu op ${c}, ${higher ? "hoger" : "lager"} dan je gebruikelijke gemiddelde van ${b}.`,
|
||||
"pt-BR": (l, c, b, higher) =>
|
||||
`${l} está em ${c} agora, ${higher ? "acima" : "abaixo"} da sua média habitual de ${b}.`,
|
||||
};
|
||||
|
||||
const VALUE_AT_BASELINE: Localized<(label: string, current: string) => string> =
|
||||
@@ -210,6 +215,7 @@ const VALUE_AT_BASELINE: Localized<(label: string, current: string) => string> =
|
||||
`${l} wynosi obecnie ${c}, czyli mniej więcej tyle co twoja zwykła średnia.`,
|
||||
nl: (l, c) =>
|
||||
`${l} staat op ${c}, ongeveer op je gebruikelijke gemiddelde.`,
|
||||
"pt-BR": (l, c) => `${l} está em ${c}, bem perto da sua média habitual.`,
|
||||
};
|
||||
|
||||
const VALUE_ALONE: Localized<(label: string, current: string) => string> = {
|
||||
@@ -220,6 +226,7 @@ const VALUE_ALONE: Localized<(label: string, current: string) => string> = {
|
||||
it: (l, c) => `${l} è a ${c} in questo momento.`,
|
||||
pl: (l, c) => `${l} wynosi obecnie ${c}.`,
|
||||
nl: (l, c) => `${l} staat nu op ${c}.`,
|
||||
"pt-BR": (l, c) => `${l} está em ${c} agora.`,
|
||||
};
|
||||
|
||||
const CLOSER_IN_RANGE: Localized<string> = {
|
||||
@@ -230,6 +237,8 @@ const CLOSER_IN_RANGE: Localized<string> = {
|
||||
it: "Rientra nel tuo intervallo abituale — niente su cui intervenire adesso.",
|
||||
pl: "Mieści się to w twoim zwykłym zakresie — nic, na co trzeba teraz reagować.",
|
||||
nl: "Dat valt binnen je gebruikelijke bereik, dus niets waar je nu iets mee hoeft te doen.",
|
||||
"pt-BR":
|
||||
"Isso está dentro da sua faixa habitual, nada que peça uma ação agora.",
|
||||
};
|
||||
|
||||
const CLOSER_UNKNOWN_SWING: Localized<string> = {
|
||||
@@ -240,6 +249,8 @@ const CLOSER_UNKNOWN_SWING: Localized<string> = {
|
||||
it: "Qualche misurazione in più renderà la tendenza affidabile — tienila d’occhio nei prossimi giorni.",
|
||||
pl: "Kilka kolejnych pomiarów sprawi, że tendencja stanie się wiarygodna — obserwuj ją przez najbliższe dni.",
|
||||
nl: "Met nog een paar metingen wordt de trend betrouwbaar. Houd hem de komende dagen in de gaten.",
|
||||
"pt-BR":
|
||||
"Mais algumas medições vão tornar a tendência confiável. Acompanhe nos próximos dias.",
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -314,6 +325,7 @@ const BLOOD_PRESSURE_COPY: FallbackCopy = {
|
||||
it: "la tua pressione sanguigna",
|
||||
pl: "twoje ciśnienie krwi",
|
||||
nl: "je bloeddruk",
|
||||
"pt-BR": "sua pressão arterial",
|
||||
},
|
||||
unit: "",
|
||||
digits: 0,
|
||||
@@ -325,6 +337,8 @@ const BLOOD_PRESSURE_COPY: FallbackCopy = {
|
||||
it: "Qualche misurazione a riposo nelle stesse condizioni mostrerà se è la tendenza o un valore isolato.",
|
||||
pl: "Kilka spokojnych pomiarów w tych samych warunkach pokaże, czy to tendencja, czy pojedynczy wyskok.",
|
||||
nl: "Een paar rustige metingen onder dezelfde omstandigheden laten zien of dit de trend is of een losse uitschieter.",
|
||||
"pt-BR":
|
||||
"Algumas medições tranquilas nas mesmas condições vão mostrar se isso é a tendência ou um valor isolado.",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -337,6 +351,7 @@ const WEIGHT_COPY: FallbackCopy = {
|
||||
it: "il tuo peso",
|
||||
pl: "twoja waga",
|
||||
nl: "je gewicht",
|
||||
"pt-BR": "seu peso",
|
||||
},
|
||||
unit: "",
|
||||
digits: 1,
|
||||
@@ -348,6 +363,8 @@ const WEIGHT_COPY: FallbackCopy = {
|
||||
it: "Pesati alla stessa ora per qualche giorno e la normale oscillazione quotidiana si compensa da sé.",
|
||||
pl: "Waż się przez kilka dni o tej samej porze, a normalne dobowe wahania same się wyrównają.",
|
||||
nl: "Weeg je een paar dagen op hetzelfde tijdstip, dan middelt de normale schommeling van dag tot dag zich vanzelf uit.",
|
||||
"pt-BR":
|
||||
"Pese-se no mesmo horário por alguns dias, e a oscilação normal do dia a dia se acerta sozinha.",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -360,6 +377,7 @@ const PULSE_COPY: FallbackCopy = {
|
||||
it: "il tuo battito a riposo",
|
||||
pl: "twoje tętno spoczynkowe",
|
||||
nl: "je rusthartslag",
|
||||
"pt-BR": "seu pulso em repouso",
|
||||
},
|
||||
unit: " bpm",
|
||||
digits: 0,
|
||||
@@ -371,6 +389,8 @@ const PULSE_COPY: FallbackCopy = {
|
||||
it: "Misuralo da rilassato e alla stessa ora del giorno per vedere se la direzione tiene.",
|
||||
pl: "Mierz je na spokojnie i o tej samej porze dnia, żeby zobaczyć, czy kierunek się utrzyma.",
|
||||
nl: "Meet hem ontspannen en op hetzelfde moment van de dag, dan zie je of de richting aanhoudt.",
|
||||
"pt-BR":
|
||||
"Meça com calma e no mesmo horário do dia para ver se a direção se mantém.",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -383,6 +403,7 @@ const BMI_COPY: FallbackCopy = {
|
||||
it: "il tuo IMC",
|
||||
pl: "twoje BMI",
|
||||
nl: "je BMI",
|
||||
"pt-BR": "seu IMC",
|
||||
},
|
||||
unit: "",
|
||||
digits: 1,
|
||||
@@ -394,6 +415,8 @@ const BMI_COPY: FallbackCopy = {
|
||||
it: "Leggilo insieme all’andamento del tuo peso e alla massa grassa nell’arco di qualche settimana, non giorno per giorno.",
|
||||
pl: "Czytaj je razem z tendencją wagi i poziomem tkanki tłuszczowej w skali kilku tygodni, a nie dzień po dniu.",
|
||||
nl: "Bekijk hem samen met je gewichtstrend en vetpercentage over een paar weken, niet dag voor dag.",
|
||||
"pt-BR":
|
||||
"Leia junto com a tendência do seu peso e o percentual de gordura ao longo de algumas semanas, não dia a dia.",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -406,6 +429,7 @@ const MOOD_COPY: FallbackCopy = {
|
||||
it: "il tuo umore",
|
||||
pl: "twój nastrój",
|
||||
nl: "je stemming",
|
||||
"pt-BR": "seu humor",
|
||||
},
|
||||
unit: "",
|
||||
digits: 1,
|
||||
@@ -417,6 +441,8 @@ const MOOD_COPY: FallbackCopy = {
|
||||
it: "Registralo per qualche giorno — uno schema che si ripete dice più di un singolo giorno.",
|
||||
pl: "Zapisuj go przez kilka dni — powtarzający się wzorzec mówi więcej niż pojedynczy dzień.",
|
||||
nl: "Houd hem een paar dagen bij. Een terugkerend patroon zegt meer dan één losse dag.",
|
||||
"pt-BR":
|
||||
"Registre por alguns dias. Um padrão que se repete diz mais do que um dia isolado.",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -429,6 +455,7 @@ const ADHERENCE_COPY: FallbackCopy = {
|
||||
it: "la tua aderenza alla terapia",
|
||||
pl: "twoja regularność przyjmowania leków",
|
||||
nl: "je medicijntrouw",
|
||||
"pt-BR": "sua adesão à medicação",
|
||||
},
|
||||
unit: "%",
|
||||
digits: 0,
|
||||
@@ -440,6 +467,8 @@ const ADHERENCE_COPY: FallbackCopy = {
|
||||
it: "Un orario fisso o un promemoria breve è ciò che intercetta meglio le dimenticanze ripetute.",
|
||||
pl: "Stała pora albo krótkie przypomnienie najlepiej wyłapuje powtarzające się pominięcia.",
|
||||
nl: "Een vast tijdstip of een korte herinnering vangt herhaalde vergeten innames het best op.",
|
||||
"pt-BR":
|
||||
"Um horário fixo ou um lembrete rápido é a forma mais confiável de evitar as tomadas esquecidas que se repetem.",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -452,6 +481,8 @@ const GENERIC_METRIC_POINTER: Localized<string> = {
|
||||
it: "Qualche misurazione costante mostrerà se è la direzione o un singolo giorno.",
|
||||
pl: "Kilka konsekwentnych pomiarów pokaże, czy to kierunek, czy pojedynczy dzień.",
|
||||
nl: "Een paar consistente metingen laten zien of dit de richting is of één enkele dag.",
|
||||
"pt-BR":
|
||||
"Algumas medições consistentes vão mostrar se essa é a direção ou só um dia isolado.",
|
||||
};
|
||||
|
||||
// ── public fallbacks ────────────────────────────────────────────────────────
|
||||
@@ -513,6 +544,7 @@ const NO_READ_LEAD: Localized<string> = {
|
||||
pl: "Na razie nie ma tu żadnej oceny.",
|
||||
nl: "Voor deze kaart is er nu geen beoordeling.",
|
||||
ko: "지금은 이 카드에 대한 평가가 없어요.",
|
||||
"pt-BR": "Não há avaliação disponível para este cartão no momento.",
|
||||
};
|
||||
|
||||
function noReadLead(locale: InsightLocale): string {
|
||||
@@ -534,6 +566,8 @@ export function getNoKeyGeneralStatusText(locale: InsightLocale): string {
|
||||
it: "Questi numeri diventano leggibili nell’arco di più settimane anziché di singoli giorni, e rilevati a orari costanti per restare confrontabili. Il segnale che conta è più indicatori che scivolano insieme nella stessa direzione sfavorevole, non un valore in un giorno.",
|
||||
pl: "Te liczby stają się czytelne w skali kilku tygodni, a nie pojedynczych dni, i tylko wtedy, gdy są zbierane o stałych porach, żeby pozostały porównywalne. Sygnałem, który się liczy, jest kilka wskaźników dryfujących jednocześnie w tę samą niekorzystną stronę, a nie jedna wartość jednego dnia.",
|
||||
nl: "Deze cijfers worden leesbaar over meerdere weken, niet over losse dagen, en gemeten op vaste momenten zodat ze vergelijkbaar blijven. Het signaal dat telt is dat meerdere waarden tegelijk dezelfde ongunstige kant op schuiven, niet één waarde op één dag.",
|
||||
"pt-BR":
|
||||
"Estes números ficam legíveis ao longo de várias semanas, não em dias isolados, e medidos em horários consistentes para continuarem comparáveis. O sinal que conta são várias métricas se movendo ao mesmo tempo na mesma direção desfavorável, não um valor em um único dia.",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -557,6 +591,7 @@ const BIOMARKER_NAMED_LEAD: Localized<(named: string) => string> = {
|
||||
pl: (n) => `Na razie nie ma żadnej oceny${n}.`,
|
||||
nl: (n) => `Er is nu geen beoordeling${n}.`,
|
||||
ko: (n) => `지금은${n} 평가가 없어요.`,
|
||||
"pt-BR": (n) => `Não há avaliação${n} no momento.`,
|
||||
};
|
||||
|
||||
const BIOMARKER_NAMED_CLAUSE: Localized<(marker: string) => string> = {
|
||||
@@ -568,6 +603,7 @@ const BIOMARKER_NAMED_CLAUSE: Localized<(marker: string) => string> = {
|
||||
pl: (m) => ` dla „${m}”`,
|
||||
nl: (m) => ` voor "${m}"`,
|
||||
ko: (m) => ` '${m}'에 대한`,
|
||||
"pt-BR": (m) => ` para "${m}"`,
|
||||
};
|
||||
|
||||
export function getNoKeyBiomarkerStatusText(
|
||||
@@ -586,6 +622,8 @@ export function getNoKeyBiomarkerStatusText(
|
||||
it: "Un valore di laboratorio si legge prima di tutto rispetto ai tuoi prelievi precedenti — un intervallo di riferimento è un ancoraggio grossolano, non un verdetto. Uno che si è mosso appena nell’arco di più prelievi racconta una storia diversa da uno che ha appena fatto un salto. Il tuo prossimo controllo medico è il posto giusto per contestualizzarlo.",
|
||||
pl: "Wynik laboratoryjny czyta się najpierw na tle twoich wcześniejszych oznaczeń — zakres referencyjny to zgrubna kotwica, a nie wyrok. Wynik, który przez kilka oznaczeń niemal się nie ruszył, mówi co innego niż taki, który właśnie podskoczył. Najbliższa kontrola lekarska to właściwe miejsce, żeby go osadzić w kontekście.",
|
||||
nl: "Een labwaarde lees je eerst tegen je eigen eerdere metingen. Een referentiebereik is een ruw ankerpunt, geen oordeel. Een waarde die over meerdere metingen nauwelijks beweegt, vertelt iets anders dan een waarde die net een sprong heeft gemaakt. Je volgende controle bij de arts is de juiste plek om hem in context te plaatsen.",
|
||||
"pt-BR":
|
||||
"Um valor de exame se lê primeiro em relação às suas coletas anteriores. Uma faixa de referência é um ponto de apoio aproximado, não um veredito. Um valor que mal se moveu ao longo de várias coletas conta uma história diferente de um que acabou de dar um salto. Sua próxima consulta é o lugar certo para colocá-lo em contexto.",
|
||||
})}`;
|
||||
}
|
||||
|
||||
@@ -603,6 +641,8 @@ export function getNoKeyBloodPressureStatusText(
|
||||
it: "La pressione si legge su una serie di misurazioni a riposo in condizioni confrontabili — la direzione nell’arco di più giorni dice molto più di un singolo valore isolato, e sistolica e diastolica si leggono insieme anziché una alla volta.",
|
||||
pl: "Ciśnienie staje się czytelne dopiero w serii spokojnych pomiarów w porównywalnych warunkach — kierunek z kilku dni mówi znacznie więcej niż pojedynczy wyskok, a wartość skurczowa i rozkurczowa czyta się razem, a nie osobno.",
|
||||
nl: "Bloeddruk wordt leesbaar over een reeks rustige metingen onder vergelijkbare omstandigheden. De richting over meerdere dagen zegt veel meer dan één uitschieter, en de boven- en onderdruk lees je samen in plaats van los van elkaar.",
|
||||
"pt-BR":
|
||||
"A pressão arterial fica legível ao longo de uma série de medições tranquilas em condições parecidas. A direção ao longo de vários dias diz muito mais do que um valor fora da curva, e a sistólica e a diastólica são lidas juntas, não separadamente.",
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -621,6 +661,8 @@ export function getNoKeyWeightStatusText(
|
||||
it: "Il peso si legge come andamento e non come numero del giorno — pesato in condizioni costanti, la normale oscillazione quotidiana si compensa da sé. Quello che regge è la direzione nell’arco di settimane, letta insieme alla pressione e all’IMC.",
|
||||
pl: "Wagę czyta się jako przebieg, a nie jako liczbę z jednego dnia — przy ważeniu w stałych warunkach normalne dobowe wahania same się wyrównają. Nośny jest kierunek z kilku tygodni, czytany razem z ciśnieniem i BMI.",
|
||||
nl: "Gewicht lees je als trend, niet als getal van de dag. Weeg je onder vaste omstandigheden, dan middelt de normale schommeling van dag tot dag zich vanzelf uit. Wat telt is de richting over weken, samen gelezen met bloeddruk en BMI.",
|
||||
"pt-BR":
|
||||
"O peso se lê como tendência, não como número do dia. Pesando-se em condições consistentes, a oscilação normal do dia a dia se acerta sozinha. O que conta é a direção ao longo das semanas, lida junto com a pressão arterial e o IMC.",
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -639,6 +681,8 @@ export function getNoKeyPulseStatusText(
|
||||
it: "Il battito a riposo si legge meglio se misurato da rilassato e alla stessa ora del giorno. I picchi brevi sono ordinari; quello che spicca è uno schema che tiene per più giorni, o uno scostamento ripetuto dal tuo intervallo abituale.",
|
||||
pl: "Tętno spoczynkowe najlepiej czytać zmierzone na spokojnie i o tej samej porze dnia. Krótkie skoki są czymś zwyczajnym; uwagę zwraca wzorzec utrzymujący się przez kilka dni albo powtarzające się oddalanie od twojego zwykłego zakresu.",
|
||||
nl: "De rusthartslag lees je het best als je hem ontspannen en op hetzelfde moment van de dag meet. Korte pieken zijn gewoon; wat opvalt is een patroon dat meerdere dagen aanhoudt, of steeds weer afwijken van je gebruikelijke bereik.",
|
||||
"pt-BR":
|
||||
"O pulso em repouso se lê melhor quando medido com calma e no mesmo horário do dia. Picos curtos são normais; o que chama atenção é um padrão que se mantém por vários dias, ou um afastamento repetido da sua faixa habitual.",
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -657,6 +701,8 @@ export function getNoKeyBmiStatusText(
|
||||
it: "L’IMC è un orientamento grossolano più che un verdetto, e assume senso letto insieme all’andamento del tuo peso e alla composizione corporea. Un movimento sostenuto nell’arco di settimane regge dove un valore singolo non regge.",
|
||||
pl: "BMI to zgrubna orientacja, a nie wyrok, i nabiera sensu dopiero czytane razem z tendencją wagi i składem ciała. Utrzymujący się ruch w skali tygodni jest nośny tam, gdzie pojedyncza wartość nie jest.",
|
||||
nl: "BMI is een ruwe oriëntatie, geen oordeel, en zegt het meest samen met je gewichtstrend en lichaamssamenstelling. Een aanhoudende beweging over weken zegt iets waar één losse waarde dat niet doet.",
|
||||
"pt-BR":
|
||||
"O IMC é uma orientação aproximada, não um veredito, e diz mais quando lido junto com a tendência do seu peso e a sua composição corporal. Um movimento sustentado ao longo de semanas diz algo que um valor isolado não diz.",
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -675,6 +721,8 @@ export function getNoKeyMedicationComplianceStatusText(
|
||||
it: "L’aderenza si legge come costanza nell’arco di settimane più che come una serie di giornate perfette — per singolo farmaco e nel quadro complessivo. Le dimenticanze ripetute alla stessa ora sono lo schema che conta, ed è una routine fissa a intercettarle di solito.",
|
||||
pl: "Regularność przyjmowania leków czyta się jako stałość w skali tygodni, a nie jako serię idealnych dni — osobno dla każdego leku i w całym obrazie. Powtarzające się pominięcia o tej samej porze to wzorzec, który się liczy, a wyłapuje je zwykle stały rytm dnia.",
|
||||
nl: "Medicijntrouw lees je als regelmaat over weken, niet als een reeks perfecte dagen, per medicijn en in het geheel. Herhaald vergeten op hetzelfde moment van de dag is het patroon dat telt, en een vaste routine vangt dat meestal op.",
|
||||
"pt-BR":
|
||||
"A adesão se lê como regularidade ao longo de semanas, não como uma sequência de dias perfeitos, por medicamento e no conjunto. Esquecimentos repetidos no mesmo horário do dia são o padrão que conta, e uma rotina fixa costuma resolvê-los.",
|
||||
})
|
||||
);
|
||||
}
|
||||
@@ -693,6 +741,8 @@ export function getNoKeyMoodStatusText(
|
||||
it: "L’umore si legge nell’arco di settimane più che nei singoli giorni — quello che regge sono gli schemi ricorrenti e come si allineano con gli altri tuoi valori. È una fase bassa che si protrae quella che merita attenzione.",
|
||||
pl: "Nastrój czyta się w skali tygodni, a nie pojedynczych dni — nośne są powtarzające się wzorce i to, jak układają się względem twoich pozostałych wartości. Uwagi wymaga przede wszystkim dłużej utrzymujący się spadek.",
|
||||
nl: "Stemming lees je over weken, niet over losse dagen. Wat telt zijn terugkerende patronen en hoe die samenhangen met je andere waarden. Een aanhoudende periode van lage stemming is wat aandacht verdient.",
|
||||
"pt-BR":
|
||||
"O humor se lê ao longo de semanas, não em dias isolados. O que conta são os padrões que se repetem e como eles se relacionam com as suas outras métricas. Um período prolongado de humor baixo é o que merece atenção.",
|
||||
})
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user