mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
fix(i18n): address the ru review — units, Cyrillic regexes, locale registry
Dose bank
- DRUG_UNIT learns мг / мкг / мл / ЕД / МЕ, so "2,4 мг" anchors a dose again.
- The bank matches verb-first Russian word order too ("принимайте 2 таблетки",
"пропустите дозу метформина", "начните с 5 мг"), and the Cyrillic drug names
people actually see on the box; the deferral words ("спросите врача",
"как назначено") stand those shapes down.
Cyrillic-safe regexes
- \w and \b are ASCII in JavaScript: every stem in the ru bank and in
population-norms/ru.ts is [а-яё]*, and the word edges are lookarounds
(?<![а-яёa-z]), so «высокий риск» and «нормальный диапазон» match again.
- coach-prose-grounding: Russian month names in the genitive, a space as the
thousands separator in parseLocaleNumber and numFrag, and Cyrillic-safe
edges around the written-date pattern.
Registered everywhere a locale has to be
- targetLanguageName() returns "Russian", so the coach, the period narrative
and the document descriptions stop saying "write in English".
- i18n-key-tool.mjs, split-description.mjs, LOINC name normalisation (it
stripped Cyrillic, so no Russian lab name resolved), HOST_TLDS (ru/by/kz/ua),
no-key-fallbacks (32 tables), country-label, the AUDIT-C standard drink.
- docs/api/openapi.yaml regenerated.
Questionnaires
- The PHQ-9 / GAD-7 source comments no longer claim no validated Russian
version exists (Zolotareva 2023; Pfizer's official screeners).
- WHO-5 items are gender-neutral: «чувствовал(а)».
- "body fat" and "fat mass" both read «Жировая масса»; body fat is now
«Процент жировой массы», which is what the two metrics measure.
Tests
- ru in the 13 locale tables, plus mood, onboarding, instruments, clinician
view, status summary, describe screen, citation coverage and LOINC.
- i18n-no-dot-separator: the ru bundle is exempt from the dash rule (a spaced
dash is Russian punctuation, not a fragment join); the middle dot still
fails there.
- Two 800-line baselines raised by the 12 and 5 lines this change adds.
pnpm typecheck, pnpm openapi:check and the full suite (36 316 tests) pass.
This commit is contained in:
1 parent
6b9d222643
commit
48bfbad4e6
44 files changed
+431
-70
No files matched your search
@@ -13235,6 +13235,7 @@ paths:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
description: Optional UI-locale override, any language the app ships; defaults to the session locale.
|
||||
responses:
|
||||
"200":
|
||||
@@ -13274,6 +13275,7 @@ paths:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
description: Optional UI-locale override, any language the app ships; defaults to the session locale.
|
||||
responses:
|
||||
"200":
|
||||
@@ -13313,6 +13315,7 @@ paths:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
description: Optional UI-locale override, any language the app ships; defaults to the session locale.
|
||||
responses:
|
||||
"200":
|
||||
@@ -13352,6 +13355,7 @@ paths:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
description: Optional UI-locale override, any language the app ships; defaults to the session locale.
|
||||
responses:
|
||||
"200":
|
||||
@@ -13391,6 +13395,7 @@ paths:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
description: Optional UI-locale override, any language the app ships; defaults to the session locale.
|
||||
responses:
|
||||
"200":
|
||||
@@ -13431,6 +13436,7 @@ paths:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
description: Optional UI-locale override, any language the app ships; defaults to the session locale.
|
||||
responses:
|
||||
"200":
|
||||
@@ -13533,6 +13539,7 @@ paths:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
description: Optional UI-locale override, any language the app ships; defaults to the session locale.
|
||||
responses:
|
||||
"200":
|
||||
@@ -13585,6 +13592,7 @@ paths:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
description: Optional UI-locale override, any language the app ships; defaults to the session locale.
|
||||
responses:
|
||||
"200":
|
||||
@@ -27962,6 +27970,7 @@ components:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
practiceName:
|
||||
type: string
|
||||
maxLength: 120
|
||||
@@ -28676,6 +28685,7 @@ components:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
- type: "null"
|
||||
timezone:
|
||||
type: string
|
||||
@@ -30499,6 +30509,7 @@ components:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
today:
|
||||
description: "Optional override of the reference date used to resolve relative phrases (\"tomorrow\", \"next Monday\").
|
||||
Format: `YYYY-MM-DD`. Defaults to the account's own day in its time zone."
|
||||
@@ -31468,6 +31479,7 @@ components:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
description: One of the interface locales this build ships.
|
||||
required:
|
||||
- locale
|
||||
@@ -31510,6 +31522,7 @@ components:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
scope:
|
||||
type: object
|
||||
properties:
|
||||
@@ -31681,6 +31694,7 @@ components:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
attachmentIds:
|
||||
minItems: 1
|
||||
maxItems: 5
|
||||
@@ -35679,6 +35693,7 @@ components:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
required:
|
||||
- message
|
||||
InboundFactEditRequest:
|
||||
@@ -37178,6 +37193,7 @@ components:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
timezone:
|
||||
type: string
|
||||
minLength: 1
|
||||
@@ -37234,6 +37250,7 @@ components:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
timezone:
|
||||
type: string
|
||||
minLength: 1
|
||||
@@ -37454,6 +37471,7 @@ components:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
- type: "null"
|
||||
timezone:
|
||||
type: string
|
||||
@@ -60477,6 +60495,7 @@ components:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
required:
|
||||
- locale
|
||||
additionalProperties: false
|
||||
@@ -89017,6 +89036,7 @@ components:
|
||||
- ko
|
||||
- nl
|
||||
- pt-BR
|
||||
- ru
|
||||
- type: "null"
|
||||
timezone:
|
||||
type: string
|
||||
|
||||
Reference in new issue
Block a user