Skip to content

Open-source gym & body-weight tracker, now in the App Store (iPhone + Apple Watch) and as an Android APK. Plan routines, log workouts, see which muscles are trained, import from Strong/Hevy/FitNotes. Self-host it or use it on the phone alone.

Merge #183: iOS timer sounds — the context resumes before every tone, unlocks from the tap, and a setting plays sounds on silent; #152 (kurktchiev)

Duarte Santos33f4758a1c70
diff --cc frontend/src/lib/pt-br-locale.test.js
index 42c18548c,5d153e2b4..f692c6095
--- a/frontend/src/lib/pt-br-locale.test.js
+++ b/frontend/src/lib/pt-br-locale.test.js
@@@ -27,11 -27,11 +27,11 @@@ describe('Brazilian Portuguese locale'
.sort(byCodeUnit)
const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')
- expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(642)
- expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(641)
- expect(inherited).toHaveLength(643)
++ expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(644)
+ expect(inherited).toHaveLength(647)
// 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('f9f572ecbbdd79fbc62a1a7804224f219d23e07810121f0160e594b4518d09ac')
+ expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('185cca3dfbc438a4a2177956d1d18da2bbdc907281c5eb4c858ba34afaf9f38e')
})
test('does not leak European Portuguese UI terms', () => {
diff --cc frontend/src/locales/de.js
index 8c159df61,9661c2d54..fad9cba71
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@@ -336,9 -336,8 +336,11 @@@ export default
'Rest timer': 'Pausen-Timer',
'Sounds': 'Töne',
'Flash screen when timer ends': 'Bildschirm bei Timer-Ende blinken lassen',
+ 'Weigh in before workouts': 'Vor dem Training wiegen',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': 'Fragt beim Start eines Trainings nach deinem Körpergewicht. Aus startet die Einheit direkt.',
+ 'No entries yet — log your weight to start the curve.': 'Noch keine Einträge — trag dein Gewicht ein, um die Kurve zu starten.',
+ 'Play sounds when the phone is on silent': 'Töne auch bei stummgeschaltetem Telefon abspielen',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': 'Musik, die auf diesem Telefon läuft, stoppt während eines Trainings und setzt nicht von selbst wieder ein.',
'Data': 'Daten',
'Export backup (JSON)': 'Backup exportieren (JSON)',
'Import backup': 'Backup importieren',
diff --cc frontend/src/locales/es.js
index 916ce4cf7,3fd6772a0..68e2144a4
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@@ -321,9 -321,8 +321,11 @@@ export default
'Rest timer': 'Temporizador de descanso',
'Sounds': 'Sonidos',
'Flash screen when timer ends': 'Hacer parpadear la pantalla al finalizar el temporizador',
+ 'Weigh in before workouts': 'Pesarse antes de entrenar',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': 'Pide tu peso corporal al empezar un entrenamiento. Desactivado, la sesión empieza directamente.',
+ 'No entries yet — log your weight to start the curve.': 'Sin registros aún — apunta tu peso para empezar la curva.',
+ 'Play sounds when the phone is on silent': 'Reproducir sonidos con el teléfono en silencio',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': 'La música que suena en este teléfono se detiene durante un entrenamiento y no se reanuda por sí sola.',
'Data': 'Datos',
'Export backup (JSON)': 'Exportar copia (JSON)',
'Import backup': 'Importar copia',
diff --cc frontend/src/locales/fr.js
index c9443b412,0c1347fb2..ff4b17cfd
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@@ -321,9 -321,8 +321,11 @@@ export default
'Rest timer': 'Minuteur de repos',
'Sounds': 'Sons',
'Flash screen when timer ends': 'Faire clignoter l’écran à la fin du minuteur',
+ 'Weigh in before workouts': 'Se peser avant la séance',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': 'Demande ton poids au début d’une séance. Désactivé, la séance démarre directement.',
+ 'No entries yet — log your weight to start the curve.': 'Aucune entrée — note ton poids pour démarrer la courbe.',
+ 'Play sounds when the phone is on silent': 'Jouer les sons même si le téléphone est en mode silencieux',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': 'La musique en cours de lecture sur ce téléphone s’arrête pendant une séance et ne reprend pas toute seule.',
'Data': 'Données',
'Export backup (JSON)': 'Exporter une sauvegarde (JSON)',
'Import backup': 'Importer une sauvegarde',
diff --cc frontend/src/locales/hi.js
index 2dd2d0544,1f1c8f2c0..da466b3f2
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@@ -321,9 -321,8 +321,11 @@@ export default
'Rest timer': 'आराम टाइमर',
'Sounds': 'ध्वनियाँ',
'Flash screen when timer ends': 'टाइमर खत्म होने पर स्क्रीन फ्लैश करें',
+ 'Weigh in before workouts': 'वर्कआउट से पहले वज़न दर्ज करना',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': 'वर्कआउट शुरू होते समय आपका वज़न पूछता है। बंद होने पर सेशन सीधे शुरू होता है।',
+ 'No entries yet — log your weight to start the curve.': 'अभी कोई एंट्री नहीं — ग्राफ़ शुरू करने के लिए वज़न दर्ज करें।',
+ 'Play sounds when the phone is on silent': 'फ़ोन साइलेंट पर हो तब भी आवाज़ें बजाएँ',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': 'इस फ़ोन पर चल रहा संगीत वर्कआउट के दौरान रुक जाता है और अपने आप फिर से शुरू नहीं होता।',
'Data': 'डेटा',
'Export backup (JSON)': 'बैकअप निर्यात करें (JSON)',
'Import backup': 'बैकअप आयात करें',
diff --cc frontend/src/locales/hu.js
index 54b31386d,7b53d1588..f99fa4ff9
--- a/frontend/src/locales/hu.js
+++ b/frontend/src/locales/hu.js
@@@ -745,9 -745,8 +745,11 @@@ export default
'Logged sets stay with the original exercise. The replacement will be inserted afterward.': 'A naplózott sorozatok az eredeti gyakorlatnál maradnak. A csere utána kerül beszúrásra.',
'Rest after each set of this exercise. Leave at 0 to use your default rest timer.': 'Pihenő a gyakorlat minden sorozata után. Hagyd 0-n az alapértelmezett pihenőidőzítőhöz.',
'Flash screen when timer ends': 'Képernyő villogása, ha lejár az időzítő',
+ 'Weigh in before workouts': 'Súlymérés edzés előtt',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': 'Edzés indításakor rákérdez a testsúlyodra. Kikapcsolva az edzés azonnal indul.',
+ 'No entries yet — log your weight to start the curve.': 'Még nincs bejegyzés — rögzítsd a súlyodat a görbe elindításához.',
+ 'Play sounds when the phone is on silent': 'Hangok lejátszása akkor is, ha a telefon némítva van',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': 'A telefonon szóló zene edzés közben leáll, és nem indul újra magától.',
'Import from Hevy': 'Importálás a Hevyből',
'Pull your history with a Hevy Pro API key': 'Előzmények letöltése Hevy Pro API-kulccsal',
'Pull your history with a Hevy Pro API key. The key is only used for this import and is not saved.': 'Előzmények letöltése Hevy Pro API-kulccsal. A kulcs csak ehhez az importhoz kell, nem mentjük el.',
diff --cc frontend/src/locales/it.js
index ffe810abf,5b3c368c7..3c8c8415f
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@@ -321,9 -321,8 +321,11 @@@ export default
'Rest timer': 'Timer di riposo',
'Sounds': 'Suoni',
'Flash screen when timer ends': 'Fai lampeggiare lo schermo alla fine del timer',
+ 'Weigh in before workouts': 'Pesarsi prima dell’allenamento',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': 'Chiede il tuo peso all’avvio di un allenamento. Disattivato, la sessione parte subito.',
+ 'No entries yet — log your weight to start the curve.': 'Nessun dato — registra il tuo peso per iniziare la curva.',
+ 'Play sounds when the phone is on silent': 'Riproduci i suoni anche con il telefono in silenzioso',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': 'La musica in riproduzione su questo telefono si ferma durante un allenamento e non riprende da sola.',
'Data': 'Dati',
'Export backup (JSON)': 'Esporta backup (JSON)',
'Import backup': 'Importa backup',
diff --cc frontend/src/locales/ko.js
index 1a322941d,b3c18fa03..48ea492ff
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@@ -321,9 -321,8 +321,11 @@@ export default
'Rest timer': '휴식 타이머',
'Sounds': '소리',
'Flash screen when timer ends': '타이머 종료 시 화면 깜박임',
+ 'Weigh in before workouts': '운동 전 체중 기록',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': '운동을 시작할 때 체중을 물어봅니다. 끄면 세션이 바로 시작됩니다.',
+ 'No entries yet — log your weight to start the curve.': '아직 기록이 없어요 — 체중을 기록해 그래프를 시작하세요.',
+ 'Play sounds when the phone is on silent': '무음 모드에서도 소리 재생',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': '운동 중에는 이 휴대폰에서 재생 중인 음악이 멈추며, 자동으로 다시 재생되지 않습니다.',
'Data': '데이터',
'Export backup (JSON)': '백업 내보내기 (JSON)',
'Import backup': '백업 가져오기',
diff --cc frontend/src/locales/pl.js
index 5ab74e124,f6cc7203f..213baab72
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@@ -321,9 -321,8 +321,11 @@@ export default
'Rest timer': 'Minutnik przerwy',
'Sounds': 'Dźwięki',
'Flash screen when timer ends': 'Migaj ekranem po zakończeniu minutnika',
+ 'Weigh in before workouts': 'Ważenie przed treningiem',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': 'Pyta o Twoją masę ciała przy rozpoczęciu treningu. Wyłączone — sesja zaczyna się od razu.',
+ 'No entries yet — log your weight to start the curve.': 'Brak wpisów — zapisz wagę, aby zacząć krzywą.',
+ 'Play sounds when the phone is on silent': 'Odtwarzaj dźwięki także przy wyciszonym telefonie',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': 'Muzyka odtwarzana na tym telefonie zatrzymuje się podczas treningu i nie wznawia się sama.',
'Data': 'Dane',
'Export backup (JSON)': 'Eksportuj kopię (JSON)',
'Import backup': 'Importuj kopię',
diff --cc frontend/src/locales/pt-BR.js
index 9f01fc1ef,541b8651f..324b0f2ae
--- a/frontend/src/locales/pt-BR.js
+++ b/frontend/src/locales/pt-BR.js
@@@ -115,9 -115,8 +115,11 @@@ export const PT_BR_OVERRIDES =
'synced with your profile': 'sincronizado com seu perfil',
'The screen stays on while a workout is running, so you don’t have to unlock your phone between sets.': 'A tela permanece ligada durante o treino, para você não precisar desbloquear o celular entre as séries.',
'Flash screen when timer ends': 'Piscar a tela quando o temporizador terminar',
+ 'Weigh in before workouts': 'Pesar antes do treino',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': 'Pede seu peso ao iniciar um treino. Desligado, a sessão começa na hora.',
+ 'No entries yet — log your weight to start the curve.': 'Ainda não há registros — informe seu peso para começar a curva.',
+ 'Play sounds when the phone is on silent': 'Tocar sons com o celular no silencioso',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': 'A música que estiver tocando neste celular para durante o treino e não volta sozinha.',
'Export backup (JSON)': 'Exportar backup (JSON)',
'Import backup': 'Importar backup',
'Reset everything?': 'Redefinir tudo?',
diff --cc frontend/src/locales/pt.js
index 531d991f5,88285ebc6..ea44d465c
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@@ -321,9 -321,8 +321,11 @@@ export default
'Rest timer': 'Temporizador de descanso',
'Sounds': 'Sons',
'Flash screen when timer ends': 'Piscar o ecrã quando o temporizador terminar',
+ 'Weigh in before workouts': 'Pesar antes do treino',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': 'Pede o teu peso ao iniciar um treino. Desligado, a sessão começa de imediato.',
+ 'No entries yet — log your weight to start the curve.': 'Ainda sem registos — regista o teu peso para começar a curva.',
+ 'Play sounds when the phone is on silent': 'Reproduzir sons com o telemóvel em silêncio',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': 'A música a tocar neste telemóvel para durante um treino e não retoma sozinha.',
'Data': 'Dados',
'Export backup (JSON)': 'Exportar cópia (JSON)',
'Import backup': 'Importar cópia',
diff --cc frontend/src/locales/ru.js
index 1101b26fa,20244af51..46ce8efb2
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@@ -321,9 -321,8 +321,11 @@@ export default
'Rest timer': 'Таймер отдыха',
'Sounds': 'Звуки',
'Flash screen when timer ends': 'Мигать экраном по окончании таймера',
+ 'Weigh in before workouts': 'Взвешивание перед тренировкой',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': 'Спрашивает ваш вес при начале тренировки. Выключено — сессия начинается сразу.',
+ 'No entries yet — log your weight to start the curve.': 'Записей пока нет — внеси вес, чтобы начать кривую.',
+ 'Play sounds when the phone is on silent': 'Воспроизводить звуки при беззвучном режиме',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': 'Музыка, играющая на этом телефоне, останавливается во время тренировки и сама не возобновляется.',
'Data': 'Данные',
'Export backup (JSON)': 'Экспорт резервной копии (JSON)',
'Import backup': 'Импорт резервной копии',
diff --cc frontend/src/locales/th.js
index 1bfabe30b,96f7a2a67..f2b372dbd
--- a/frontend/src/locales/th.js
+++ b/frontend/src/locales/th.js
@@@ -753,9 -753,8 +753,11 @@@ export default
'Logged sets stay with the original exercise. The replacement will be inserted afterward.': 'เซ็ตที่บันทึกแล้วจะอยู่กับท่าเดิม ท่าใหม่จะถูกแทรกไว้ถัดไป',
'Rest after each set of this exercise. Leave at 0 to use your default rest timer.': 'พักหลังแต่ละเซ็ตของท่านี้ ปล่อยไว้ที่ 0 เพื่อใช้ตัวจับเวลาพักค่าเริ่มต้น',
'Flash screen when timer ends': 'กะพริบหน้าจอเมื่อหมดเวลา',
+ 'Weigh in before workouts': 'ชั่งน้ำหนักก่อนออกกำลังกาย',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': 'ถามน้ำหนักตัวเมื่อเริ่มออกกำลังกาย ถ้าปิด เซสชันจะเริ่มทันที',
+ 'No entries yet — log your weight to start the curve.': 'ยังไม่มีข้อมูล — บันทึกน้ำหนักเพื่อเริ่มกราฟ',
+ 'Play sounds when the phone is on silent': 'เล่นเสียงแม้โทรศัพท์อยู่ในโหมดเงียบ',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': 'เพลงที่เล่นอยู่บนโทรศัพท์นี้จะหยุดระหว่างการออกกำลังกาย และจะไม่เล่นต่อเอง',
'Import from Hevy': 'นำเข้าจาก Hevy',
'Pull your history with a Hevy Pro API key': 'ดึงประวัติด้วยคีย์ API ของ Hevy Pro',
'Pull your history with a Hevy Pro API key. The key is only used for this import and is not saved.': 'ดึงประวัติด้วยคีย์ API ของ Hevy Pro คีย์ใช้สำหรับการนำเข้าครั้งนี้เท่านั้นและจะไม่ถูกบันทึก',
diff --cc frontend/src/locales/tr.js
index f3c09a5d4,7f72d8a92..95720d15e
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@@ -321,9 -321,8 +321,11 @@@ export default
'Rest timer': 'Dinlenme sayacı',
'Sounds': 'Sesler',
'Flash screen when timer ends': 'Zamanlayıcı bitince ekranı yanıp söndür',
+ 'Weigh in before workouts': 'Antrenman öncesi tartılma',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': 'Antrenman başlarken kilonu sorar. Kapalıyken seans hemen başlar.',
+ 'No entries yet — log your weight to start the curve.': 'Henüz kayıt yok — eğriyi başlatmak için kilonu gir.',
+ 'Play sounds when the phone is on silent': 'Telefon sessizdeyken de sesleri çal',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': 'Bu telefonda çalan müzik antrenman sırasında durur ve kendiliğinden devam etmez.',
'Data': 'Veriler',
'Export backup (JSON)': 'Yedeği dışa aktar (JSON)',
'Import backup': 'Yedeği içe aktar',
diff --cc frontend/src/locales/zh.js
index eed9cea44,1295ae855..f45110eec
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@@ -321,9 -321,8 +321,11 @@@ export default
'Rest timer': '休息计时',
'Sounds': '声音',
'Flash screen when timer ends': '计时结束时闪烁屏幕',
+ 'Weigh in before workouts': '训练前称重',
+ 'Asks for your body weight when a workout starts. Off starts the session straight away.': '开始训练时询问体重。关闭后直接进入训练。',
+ 'No entries yet — log your weight to start the curve.': '还没有记录——记录体重以开始曲线。',
+ 'Play sounds when the phone is on silent': '手机静音时也播放提示音',
+ 'Music playing on this phone stops during a workout and does not resume by itself.': '锻炼期间,这部手机正在播放的音乐会停止,且不会自动恢复。',
'Data': '数据',
'Export backup (JSON)': '导出备份(JSON)',
'Import backup': '导入备份',
diff --cc frontend/src/views/Workout.jsx
index 2fe538421,fbb0c1f13..8e772d080
--- a/frontend/src/views/Workout.jsx
+++ b/frontend/src/views/Workout.jsx
@@@ -7,10 -7,10 +7,10 @@@ import { exOr } from '../lib/exercises.
import { usesBar, barWeightFor, plateSplit } from '../lib/bar.js'
import { effectiveRoutines, effectiveRoutineIds, lastEntryFor, bestWeightFor, bestWeightForEntry, buildSets, freestyleConfig, defaultConfig, setsDoneActive, setUnitsTotal, supersetUnits, unitOf, setLabel, modeOf, isBw, isPerSide, repStep, EFFORT, effortOf, stepEffort, capEffort, cascadeWeight, insertWarmupRow, removeRowAt, pairAdjacent, unpairSuperset, cleanupSg, applyIntensifierPlan, pinnedNoteFor, exNoteFor } from '../lib/history.js'
import { fmtNum, capWords, fmtDate, todayISO, exCount, DAYN } from '../lib/format.js'
- import { beep, vibrate } from '../lib/sound.js'
+ import { beep, vibrate, unlock } from '../lib/sound.js'
import { t, exerciseNameFor } from '../lib/i18n.js'
import { api } from '../lib/api.js'
-import { insertionIndexAfterCurrentUnit, nextUnfinishedUnit, setProgressHighWater, supersetFlowStep, restAfterSet, restOnRecheck, restSecFor } from '../lib/supersetFlow.js'
+import { insertionIndexAfterCurrentUnit, nextUnfinishedUnit, setProgressHighWater, supersetFlowStep, restAfterSet, restOnRecheck, restSecFor, warmupRestSecFor } from '../lib/supersetFlow.js'
import Media from '../components/Media.jsx'
import { startFlow, exercisePicker, exConfigSheet, exerciseDetailSheet, finishWorkout, workoutCompleteSheet, confirmSheet, exerciseNoteSheet, sessionNoteSheet, swapActiveWorkoutExercise, barWeightSheet, menuSheet, effortPickerSheet, exerciseHistorySheet, addRoutineToSessionSheet } from '../sheets.jsx'
import { effortColor } from '../lib/effort.js'
diff --cc frontend/src/views/Workout.remove.test.jsx
index 4e0b85307,ea0097d9d..ce5058428
--- a/frontend/src/views/Workout.remove.test.jsx
+++ b/frontend/src/views/Workout.remove.test.jsx
@@@ -6,9 -6,9 +6,9 @@@ import { afterEach, beforeEach, describ
import Workout, { removeActiveExercise } from './Workout.jsx'
import { DEF, useStore } from '../store/useStore.js'
import { useUI } from '../store/useUI.js'
-import { LANGS } from '../lib/i18n-core.js'
+import { LANGS, DERIVED_LOCALES } from '../lib/i18n-core.js'
- vi.mock('../lib/sound.js', () => ({ beep: vi.fn(), vibrate: vi.fn() }))
+ vi.mock('../lib/sound.js', () => ({ beep: vi.fn(), vibrate: vi.fn(), unlock: vi.fn() }))
vi.mock('../lib/api.js', () => ({ api: vi.fn(() => Promise.resolve({})) }))
globalThis.IS_REACT_ACT_ENVIRONMENT = true