From 51bf980e897eecf368c280a1da217f1cb04fafeb Mon Sep 17 00:00:00 2001 From: Duarte Santos Date: Sat, 29 Aug 2026 20:52:43 +0200 Subject: [PATCH] Coach-Onboarding: Trainingsdauer als Stunden:Minuten-Raeder statt Uhrzeit, '1 Tag pro Woche', Platz unter der Einwilligung --- frontend/src/coach.css | 4 +++- frontend/src/lib/coach.js | 2 +- frontend/src/lib/pt-br-locale.test.js | 4 ++-- frontend/src/locales/de.js | 3 ++- frontend/src/locales/es.js | 3 ++- frontend/src/locales/fr.js | 3 ++- frontend/src/locales/hi.js | 3 ++- frontend/src/locales/it.js | 3 ++- frontend/src/locales/ko.js | 3 ++- frontend/src/locales/pl.js | 3 ++- frontend/src/locales/pt.js | 3 ++- frontend/src/locales/ru.js | 3 ++- frontend/src/locales/tr.js | 3 ++- frontend/src/locales/zh.js | 3 ++- frontend/src/views/CoachIntake.jsx | 15 ++++++++++++--- 15 files changed, 40 insertions(+), 18 deletions(-) diff --git a/frontend/src/coach.css b/frontend/src/coach.css index aaa5157..fe324f2 100644 --- a/frontend/src/coach.css +++ b/frontend/src/coach.css @@ -9,7 +9,7 @@ .ob-dot.on{background:var(--acc);width:18px} .ob-dot.done{background:var(--acc);opacity:.55} .ob-skip{background:none;color:var(--label-2);font-size:15px;padding:6px 2px} -.ob-body{flex:1} +.ob-body{flex:1;padding-bottom:150px} .ob-eyebrow{color:var(--acc);font-size:13px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;margin-bottom:8px} .ob-h{font-size:30px;line-height:1.12;font-weight:700;letter-spacing:-.026em;margin:0 0 8px} .ob-p{color:var(--label-2);font-size:16px;line-height:1.45;margin:0 0 24px;letter-spacing:-.006em} @@ -53,6 +53,8 @@ } :root[data-theme="light"] .ob-time input[type=time]{color-scheme:light} .ob-time input[type=time]::-webkit-calendar-picker-indicator{display:none} +.ob-time .ob-wheel{appearance:none;-webkit-appearance:none;background:transparent;border:0;color:var(--label);font-size:56px;font-weight:700;font-variant-numeric:tabular-nums;letter-spacing:-.02em;padding:0 4px;text-align:center;min-width:1.6em} +.ob-time .ob-time-sep{font-size:56px;font-weight:700;color:var(--label);margin:0 -2px;transform:translateY(-4px)} .ob-time .ob-time-l{font-size:15px;color:var(--label-2)} .ob-quick{display:flex;gap:7px;justify-content:center;flex-wrap:wrap;margin-top:12px} .ob-chips{display:flex;flex-wrap:wrap;gap:8px} diff --git a/frontend/src/lib/coach.js b/frontend/src/lib/coach.js index 73e9eb4..c23a1db 100644 --- a/frontend/src/lib/coach.js +++ b/frontend/src/lib/coach.js @@ -316,7 +316,7 @@ export function profileLines(p) { const lines = [] if (goal) lines.push(t(goal)) if (exp) lines.push(t(exp)) - if (p.daysPerWeek) lines.push(t('{0} days a week', p.daysPerWeek)) + if (p.daysPerWeek) lines.push(p.daysPerWeek === 1 ? t('1 day a week') : t('{0} days a week', p.daysPerWeek)) if (p.sessionMin) lines.push(t('{0} min per session', p.sessionMin)) if (p.equipment?.length) lines.push(p.equipment.join(', ')) if (p.limitations) lines.push(t('Limits: {0}', p.limitations)) diff --git a/frontend/src/lib/pt-br-locale.test.js b/frontend/src/lib/pt-br-locale.test.js index b19b451..8737580 100644 --- a/frontend/src/lib/pt-br-locale.test.js +++ b/frontend/src/lib/pt-br-locale.test.js @@ -28,10 +28,10 @@ describe('Brazilian Portuguese locale', () => { const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex') expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(422) - expect(inherited).toHaveLength(541) + expect(inherited).toHaveLength(542) // If this fails, review the changed keys and wording before accepting a new hash. From // frontend/: node scripts/pt-br-inheritance-fingerprint.mjs --list - expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('d4f338190ba41fe089ddb45049a812c36fbbda0887cc4f6ab073114c98a49e90') + expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('9e13b3bcfd80c38ae15ceb5518094b9f2243a7cd0011feb9cd68e818065b9909') }) test('does not leak European Portuguese UI terms', () => { diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js index 67029e0..ac4a9eb 100644 --- a/frontend/src/locales/de.js +++ b/frontend/src/locales/de.js @@ -920,5 +920,6 @@ export default { 'has a suggestion for you': 'hat einen Vorschlag für dich', 'here when you need it': 'da, wenn du ihn brauchst', 'thinking…': 'denkt nach…', - '{0} min per session': '{0} Min. pro Einheit' + '{0} min per session': '{0} Min. pro Einheit', + '1 day a week': '1 Tag pro Woche' } diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js index de2a2b5..5b68023 100644 --- a/frontend/src/locales/es.js +++ b/frontend/src/locales/es.js @@ -903,5 +903,6 @@ export default { 'has a suggestion for you': 'tiene una sugerencia para ti', 'here when you need it': 'aquí cuando lo necesites', 'thinking…': 'pensando…', - '{0} min per session': '{0} min por sesión' + '{0} min per session': '{0} min por sesión', + '1 day a week': '1 día a la semana' } diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js index 33dd6f5..3787c25 100644 --- a/frontend/src/locales/fr.js +++ b/frontend/src/locales/fr.js @@ -903,5 +903,6 @@ export default { 'has a suggestion for you': 'a une suggestion pour toi', 'here when you need it': 'là quand tu en as besoin', 'thinking…': 'réfléchit…', - '{0} min per session': '{0} min par séance' + '{0} min per session': '{0} min par séance', + '1 day a week': '1 jour par semaine' } diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js index 4f79d86..aecdc33 100644 --- a/frontend/src/locales/hi.js +++ b/frontend/src/locales/hi.js @@ -903,5 +903,6 @@ export default { 'has a suggestion for you': 'आपके लिए एक सुझाव है', 'here when you need it': 'जब ज़रूरत हो, यहाँ है', 'thinking…': 'सोच रहा है…', - '{0} min per session': 'प्रति सत्र {0} मिनट' + '{0} min per session': 'प्रति सत्र {0} मिनट', + '1 day a week': 'सप्ताह में 1 दिन' } diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js index 6c61e9c..d3541ae 100644 --- a/frontend/src/locales/it.js +++ b/frontend/src/locales/it.js @@ -903,5 +903,6 @@ export default { 'has a suggestion for you': 'ha un suggerimento per te', 'here when you need it': 'qui quando serve', 'thinking…': 'sta pensando…', - '{0} min per session': '{0} min a sessione' + '{0} min per session': '{0} min a sessione', + '1 day a week': '1 giorno a settimana' } diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js index 0be8275..e82b85f 100644 --- a/frontend/src/locales/ko.js +++ b/frontend/src/locales/ko.js @@ -903,5 +903,6 @@ export default { 'has a suggestion for you': '제안이 있습니다', 'here when you need it': '필요할 때 여기 있어요', 'thinking…': '생각 중…', - '{0} min per session': '세션당 {0}분' + '{0} min per session': '세션당 {0}분', + '1 day a week': '주 1일' } diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js index ce84345..2656c53 100644 --- a/frontend/src/locales/pl.js +++ b/frontend/src/locales/pl.js @@ -903,5 +903,6 @@ export default { 'has a suggestion for you': 'ma dla Ciebie propozycję', 'here when you need it': 'tu, gdy potrzebujesz', 'thinking…': 'myśli…', - '{0} min per session': '{0} min na sesję' + '{0} min per session': '{0} min na sesję', + '1 day a week': '1 dzień w tygodniu' } diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js index 0dd558b..b5856ff 100644 --- a/frontend/src/locales/pt.js +++ b/frontend/src/locales/pt.js @@ -903,5 +903,6 @@ export default { 'has a suggestion for you': 'tem uma sugestão para ti', 'here when you need it': 'aqui quando precisares', 'thinking…': 'a pensar…', - '{0} min per session': '{0} min por sessão' + '{0} min per session': '{0} min por sessão', + '1 day a week': '1 dia por semana' } diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js index 0fcc26c..085938c 100644 --- a/frontend/src/locales/ru.js +++ b/frontend/src/locales/ru.js @@ -903,5 +903,6 @@ export default { 'has a suggestion for you': 'есть предложение для вас', 'here when you need it': 'здесь, когда нужен', 'thinking…': 'думает…', - '{0} min per session': '{0} мин за тренировку' + '{0} min per session': '{0} мин за тренировку', + '1 day a week': '1 день в неделю' } diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js index fc8d3c7..9e0d09b 100644 --- a/frontend/src/locales/tr.js +++ b/frontend/src/locales/tr.js @@ -903,5 +903,6 @@ export default { 'has a suggestion for you': 'senin için bir önerisi var', 'here when you need it': 'ihtiyacın olduğunda burada', 'thinking…': 'düşünüyor…', - '{0} min per session': 'Seans başına {0} dk' + '{0} min per session': 'Seans başına {0} dk', + '1 day a week': 'Haftada 1 gün' } diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js index 3ce2dc7..1057f95 100644 --- a/frontend/src/locales/zh.js +++ b/frontend/src/locales/zh.js @@ -903,5 +903,6 @@ export default { 'has a suggestion for you': '有一个建议给你', 'here when you need it': '随时待命', 'thinking…': '思考中…', - '{0} min per session': '每次 {0} 分钟' + '{0} min per session': '每次 {0} 分钟', + '1 day a week': '每周 1 天' } diff --git a/frontend/src/views/CoachIntake.jsx b/frontend/src/views/CoachIntake.jsx index 46007fa..6e33ed7 100644 --- a/frontend/src/views/CoachIntake.jsx +++ b/frontend/src/views/CoachIntake.jsx @@ -158,9 +158,18 @@ export default function CoachIntake() {
{t('Session length')}

{t('How long is a session?')}

{t('The Coach fits the volume to the time you actually have, including rest between sets.')}

-
- { const m = fromHHMM(e.target.value); if (m != null) set({ sessionMin: m }) }} /> + {/* A duration, not a clock time — so two wheels (hours, minutes in fives), never the + native time input, which insists on AM/PM. */} +
+ + : + {t('h:mm')}