Coach-Onboarding: Trainingsdauer als Stunden:Minuten-Raeder statt Uhrzeit, '1 Tag pro Woche', Platz unter der Einwilligung

This commit is contained in:
Duarte Santos committed 2026-08-29 20:52:43 +02:00
1 parent 18dd33e9d3
commit 51bf980e89
15 files changed
+40 -18

No files matched your search

+3 -1
View File
@@ -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}
+1 -1
View File
@@ -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))
+2 -2
View File
@@ -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', () => {
+2 -1
View File
@@ -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'
}
+2 -1
View File
@@ -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'
}
+2 -1
View File
@@ -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'
}
+2 -1
View File
@@ -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 दिन'
}
+2 -1
View File
@@ -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'
}
+2 -1
View File
@@ -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일'
}
+2 -1
View File
@@ -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'
}
+2 -1
View File
@@ -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'
}
+2 -1
View File
@@ -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 день в неделю'
}
+2 -1
View File
@@ -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'
}
+2 -1
View File
@@ -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 天'
}
+12 -3
View File
@@ -158,9 +158,18 @@ export default function CoachIntake() {
<div className="ob-eyebrow">{t('Session length')}</div>
<h1 className="ob-h">{t('How long is a session?')}</h1>
<p className="ob-p">{t('The Coach fits the volume to the time you actually have, including rest between sets.')}</p>
<div className="ob-time">
<input type="time" value={toHHMM(p.sessionMin || 60)} step={300} min="00:10" max="04:00"
onChange={e => { 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. */}
<div className="ob-time" role="group" aria-label={t('How long is a session?')}>
<select className="ob-wheel" value={Math.floor((p.sessionMin || 60) / 60)}
onChange={e => set({ sessionMin: (+e.target.value) * 60 + ((p.sessionMin || 60) % 60) || 5 })}>
{[0, 1, 2, 3].map(h => <option key={h} value={h}>{String(h).padStart(2, '0')}</option>)}
</select>
<span className="ob-time-sep">:</span>
<select className="ob-wheel" value={(p.sessionMin || 60) % 60}
onChange={e => set({ sessionMin: Math.floor((p.sessionMin || 60) / 60) * 60 + (+e.target.value) || 5 })}>
{[0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55].map(m => <option key={m} value={m}>{String(m).padStart(2, '0')}</option>)}
</select>
<span className="ob-time-l">{t('h:mm')}</span>
</div>
<div className="ob-quick">