mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-08 20:42:43 +00:00
Merge the final display polish into release/v1.42.0
This commit is contained in:
1 parent
dcfec1f35d
commit
018841e6d6
5 files changed
+24
-7
No files matched your search
+2
-2
@@ -10360,9 +10360,9 @@
|
||||
"3": "Trouble falling or staying asleep, or sleeping too much",
|
||||
"4": "Feeling tired or having little energy",
|
||||
"5": "Poor appetite or overeating",
|
||||
"6": "Feeling bad about yourself, or that you are a failure or have let yourself or your family down",
|
||||
"6": "Feeling bad about yourself — or that you are a failure or have let yourself or your family down",
|
||||
"7": "Trouble concentrating on things, such as reading the newspaper or watching television",
|
||||
"8": "Moving or speaking so slowly that other people could have noticed. Or the opposite: being so fidgety or restless that you have been moving around a lot more than usual",
|
||||
"8": "Moving or speaking so slowly that other people could have noticed. Or the opposite — being so fidgety or restless that you have been moving around a lot more than usual",
|
||||
"9": "Thoughts that you would be better off dead, or of hurting yourself in some way"
|
||||
},
|
||||
"gad7": {
|
||||
|
||||
+1
-1
@@ -10360,7 +10360,7 @@
|
||||
"3": "Difficultés à s'endormir ou à rester endormi(e), ou dormir trop",
|
||||
"4": "Se sentir fatigué(e) ou avoir peu d'énergie",
|
||||
"5": "Avoir peu d'appétit ou manger trop",
|
||||
"6": "Avoir une mauvaise opinion de soi-même, ou avoir le sentiment d'être nul(le) ou d'avoir déçu sa famille ou soi-même",
|
||||
"6": "Avoir une mauvaise opinion de soi-même — ou avoir le sentiment d'être nul(le) ou d'avoir déçu sa famille ou soi-même",
|
||||
"7": "Avoir du mal à se concentrer, par exemple pour lire le journal ou regarder la télévision",
|
||||
"8": "Bouger ou parler si lentement que les autres ont pu le remarquer. Ou au contraire, être si agité(e) que vous avez bougé beaucoup plus que d'habitude",
|
||||
"9": "Penser qu'il vaudrait mieux mourir ou envisager de vous faire du mal d'une manière ou d'une autre"
|
||||
|
||||
+1
-1
@@ -10360,7 +10360,7 @@
|
||||
"3": "잠이 들거나 계속 잠을 자는 것이 어려움, 또는 잠을 너무 많이 잠",
|
||||
"4": "피곤하다고 느끼거나 기운이 거의 없음",
|
||||
"5": "입맛이 없거나 과식을 함",
|
||||
"6": "자신을 부정적으로 봄, 혹은 자신이 실패자라고 느끼거나 자신 또는 가족을 실망시킴",
|
||||
"6": "자신을 부정적으로 봄 — 혹은 자신이 실패자라고 느끼거나 자신 또는 가족을 실망시킴",
|
||||
"7": "신문을 읽거나 텔레비전 보는 것과 같은 일에 집중하는 것이 어려움",
|
||||
"8": "다른 사람들이 주목할 정도로 너무 느리게 움직이거나 말을 함. 또는 반대로 평상시보다 많이 움직여서, 너무 안절부절 못하거나 들떠 있음",
|
||||
"9": "자신이 죽는 것이 더 낫다고 생각하거나 어떤 식으로든 자신을 해칠 것이라고 생각함"
|
||||
|
||||
+2
-2
@@ -10360,9 +10360,9 @@
|
||||
"3": "Kłopoty z zaśnięciem lub utrzymaniem snu albo zbyt długi sen",
|
||||
"4": "Uczucie zmęczenia lub brak energii",
|
||||
"5": "Brak apetytu lub przejadanie się",
|
||||
"6": "Złe myślenie o sobie, poczucie, że jest się nieudacznikiem lub że zawiodło się siebie albo rodzinę",
|
||||
"6": "Złe myślenie o sobie — poczucie, że jest się nieudacznikiem lub że zawiodło się siebie albo rodzinę",
|
||||
"7": "Trudności ze skupieniem się, na przykład podczas czytania gazety lub oglądania telewizji",
|
||||
"8": "Poruszanie się lub mówienie tak wolno, że inni mogli to zauważyć? Albo przeciwnie: niepokój lub pobudzenie powodujące, że poruszasz się znacznie więcej niż zwykle",
|
||||
"8": "Poruszanie się lub mówienie tak wolno, że inni mogli to zauważyć? Albo przeciwnie — niepokój lub pobudzenie powodujące, że poruszasz się znacznie więcej niż zwykle",
|
||||
"9": "Myśli, że lepiej byłoby umrzeć albo chęć zrobienia sobie w jakiś sposób krzywdy"
|
||||
},
|
||||
"gad7": {
|
||||
|
||||
@@ -30,6 +30,20 @@ const hasSeparator = (value: string) =>
|
||||
/** Key path -> why the separator is right there. Empty by intent. */
|
||||
const ALLOWED: Record<string, string> = {};
|
||||
|
||||
/**
|
||||
* Subtrees whose wording is not ours to change. The questionnaire items are
|
||||
* the licensed, validated text of PHQ-9, GAD-7 and the other instruments in
|
||||
* each language; a dash there is part of the instrument (PHQ-9 item 6 reads
|
||||
* "Feeling bad about yourself — or that you are a failure ..."), and
|
||||
* rewording it would change what the score measures.
|
||||
*/
|
||||
const EXEMPT_PREFIXES: Record<string, string> = {
|
||||
"mentalHealth.items.": "validated questionnaire wording, verbatim",
|
||||
};
|
||||
|
||||
const isExempt = (key: string) =>
|
||||
Object.keys(EXEMPT_PREFIXES).some((prefix) => key.startsWith(prefix));
|
||||
|
||||
function flatten(
|
||||
obj: unknown,
|
||||
prefix: string,
|
||||
@@ -66,7 +80,10 @@ describe("message bundles carry no ' · ', ' — ' or ' – ' separator", () =>
|
||||
|
||||
it(`${file} has no dot or dash separator outside the allowlist`, () => {
|
||||
const offenders = [...values]
|
||||
.filter(([key, value]) => hasSeparator(value) && !(key in ALLOWED))
|
||||
.filter(
|
||||
([key, value]) =>
|
||||
hasSeparator(value) && !(key in ALLOWED) && !isExempt(key),
|
||||
)
|
||||
.map(([key, value]) => `${key} = ${JSON.stringify(value)}`);
|
||||
expect(offenders).toEqual([]);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user