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.

Workout: a swap and a mid-session add are worded for this workout, not the routine

Duarte Santosbaf880705e1f
diff --git a/frontend/src/locales/ar.js b/frontend/src/locales/ar.js
index 7d9f786ff..019594c52 100644
--- a/frontend/src/locales/ar.js
+++ b/frontend/src/locales/ar.js
@@ -1675,4 +1675,7 @@ export default {
'Its {0} photos or videos are deleted with it.': 'ستُحذف معه أيضًا الصور أو مقاطع الفيديو المرفقة ({0}).',
'Its photo or video moves to the new workout.': 'تنتقل الصورة أو الفيديو المرفق إلى التمرين الجديد.',
'Its {0} photos or videos move to the new workout.': 'تنتقل الصور أو مقاطع الفيديو المرفقة ({0}) إلى التمرين الجديد.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'استخدمه في هذا التمرين',
+ 'Add to this workout': 'أضِف إلى هذا التمرين',
}
diff --git a/frontend/src/locales/de.js b/frontend/src/locales/de.js
index 0449b6cfd..35f0264da 100644
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@ -1642,4 +1642,7 @@ export default {
'Its {0} photos or videos are deleted with it.': 'Die {0} Fotos oder Videos darin werden mitgelöscht.',
'Its photo or video moves to the new workout.': 'Das Foto oder Video kommt ins neue Training mit.',
'Its {0} photos or videos move to the new workout.': 'Die {0} Fotos oder Videos kommen ins neue Training mit.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'In diesem Training verwenden',
+ 'Add to this workout': 'Zu diesem Training hinzufügen',
}
diff --git a/frontend/src/locales/es.js b/frontend/src/locales/es.js
index 3bc562441..4d8e08829 100644
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@ -1622,4 +1622,7 @@ export default {
'Its {0} photos or videos are deleted with it.': 'Sus {0} fotos o vídeos también se eliminan.',
'Its photo or video moves to the new workout.': 'Su foto o vídeo pasa al nuevo entrenamiento.',
'Its {0} photos or videos move to the new workout.': 'Sus {0} fotos o vídeos pasan al nuevo entrenamiento.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'Usar en este entrenamiento',
+ 'Add to this workout': 'Añadir a este entrenamiento',
}
diff --git a/frontend/src/locales/fr.js b/frontend/src/locales/fr.js
index 647074d36..7ae7b4209 100644
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@ -1622,4 +1622,7 @@ export default {
'Its {0} photos or videos are deleted with it.': 'Ses {0} photos ou vidéos sont supprimées avec elle.',
'Its photo or video moves to the new workout.': 'Sa photo ou vidéo passe à la nouvelle séance.',
'Its {0} photos or videos move to the new workout.': 'Ses {0} photos ou vidéos passent à la nouvelle séance.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'Utiliser dans cette séance',
+ 'Add to this workout': 'Ajouter à cette séance',
}
diff --git a/frontend/src/locales/hi.js b/frontend/src/locales/hi.js
index 5c187e8bd..3759ad539 100644
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@ -1622,4 +1622,7 @@ export default {
'Its {0} photos or videos are deleted with it.': 'इसकी {0} फ़ोटो या वीडियो भी इसके साथ हट जाएँगी।',
'Its photo or video moves to the new workout.': 'इसकी फ़ोटो या वीडियो नए वर्कआउट में चली जाएगी।',
'Its {0} photos or videos move to the new workout.': 'इसकी {0} फ़ोटो या वीडियो नए वर्कआउट में चली जाएँगी।',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'इस वर्कआउट में इस्तेमाल करें',
+ 'Add to this workout': 'इस वर्कआउट में जोड़ें',
}
diff --git a/frontend/src/locales/hu.js b/frontend/src/locales/hu.js
index d4de29b62..b29a40609 100644
--- a/frontend/src/locales/hu.js
+++ b/frontend/src/locales/hu.js
@@ -1625,4 +1625,7 @@ export default {
'Its {0} photos or videos are deleted with it.': 'Vele együtt törlődnek a hozzá tartozó fotók és videók is ({0}).',
'Its photo or video moves to the new workout.': 'A hozzá tartozó fotó vagy videó átkerül az új edzéshez.',
'Its {0} photos or videos move to the new workout.': 'A hozzá tartozó fotók és videók ({0}) átkerülnek az új edzéshez.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'Használat ebben az edzésben',
+ 'Add to this workout': 'Hozzáadás ehhez az edzéshez',
}
diff --git a/frontend/src/locales/it.js b/frontend/src/locales/it.js
index e48ba98af..54eca1cac 100644
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@ -1622,4 +1622,7 @@ export default {
'Its {0} photos or videos are deleted with it.': 'Anche le sue {0} foto o video vengono eliminati.',
'Its photo or video moves to the new workout.': 'La sua foto o il suo video passa al nuovo allenamento.',
'Its {0} photos or videos move to the new workout.': 'Le sue {0} foto o video passano al nuovo allenamento.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'Usa in questo allenamento',
+ 'Add to this workout': 'Aggiungi a questo allenamento',
}
diff --git a/frontend/src/locales/ko.js b/frontend/src/locales/ko.js
index 6b430aee7..dc4f046a1 100644
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@ -1622,4 +1622,7 @@ export default {
'Its {0} photos or videos are deleted with it.': '첨부된 사진·동영상 {0}개도 함께 삭제됩니다.',
'Its photo or video moves to the new workout.': '첨부된 사진·동영상은 새 운동으로 옮겨집니다.',
'Its {0} photos or videos move to the new workout.': '첨부된 사진·동영상 {0}개는 새 운동으로 옮겨집니다.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': '이번 운동에 사용',
+ 'Add to this workout': '이번 운동에 추가',
}
diff --git a/frontend/src/locales/pl.js b/frontend/src/locales/pl.js
index 41e5b177d..83c4422ea 100644
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@ -1622,4 +1622,7 @@ export default {
'Its {0} photos or videos are deleted with it.': 'Zdjęcia lub filmy ({0}) też zostaną usunięte.',
'Its photo or video moves to the new workout.': 'Zdjęcie lub film przejdzie do nowego treningu.',
'Its {0} photos or videos move to the new workout.': 'Zdjęcia lub filmy ({0}) przejdą do nowego treningu.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'Użyj w tym treningu',
+ 'Add to this workout': 'Dodaj do tego treningu',
}
diff --git a/frontend/src/locales/pt-BR.js b/frontend/src/locales/pt-BR.js
index 8c733fde9..2fa7cbc23 100644
--- a/frontend/src/locales/pt-BR.js
+++ b/frontend/src/locales/pt-BR.js
@@ -967,6 +967,9 @@ export const PT_BR_OVERRIDES = {
'A progress photo or a form-check video, kept with this workout.': 'Uma foto de progresso ou um vídeo para conferir a técnica, salvos com este treino.',
'Its photo or video is deleted with it.': 'A foto ou o vídeo dele também é excluído.',
'Its {0} photos or videos are deleted with it.': 'As {0} fotos ou vídeos dele também são excluídos.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'Usar neste treino',
+ 'Add to this workout': 'Adicionar a este treino',
}
export default { ...pt, ...PT_BR_OVERRIDES }
diff --git a/frontend/src/locales/pt.js b/frontend/src/locales/pt.js
index b87bd0b62..1cc42f302 100644
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@ -1622,4 +1622,7 @@ export default {
'Its {0} photos or videos are deleted with it.': 'As {0} fotos ou vídeos dele também são eliminados.',
'Its photo or video moves to the new workout.': 'A foto ou o vídeo dele passa para o novo treino.',
'Its {0} photos or videos move to the new workout.': 'As {0} fotos ou vídeos dele passam para o novo treino.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'Usar neste treino',
+ 'Add to this workout': 'Adicionar a este treino',
}
diff --git a/frontend/src/locales/ru.js b/frontend/src/locales/ru.js
index 6e9b3d6e7..280a724c4 100644
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@ -1622,4 +1622,7 @@ export default {
'Its {0} photos or videos are deleted with it.': 'Фото и видео ({0}) тоже будут удалены.',
'Its photo or video moves to the new workout.': 'Фото или видео перейдёт в новую тренировку.',
'Its {0} photos or videos move to the new workout.': 'Фото и видео ({0}) перейдут в новую тренировку.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'Использовать в этой тренировке',
+ 'Add to this workout': 'Добавить в эту тренировку',
}
diff --git a/frontend/src/locales/th.js b/frontend/src/locales/th.js
index 217fbafe5..a05192195 100644
--- a/frontend/src/locales/th.js
+++ b/frontend/src/locales/th.js
@@ -1633,4 +1633,7 @@ export default {
'Its {0} photos or videos are deleted with it.': 'รูปภาพหรือวิดีโอที่แนบไว้ {0} รายการจะถูกลบไปด้วย',
'Its photo or video moves to the new workout.': 'รูปภาพหรือวิดีโอที่แนบไว้จะย้ายไปยังการออกกำลังกายใหม่',
'Its {0} photos or videos move to the new workout.': 'รูปภาพหรือวิดีโอที่แนบไว้ {0} รายการจะย้ายไปยังการออกกำลังกายใหม่',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'ใช้ในการออกกำลังกายครั้งนี้',
+ 'Add to this workout': 'เพิ่มในการออกกำลังกายครั้งนี้',
}
diff --git a/frontend/src/locales/tr.js b/frontend/src/locales/tr.js
index 74debd884..5f0d9efd6 100644
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@ -1622,4 +1622,7 @@ export default {
'Its {0} photos or videos are deleted with it.': '{0} fotoğrafı veya videosu da onunla birlikte silinir.',
'Its photo or video moves to the new workout.': 'Fotoğrafı veya videosu yeni antrenmana taşınır.',
'Its {0} photos or videos move to the new workout.': '{0} fotoğrafı veya videosu yeni antrenmana taşınır.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'Bu antrenmanda kullan',
+ 'Add to this workout': 'Bu antrenmana ekle',
}
diff --git a/frontend/src/locales/uk.js b/frontend/src/locales/uk.js
index 954d92698..4d8412f43 100644
--- a/frontend/src/locales/uk.js
+++ b/frontend/src/locales/uk.js
@@ -1619,4 +1619,7 @@ export default {
'Its {0} photos or videos are deleted with it.': 'Фото й відео ({0}) теж буде видалено.',
'Its photo or video moves to the new workout.': 'Фото чи відео перейде до нового тренування.',
'Its {0} photos or videos move to the new workout.': 'Фото й відео ({0}) перейдуть до нового тренування.',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': 'Використати в цьому тренуванні',
+ 'Add to this workout': 'Додати до цього тренування',
}
diff --git a/frontend/src/locales/zh.js b/frontend/src/locales/zh.js
index 2c2241e52..1dac2842b 100644
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@ -1622,4 +1622,7 @@ export default {
'Its {0} photos or videos are deleted with it.': '其中的 {0} 个照片或视频也会一并删除。',
'Its photo or video moves to the new workout.': '其中的照片或视频会移到新的训练中。',
'Its {0} photos or videos move to the new workout.': '其中的 {0} 个照片或视频会移到新的训练中。',
+ // --- a swap or an add during a workout changes only this session ---
+ 'Use in this workout': '用于本次训练',
+ 'Add to this workout': '添加到本次训练',
}
diff --git a/frontend/src/sheets.jsx b/frontend/src/sheets.jsx
index 355020a87..7565db6e5 100644
--- a/frontend/src/sheets.jsx
+++ b/frontend/src/sheets.jsx
@@ -1167,7 +1167,8 @@ export function swapActiveWorkoutExercise(index) {
// The "+" on a picker row commits with the default config, exactly as it does in the add
// flows; tapping the row still opens the config sheet first.
- const picker = exercisePicker((ex, quick) => quick ? swapTo(ex, defaultConfig(ex.id)) : exConfigSheet(ex, null, cfg => swapTo(ex, cfg), null, null))
+ // Worded for the session, not the routine: a swap changes today's workout only.
+ const picker = exercisePicker((ex, quick) => quick ? swapTo(ex, defaultConfig(ex.id)) : exConfigSheet(ex, null, cfg => swapTo(ex, cfg), null, null, null, null, t('Use in this workout')), { title: t('Swap exercise') })
function swapTo(ex, cfg) {
// The picker is a chooser here, not a stack you keep adding from: one swap, then back to
// the workout. (The add flow deliberately leaves it open.)
diff --git a/frontend/src/sheets.swap.test.jsx b/frontend/src/sheets.swap.test.jsx
index f82c08813..9e80550e3 100644
--- a/frontend/src/sheets.swap.test.jsx
+++ b/frontend/src/sheets.swap.test.jsx
@@ -120,3 +120,18 @@ describe('active exercise swap locale coverage', () => {
})
})
})
+
+// QA 1.3.9: the swap borrowed the routine editor's words — "Add exercise" over the picker and
+// "Add to routine" on the confirm — while it changes only today's session.
+describe('swap wording', () => {
+ it('titles the picker as a swap and confirms into this workout', () => {
+ swapActiveWorkoutExercise(1)
+ const picker = useUI.getState().sheets.at(-1)
+ const pickerView = picker.render(picker.close)
+ expect(pickerView.props.title).toBe('Swap exercise')
+ act(() => pickerView.props.onPick(EXDB[2]))
+ const configSheet = useUI.getState().sheets.at(-1)
+ const configView = configSheet.render(configSheet.close)
+ expect(configView.props.saveLabel).toBe('Use in this workout')
+ })
+})
diff --git a/frontend/src/views/Workout.jsx b/frontend/src/views/Workout.jsx
index 9d3abd015..026153e82 100644
--- a/frontend/src/views/Workout.jsx
+++ b/frontend/src/views/Workout.jsx
@@ -1387,7 +1387,8 @@ function ActiveWorkout() {
// the sheet would have opened with; tapping the row still opens that sheet for anyone
// who wants to set sets/reps first.
if (quick) { commit(seed || defaultConfig(ex.id)); useUI.getState().toast(t('“{0}” added to {1}', exerciseNameText(ex), routine ? routine.name : t('Freestyle'))) }
- else exConfigSheet(ex, null, commit, null, routine, seed)
+ // The confirm names what it changes: this workout, never the routine behind it.
+ else exConfigSheet(ex, null, commit, null, routine, seed, null, t('Add to this workout'))
})} icon="plus">{t('Add exercise')}</Button>
{wc.exerciseButtons && A.entries.length > 0 && <>
<div style={{ height: 6 }} />
diff --git a/frontend/src/views/Workout.test.jsx b/frontend/src/views/Workout.test.jsx
index fe37731d0..f9413ea94 100644
--- a/frontend/src/views/Workout.test.jsx
+++ b/frontend/src/views/Workout.test.jsx
@@ -545,6 +545,8 @@ describe('Workout add exercise flow', () => {
'current-group', 'current-group',
])
expect(mocks.S.active.cur).toBe(2)
+ // The confirm says where the exercise goes: this workout, not the routine (QA 1.3.9).
+ expect(mocks.exConfigSheet.mock.calls.at(-1)[7]).toBe('Add to this workout')
})
})