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 merge request !2 (exercise catalogue and muscle metadata)

Duarte Santos5762096a5f91
diff --cc frontend/src/lib/exercises.js
index 1fd24ab10,e3238d563..b41448e95
--- a/frontend/src/lib/exercises.js
+++ b/frontend/src/lib/exercises.js
@@@ -1,5 -1,6 +1,6 @@@
import { EXDB } from './exercises-data.js'
+ import { USER_EXERCISE_MUSCLE_OVERRIDES, exerciseMuscleMetadataFor } from './exercise-muscle-batch-1.js'
-import { t } from './i18n-core.js'
+import { t, getVersion, exerciseNameSearchText } from './i18n-core.js'
export { EXDB }
diff --cc frontend/src/lib/muscles.js
index 2120443f8,be19355d1..8f52b1324
--- a/frontend/src/lib/muscles.js
+++ b/frontend/src/lib/muscles.js
@@@ -72,18 -75,24 +73,40 @@@ const SECONDARY = 0.4 // a supportin
const arrayOf = value => Array.isArray(value) ? value : value == null || value === '' ? [] : [value]
+ function firstPresent(object, keys) {
+ if (!object || typeof object !== 'object') return null
+ for (const key of keys) {
+ if (Object.prototype.hasOwnProperty.call(object, key)) return object[key]
+ }
+ return null
+ }
+
+// Completed history entries may retain a nested snapshot after their custom exercise is
+// deleted from the profile catalogue. Prefer that snapshot when the outer entry has no muscle
+// metadata of its own, while keeping direct/legacy entry fields authoritative when present.
+function metadataOf(ex) {
+ if (!ex || typeof ex !== 'object') return ex
- const hasDirect = ['muscleGroups', 'muscles', 'targetMuscles'].some(key => Object.prototype.hasOwnProperty.call(ex, key))
++ const DIRECT_KEYS = [
++ 'muscleGroups', 'muscles', 'targetMuscles', 'muscleWeights',
++ 'primaries', 'primaryMuscles', 'primary', 'secondaries', 'secondaryMuscles', 'secondary',
++ ]
++ const hasDirect = DIRECT_KEYS.some(key => Object.prototype.hasOwnProperty.call(ex, key))
+ || [ex.tg, ex.mg, ...arrayOf(ex.sm)].some(value => value != null && value !== '')
+ return !hasDirect && ex.muscleSnapshot && typeof ex.muscleSnapshot === 'object' && !Array.isArray(ex.muscleSnapshot)
+ ? ex.muscleSnapshot
+ : ex
+}
+
+ function explicitPartsOf(ex) {
+ if (!ex || typeof ex !== 'object') return null
+ const primary = firstPresent(ex, ['primaries', 'primaryMuscles', 'primary'])
+ const secondary = firstPresent(ex, ['secondaries', 'secondaryMuscles', 'secondary'])
+ if (primary !== null || secondary !== null) return {
+ primary: arrayOf(primary), secondary: arrayOf(secondary)
+ }
+ return null
+ }
+
function explicitGroupsOf(ex) {
if (!ex || typeof ex !== 'object') return null
if (Object.prototype.hasOwnProperty.call(ex, 'muscleGroups')) {
@@@ -102,12 -111,13 +125,14 @@@
}
/** True only when the catalogue explicitly supplied muscle groups, not a body-part fallback. */
--export function hasExplicitMuscleMetadata(ex) {
- const source = metadataOf(ex)
- if (!source || typeof source !== 'object') return false
- const groups = explicitGroupsOf(source)
++export function hasExplicitMuscleMetadata(entry) {
++ const ex = metadataOf(entry)
+ if (!ex || typeof ex !== 'object') return false
+ const parts = explicitPartsOf(ex)
+ if (parts && [...parts.primary, ...parts.secondary].some(value => canonicalMuscle(value))) return true
+ const groups = explicitGroupsOf(ex)
if (groups && groups.some(value => canonicalMuscle(value))) return true
- return [source.tg, source.mg, ...arrayOf(source.sm)].some(value => canonicalMuscle(value))
+ return [ex.tg, ex.mg, ...arrayOf(smOf(ex))].some(value => canonicalMuscle(value))
}
function canonicalMuscle(value) {
@@@ -116,17 -126,27 +141,28 @@@
return ALIAS[name] || null
}
- /** Canonical unique muscle groups, accepting both new arrays and legacy single fields. */
- export function muscleGroupsOf(ex) {
- const sourceEx = metadataOf(ex)
- const explicit = explicitGroupsOf(sourceEx)
- const source = explicit || [sourceEx?.tg, sourceEx?.mg, ...arrayOf(smOf(sourceEx))]
+ function canonicalUnique(values) {
const out = []
- source.forEach(value => {
+ for (const value of values || []) {
const slug = canonicalMuscle(value)
if (slug && !out.includes(slug)) out.push(slug)
- })
- if (!out.length && explicit == null) Object.keys(BY_BODYPART[sourceEx?.bp] || {}).forEach(slug => { if (!out.includes(slug)) out.push(slug) })
+ }
+ return out
+ }
+
+ /** Canonical unique muscle groups, accepting new primary/secondary arrays and legacy fields. */
-export function muscleGroupsOf(ex) {
++export function muscleGroupsOf(entry) {
++ const ex = metadataOf(entry)
+ const parts = explicitPartsOf(ex)
+ const explicit = explicitGroupsOf(ex)
+ const useParts = parts && [...parts.primary, ...parts.secondary].some(value => canonicalMuscle(value))
+ const source = useParts
+ ? [...parts.primary, ...parts.secondary]
+ : explicit || [ex?.tg, ex?.mg, ...arrayOf(smOf(ex))]
+ const out = canonicalUnique(source)
+ if (!out.length && !useParts && explicit == null) {
+ canonicalUnique(Object.keys(BY_BODYPART[ex?.bp] || {})).forEach(slug => out.push(slug))
+ }
return out
}
diff --cc frontend/src/lib/muscles.test.js
index 6423eec4b,0be096960..9d6c7a3ed
--- a/frontend/src/lib/muscles.test.js
+++ b/frontend/src/lib/muscles.test.js
@@@ -1,9 -1,45 +1,45 @@@
- import { describe, expect, it } from 'vitest'
+ import { describe, it, expect } from 'vitest'
import { EXIDX, EXDB, smOf } from './exercises.js'
- import { loadOfWorkouts, musclesOf } from './muscles.js'
-import { MUSCLE_NAME, exerciseMuscleSnapshot, loadOf, loadOfWorkouts, matchesMuscleGroups, muscleGroupsOf, musclesOf } from './muscles.js'
++import { MUSCLE_NAME, exerciseMuscleSnapshot, hasExplicitMuscleMetadata, loadOf, loadOfWorkouts, matchesMuscleGroups, muscleGroupsOf, musclesOf } from './muscles.js'
+
+ describe('multi-muscle exercise metadata', () => {
+ it('normalizes legacy primary/secondary fields and removes duplicate groups', () => {
+ const ex = { tg: 'pectorals', mg: 'triceps', sm: ['triceps', 'chest'] }
+ expect(muscleGroupsOf(ex)).toEqual(['chest', 'triceps'])
+ expect(musclesOf(ex)).toEqual({ chest: 1, triceps: 0.4 })
+ })
+
+ it('uses explicit multi-group metadata when present and supports legacy single groups', () => {
+ expect(muscleGroupsOf({ muscleGroups: ['chest', 'pectorals', 'triceps'] })).toEqual(['chest', 'triceps'])
+ expect(muscleGroupsOf({ tg: 'chest' })).toEqual(['chest'])
+ expect(MUSCLE_NAME.chest).toBe('Chest')
+ })
+
+ it('falls back to the legacy body-part map when an optional multi-group field is empty', () => {
+ expect(muscleGroupsOf({ bp: 'back', muscleGroups: [] })).toEqual(['upper-back', 'lower-back'])
+ expect(matchesMuscleGroups({ bp: 'back', muscleGroups: [] }, ['lower-back'])).toBe(true)
+ })
+
+ it('matches an exercise when any requested muscle group matches', () => {
+ const ex = { muscleGroups: ['chest', 'triceps'] }
+ expect(matchesMuscleGroups(ex, ['hamstring', 'triceps'])).toBe(true)
+ expect(matchesMuscleGroups(ex, ['hamstring', 'gluteal'])).toBe(false)
+ expect(matchesMuscleGroups(ex, [])).toBe(true)
+ })
+
+ it('counts one effective set per unique group instead of double counting duplicates', () => {
+ expect(loadOf([{ id: 'inline', ex: { tg: 'chest', sm: ['chest', 'triceps'] }, sets: 2 }]))
+ .toEqual({ chest: 2, triceps: 0.8 })
+ })
+
+ it('uses multi-muscle metadata carried by a history entry when its catalogue id is unavailable', () => {
+ expect(loadOfWorkouts([{ entries: [{
+ id: 'deleted-custom', muscleGroups: ['chest', 'chest', 'triceps'],
+ sets: [{ done: true }]
+ }] }])).toEqual({ chest: 1, triceps: 1 })
+ })
+ })
- // The catalogue keeps the source dataset's secondary-muscle spellings; musclesOf maps
- // those aliases to the canonical body-map slugs and applies the 0.4 support weight.
describe('catalogue secondary muscles', () => {
it('maps a bench press to chest, triceps and deltoids', () => {
expect(musclesOf(EXIDX['0025'])).toMatchObject({
@@@ -60,3 -136,3 +136,39 @@@ describe('map load with warm-up phases'
expect(load.chest).toBe(1)
})
})
++
++// A custom exercise that was deleted from the catalogue survives in history only as the
++// muscleSnapshot finish-workout wrote. Reading it back is what keeps those sessions in the
++// body map and in Stats instead of silently contributing nothing.
++describe('deleted custom exercises', () => {
++ const snapshotEntry = {
++ id: 'gone-custom-1',
++ sets: [{ w: 60, r: 8, done: true }],
++ muscleSnapshot: { n: 'Deleted custom', bp: 'chest', muscleGroups: ['chest'], muscleWeights: { chest: 1 } },
++ }
++
++ it('reads muscle load back out of the snapshot', () => {
++ expect(loadOfWorkouts([{ d: '2026-08-01', entries: [snapshotEntry] }])).toEqual({ chest: 1 })
++ })
++
++ it('reports the snapshot groups as explicit metadata', () => {
++ expect(hasExplicitMuscleMetadata(snapshotEntry)).toBe(true)
++ expect(muscleGroupsOf(snapshotEntry)).toEqual(['chest'])
++ })
++
++ it('still prefers the entry\'s own metadata when it has any', () => {
++ const withOwn = { ...snapshotEntry, tg: 'quadriceps' }
++ expect(muscleGroupsOf(withOwn)).toEqual(['quadriceps'])
++ })
++})
++
++// muscles.js counts completed work, so its warm-up boundary has to agree with the one the
++// session runtime uses — including the legacy spellings phaseForSet normalises.
++describe('warm-up boundary', () => {
++ it('excludes every phase spelling the workout model treats as a warm-up', () => {
++ const entries = spelling => [{ id: '0025', sets: [{ w: 100, r: 5, done: true, phase: spelling }] }]
++ for (const spelling of ['warmup', 'warm-up', 'warm_up', 'Warmup', ' warmup ']) {
++ expect(loadOfWorkouts([{ d: '2026-08-01', entries: entries(spelling) }]), spelling).toEqual({})
++ }
++ })
++})
diff --cc frontend/src/lib/pt-br-locale.test.js
index 8c9aeeb01,000000000..38c3821d4
mode 100644,000000..100644
--- a/frontend/src/lib/pt-br-locale.test.js
+++ b/frontend/src/lib/pt-br-locale.test.js
@@@ -1,54 -1,0 +1,54 @@@
+import { describe, expect, test } from 'vitest'
+import { createHash } from 'node:crypto'
+import pt from '../locales/pt.js'
+import ptBR, { PT_BR_OVERRIDES } from '../locales/pt-BR.js'
+import { DATE_LOCALES, LANGS } from './i18n-core.js'
+
+const placeholders = value => [...String(value).matchAll(/\{\d+\}/g)].map(match => match[0]).sort()
+const byCodeUnit = ([a], [b]) => (a < b ? -1 : a > b ? 1 : 0)
+
+describe('Brazilian Portuguese locale', () => {
+ test('is a separately selectable locale with Brazilian date formatting', () => {
+ expect(LANGS.pt).toBe('Português (Portugal)')
+ expect(LANGS['pt-BR']).toBe('Português (Brasil)')
+ expect(DATE_LOCALES['pt-BR']).toBe('pt-BR')
+ })
+
+ test('matches the source key set and preserves interpolation placeholders', () => {
+ expect(Object.keys(ptBR).sort()).toEqual(Object.keys(pt).sort())
+ for (const [source, translated] of Object.entries(ptBR)) {
+ expect(placeholders(translated), source).toEqual(placeholders(source))
+ }
+ })
+
+ test('makes every inherited pt-PT value an explicit reviewed snapshot', () => {
+ const inherited = Object.entries(pt)
+ .filter(([key]) => !(key in PT_BR_OVERRIDES))
+ .sort(byCodeUnit)
+ const fingerprint = createHash('sha256').update(JSON.stringify(inherited)).digest('hex')
+
+ expect(Object.keys(PT_BR_OVERRIDES)).toHaveLength(260)
- expect(inherited).toHaveLength(413)
++ expect(inherited).toHaveLength(416)
+ // 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('241f027658796cc753f7f81f9e7511c02cc93c4d4480e98c532fe7b47f331beb')
++ expect(fingerprint, 'pt-PT inheritance changed; review the inherited pt-BR wording').toBe('4c32711daa44d6d35d775efd5324036d351b2d6c61d06c734e813b7096f8f704')
+ })
+
+ test('does not leak European Portuguese UI terms', () => {
+ const text = Object.values(ptBR).join('\n')
+ const europeanPortuguese = /(?:^|[^\p{L}])(?:ficheiro\p{L}*|telemóvel\p{L}*|ecrã\p{L}*|regist(?:o|am|ado|ada|ados|adas)|eliminad\p{L}*|definições|cronómetro|detetad\p{L}*|gémeos|abdómen|anca|coifa dos rotadores|escadora|completaste|acabaste|aguentas|definires|completares|aguenta|aguentaste|ficaste|viajares)(?=$|[^\p{L}])/iu
+ expect(text).not.toMatch(europeanPortuguese)
+ expect(text).not.toMatch(/[«»]/u)
+ expect(ptBR.Save).toBe('Salvar')
+ expect(ptBR.Settings).toBe('Configurações')
+ expect(ptBR['Delete workout']).toBe('Excluir treino')
+ expect(ptBR.Superset).toBe('Superset')
+ expect(ptBR['Guest mode — data lives only in this browser.']).toContain('visitante')
+ expect(ptBR['Sign in with passkey']).toContain('chave de acesso')
+ expect(ptBR.band).toBe('elástico')
+ expect(ptBR['resistance band']).toBe('faixa elástica')
+ expect(ptBR.soleus).toBe('sóleo')
+ expect(ptBR.Unpair).toBe('Desvincular')
+ expect(ptBR['Starter plan loaded — Mon Push · Wed Pull · Fri Legs']).toContain('Seg Push · Qua Pull')
+ })
+})
diff --cc frontend/src/locales/de.js
index b853df285,e14a74139..cf90ded98
--- a/frontend/src/locales/de.js
+++ b/frontend/src/locales/de.js
@@@ -597,25 -596,8 +597,30 @@@ export default
'secondary': 'sekundär',
'No exercises with an estimated 1RM yet.': 'Noch keine Übungen mit geschätztem 1RM.',
'Tap a muscle to see its exercises.': 'Tippe auf einen Muskel, um seine Übungen zu sehen.',
+ 'Unpair': 'Trennen',
+
+ // --- equipment profiles ---
+ 'Showing all equipment': 'Alle Geräte werden angezeigt',
+ 'Showing what you have in "{0}"': 'Angezeigt wird, was du in „{0}“ hast',
+ 'Show all equipment': 'Alle Geräte zeigen',
+ 'Filter by "{0}"': 'Nach „{0}“ filtern',
+ 'Edit profile': 'Profil bearbeiten',
+ 'New equipment profile': 'Neues Geräteprofil',
+ 'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': 'Benenne es nach deinem Trainingsort — z. B. „Zuhause“ oder „Gym“ — und hake dann ab, was du dort hast.',
+ 'Profile name': 'Profilname',
+ 'Body-weight exercises are always available, in every profile.': 'Körpergewichtsübungen sind immer verfügbar, in jedem Profil.',
+ '{0} of {1} exercises need equipment outside "{2}"': '{0} von {1} Übungen brauchen Geräte außerhalb von „{2}“',
+ 'Needs {0} — not in your active profile': 'Braucht {0} — nicht in deinem aktiven Profil',
+ 'Filter by equipment': 'Nach Geräten filtern',
+ 'Active profile': 'Aktives Profil',
+ '{0} equipment types': '{0} Gerätearten',
+ 'Add equipment profile': 'Geräteprofil hinzufügen',
+ 'Delete profile?': 'Profil löschen?',
+ '"{0}" and its equipment list will be removed.': '„{0}“ und die zugehörige Geräteliste werden entfernt.',
+ 'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': 'Filtert die Übungsbibliothek und die Auswahl und markiert Übungen in Routinen, die Geräte brauchen, die du im aktiven Profil nicht hast.',
++
++ // --- muscle groups ---
+ 'Primary muscle groups': 'Primäre Muskelgruppen',
+ 'Additional muscle groups': 'Zusätzliche Muskelgruppen',
- 'No explicit muscle group': 'Keine explizite Muskelgruppe',
- 'Unpair': 'Trennen'
++ 'No explicit muscle group': 'Keine explizite Muskelgruppe'
}
diff --cc frontend/src/locales/es.js
index d091fb646,0485a05af..ff9b49b20
--- a/frontend/src/locales/es.js
+++ b/frontend/src/locales/es.js
@@@ -580,25 -579,8 +580,30 @@@ export default
'secondary': 'secundario',
'No exercises with an estimated 1RM yet.': 'Aún no hay ejercicios con 1RM estimado.',
'Tap a muscle to see its exercises.': 'Toca un músculo para ver sus ejercicios.',
+ 'Unpair': 'Desvincular',
+
+ // --- equipment profiles ---
+ 'Showing all equipment': 'Mostrando todo el equipo',
+ 'Showing what you have in "{0}"': 'Mostrando lo que tienes en «{0}»',
+ 'Show all equipment': 'Mostrar todo el equipo',
+ 'Filter by "{0}"': 'Filtrar por «{0}»',
+ 'Edit profile': 'Editar perfil',
+ 'New equipment profile': 'Nuevo perfil de equipo',
+ 'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': 'Ponle el nombre del sitio donde entrenas — p. ej. «Casa» o «Gimnasio» — y marca lo que tienes allí.',
+ 'Profile name': 'Nombre del perfil',
+ 'Body-weight exercises are always available, in every profile.': 'Los ejercicios con peso corporal están siempre disponibles, en todos los perfiles.',
+ '{0} of {1} exercises need equipment outside "{2}"': '{0} de {1} ejercicios necesitan equipo fuera de «{2}»',
+ 'Needs {0} — not in your active profile': 'Necesita {0} — no está en tu perfil activo',
+ 'Filter by equipment': 'Filtrar por equipo',
+ 'Active profile': 'Perfil activo',
+ '{0} equipment types': '{0} tipos de equipo',
+ 'Add equipment profile': 'Añadir perfil de equipo',
+ 'Delete profile?': '¿Eliminar perfil?',
+ '"{0}" and its equipment list will be removed.': '«{0}» y su lista de equipo se eliminarán.',
+ 'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': 'Filtra la biblioteca de ejercicios y el selector, y marca los ejercicios de las rutinas que necesitan algo que no tienes en el perfil activo.',
++
++ // --- muscle groups ---
+ 'Primary muscle groups': 'Grupos musculares primarios',
+ 'Additional muscle groups': 'Grupos musculares adicionales',
- 'No explicit muscle group': 'Sin grupo muscular explícito',
- 'Unpair': 'Desvincular'
++ 'No explicit muscle group': 'Sin grupo muscular explícito'
}
diff --cc frontend/src/locales/fr.js
index db13fd8f6,d8c65d8cc..e91320ec2
--- a/frontend/src/locales/fr.js
+++ b/frontend/src/locales/fr.js
@@@ -580,25 -579,8 +580,30 @@@ export default
'secondary': 'secondaire',
"No exercises with an estimated 1RM yet.": "Aucun exercice avec un 1RM estimé pour l'instant.",
'Tap a muscle to see its exercises.': 'Touchez un muscle pour voir ses exercices.',
+ 'Unpair': 'Dissocier',
+
+ // --- equipment profiles ---
+ 'Showing all equipment': 'Tout l’équipement est affiché',
+ 'Showing what you have in "{0}"': 'Affichage de ce que tu as dans « {0} »',
+ 'Show all equipment': 'Afficher tout l’équipement',
+ 'Filter by "{0}"': 'Filtrer par « {0} »',
+ 'Edit profile': 'Modifier le profil',
+ 'New equipment profile': 'Nouveau profil d’équipement',
+ 'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': 'Nomme-le d’après ton lieu d’entraînement — p. ex. « Maison » ou « Salle » — puis coche ce que tu y as.',
+ 'Profile name': 'Nom du profil',
+ 'Body-weight exercises are always available, in every profile.': 'Les exercices au poids du corps sont toujours disponibles, dans tous les profils.',
+ '{0} of {1} exercises need equipment outside "{2}"': '{0} exercices sur {1} nécessitent un équipement hors de « {2} »',
+ 'Needs {0} — not in your active profile': 'Nécessite {0} — absent de ton profil actif',
+ 'Filter by equipment': 'Filtrer par équipement',
+ 'Active profile': 'Profil actif',
+ '{0} equipment types': '{0} types d’équipement',
+ 'Add equipment profile': 'Ajouter un profil d’équipement',
+ 'Delete profile?': 'Supprimer le profil ?',
+ '"{0}" and its equipment list will be removed.': '« {0} » et sa liste d’équipement seront supprimés.',
+ 'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': 'Filtre la bibliothèque d’exercices et le sélecteur, et signale les exercices de routine qui nécessitent quelque chose que tu n’as pas dans le profil actif.',
++
++ // --- muscle groups ---
+ 'Primary muscle groups': 'Groupes musculaires principaux',
+ 'Additional muscle groups': 'Groupes musculaires supplémentaires',
- 'No explicit muscle group': 'Aucun groupe musculaire explicite',
- 'Unpair': 'Dissocier'
++ 'No explicit muscle group': 'Aucun groupe musculaire explicite'
}
diff --cc frontend/src/locales/hi.js
index a6c56dc24,a9c4d1780..756c2df3c
--- a/frontend/src/locales/hi.js
+++ b/frontend/src/locales/hi.js
@@@ -580,25 -579,8 +580,30 @@@ export default
'secondary': 'द्वितीयक',
'No exercises with an estimated 1RM yet.': 'अभी तक अनुमानित 1RM वाला कोई व्यायाम नहीं।',
'Tap a muscle to see its exercises.': 'व्यायाम देखने के लिए किसी मांसपेशी पर टैप करें।',
+ 'Unpair': 'अलग करें',
+
+ // --- equipment profiles ---
+ 'Showing all equipment': 'सभी उपकरण दिखाए जा रहे हैं',
+ 'Showing what you have in "{0}"': '“{0}” में आपके पास जो है वह दिखाया जा रहा है',
+ 'Show all equipment': 'सभी उपकरण दिखाएँ',
+ 'Filter by "{0}"': '“{0}” से फ़िल्टर करें',
+ 'Edit profile': 'प्रोफ़ाइल संपादित करें',
+ 'New equipment profile': 'नई उपकरण प्रोफ़ाइल',
+ 'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': 'जहाँ आप कसरत करते हैं उसी के नाम पर रखें — जैसे “घर” या “जिम” — फिर वहाँ जो है उसे चुनें।',
+ 'Profile name': 'प्रोफ़ाइल का नाम',
+ 'Body-weight exercises are always available, in every profile.': 'शरीर के वज़न वाली कसरतें हर प्रोफ़ाइल में हमेशा उपलब्ध रहती हैं।',
+ '{0} of {1} exercises need equipment outside "{2}"': '{1} में से {0} कसरतों को “{2}” के बाहर के उपकरण चाहिए',
+ 'Needs {0} — not in your active profile': '{0} चाहिए — आपकी सक्रिय प्रोफ़ाइल में नहीं है',
+ 'Filter by equipment': 'उपकरण से फ़िल्टर करें',
+ 'Active profile': 'सक्रिय प्रोफ़ाइल',
+ '{0} equipment types': '{0} प्रकार के उपकरण',
+ 'Add equipment profile': 'उपकरण प्रोफ़ाइल जोड़ें',
+ 'Delete profile?': 'प्रोफ़ाइल हटाएँ?',
+ '"{0}" and its equipment list will be removed.': '“{0}” और उसकी उपकरण सूची हटा दी जाएगी।',
+ 'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': 'कसरत लाइब्रेरी और चयनकर्ता को फ़िल्टर करता है, और उन रूटीन कसरतों को चिह्नित करता है जिनके लिए सक्रिय प्रोफ़ाइल में मौजूद न होने वाला उपकरण चाहिए।',
++
++ // --- muscle groups ---
+ 'Primary muscle groups': 'प्राथमिक मांसपेशी समूह',
+ 'Additional muscle groups': 'अतिरिक्त मांसपेशी समूह',
- 'No explicit muscle group': 'कोई स्पष्ट मांसपेशी समूह नहीं',
- 'Unpair': 'अलग करें'
++ 'No explicit muscle group': 'कोई स्पष्ट मांसपेशी समूह नहीं'
}
diff --cc frontend/src/locales/it.js
index 3c94aa199,905531566..fdea64e45
--- a/frontend/src/locales/it.js
+++ b/frontend/src/locales/it.js
@@@ -580,25 -579,8 +580,30 @@@ export default
'secondary': 'secondario',
'No exercises with an estimated 1RM yet.': 'Nessun esercizio con 1RM stimato finora.',
'Tap a muscle to see its exercises.': 'Tocca un muscolo per vedere i suoi esercizi.',
+ 'Unpair': 'Separa',
+
+ // --- equipment profiles ---
+ 'Showing all equipment': 'Vengono mostrati tutti gli attrezzi',
+ 'Showing what you have in "{0}"': 'Viene mostrato ciò che hai in “{0}”',
+ 'Show all equipment': 'Mostra tutti gli attrezzi',
+ 'Filter by "{0}"': 'Filtra per “{0}”',
+ 'Edit profile': 'Modifica profilo',
+ 'New equipment profile': 'Nuovo profilo attrezzi',
+ 'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': 'Chiamalo come il posto dove ti alleni — ad es. “Casa” o “Palestra” — poi spunta ciò che hai lì.',
+ 'Profile name': 'Nome del profilo',
+ 'Body-weight exercises are always available, in every profile.': 'Gli esercizi a corpo libero sono sempre disponibili, in ogni profilo.',
+ '{0} of {1} exercises need equipment outside "{2}"': '{0} di {1} esercizi richiedono attrezzi fuori da “{2}”',
+ 'Needs {0} — not in your active profile': 'Richiede {0} — non presente nel profilo attivo',
+ 'Filter by equipment': 'Filtra per attrezzi',
+ 'Active profile': 'Profilo attivo',
+ '{0} equipment types': '{0} tipi di attrezzi',
+ 'Add equipment profile': 'Aggiungi profilo attrezzi',
+ 'Delete profile?': 'Eliminare il profilo?',
+ '"{0}" and its equipment list will be removed.': '“{0}” e il suo elenco di attrezzi verranno rimossi.',
+ 'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': 'Filtra la libreria degli esercizi e il selettore, e segnala gli esercizi delle routine che richiedono qualcosa che non hai nel profilo attivo.',
++
++ // --- muscle groups ---
+ 'Primary muscle groups': 'Gruppi muscolari primari',
+ 'Additional muscle groups': 'Gruppi muscolari aggiuntivi',
- 'No explicit muscle group': 'Nessun gruppo muscolare esplicito',
- 'Unpair': 'Separa'
++ 'No explicit muscle group': 'Nessun gruppo muscolare esplicito'
}
diff --cc frontend/src/locales/ko.js
index 8989c176f,c2acdbfd9..a5c5102f0
--- a/frontend/src/locales/ko.js
+++ b/frontend/src/locales/ko.js
@@@ -580,25 -579,8 +580,30 @@@ export default
'secondary': '보조',
'No exercises with an estimated 1RM yet.': '추정 1RM이 있는 운동이 아직 없습니다.',
'Tap a muscle to see its exercises.': '근육을 눌러 해당 운동을 확인하세요.',
+ 'Unpair': '분리',
+
+ // --- equipment profiles ---
+ 'Showing all equipment': '모든 장비를 표시하는 중',
+ 'Showing what you have in "{0}"': '‘{0}’에 있는 장비를 표시하는 중',
+ 'Show all equipment': '모든 장비 표시',
+ 'Filter by "{0}"': '‘{0}’(으)로 필터',
+ 'Edit profile': '프로필 편집',
+ 'New equipment profile': '새 장비 프로필',
+ 'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': '운동하는 장소의 이름을 붙여 — 예: ‘집’ 또는 ‘헬스장’ — 그곳에 있는 장비를 체크하세요.',
+ 'Profile name': '프로필 이름',
+ 'Body-weight exercises are always available, in every profile.': '맨몸 운동은 모든 프로필에서 항상 사용할 수 있습니다.',
+ '{0} of {1} exercises need equipment outside "{2}"': '{1}개 운동 중 {0}개가 ‘{2}’ 외의 장비를 필요로 합니다',
+ 'Needs {0} — not in your active profile': '{0} 필요 — 활성 프로필에 없음',
+ 'Filter by equipment': '장비로 필터',
+ 'Active profile': '활성 프로필',
+ '{0} equipment types': '장비 종류 {0}가지',
+ 'Add equipment profile': '장비 프로필 추가',
+ 'Delete profile?': '프로필을 삭제할까요?',
+ '"{0}" and its equipment list will be removed.': '‘{0}’과(와) 해당 장비 목록이 삭제됩니다.',
+ 'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': '운동 라이브러리와 선택기를 필터링하고, 활성 프로필에 없는 장비가 필요한 루틴 운동을 표시합니다.',
++
++ // --- muscle groups ---
+ 'Primary muscle groups': '주요 근육 그룹',
+ 'Additional muscle groups': '추가 근육군',
- 'No explicit muscle group': '명시적 근육군 없음',
- 'Unpair': '분리'
++ 'No explicit muscle group': '명시적 근육군 없음'
}
diff --cc frontend/src/locales/pl.js
index 81b5ca5ff,c7347e487..86af3ddbc
--- a/frontend/src/locales/pl.js
+++ b/frontend/src/locales/pl.js
@@@ -580,25 -579,8 +580,30 @@@ export default
'secondary': 'drugorzędny',
'No exercises with an estimated 1RM yet.': 'Brak ćwiczeń z oszacowanym 1RM.',
'Tap a muscle to see its exercises.': 'Dotknij mięśnia, aby zobaczyć jego ćwiczenia.',
+ 'Unpair': 'Rozłącz',
+
+ // --- equipment profiles ---
+ 'Showing all equipment': 'Pokazywany jest cały sprzęt',
+ 'Showing what you have in "{0}"': 'Pokazywane jest to, co masz w „{0}”',
+ 'Show all equipment': 'Pokaż cały sprzęt',
+ 'Filter by "{0}"': 'Filtruj według „{0}”',
+ 'Edit profile': 'Edytuj profil',
+ 'New equipment profile': 'Nowy profil sprzętu',
+ 'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': 'Nazwij go tak jak miejsce, w którym trenujesz — np. „Dom” lub „Siłownia” — a potem zaznacz, co tam masz.',
+ 'Profile name': 'Nazwa profilu',
+ 'Body-weight exercises are always available, in every profile.': 'Ćwiczenia z masą własnego ciała są zawsze dostępne, w każdym profilu.',
+ '{0} of {1} exercises need equipment outside "{2}"': '{0} z {1} ćwiczeń wymaga sprzętu spoza „{2}”',
+ 'Needs {0} — not in your active profile': 'Wymaga: {0} — brak w aktywnym profilu',
+ 'Filter by equipment': 'Filtruj według sprzętu',
+ 'Active profile': 'Aktywny profil',
+ '{0} equipment types': 'Typy sprzętu: {0}',
+ 'Add equipment profile': 'Dodaj profil sprzętu',
+ 'Delete profile?': 'Usunąć profil?',
+ '"{0}" and its equipment list will be removed.': '„{0}” i jego lista sprzętu zostaną usunięte.',
+ 'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': 'Filtruje bibliotekę ćwiczeń i selektor oraz oznacza ćwiczenia w rutynach, które wymagają czegoś, czego nie masz w aktywnym profilu.',
++
++ // --- muscle groups ---
+ 'Primary muscle groups': 'Podstawowe grupy mięśniowe',
+ 'Additional muscle groups': 'Dodatkowe grupy mięśniowe',
- 'No explicit muscle group': 'Brak jawnej grupy mięśniowej',
- 'Unpair': 'Rozłącz'
++ 'No explicit muscle group': 'Brak jawnej grupy mięśniowej'
}
diff --cc frontend/src/locales/pt.js
index 4a287be11,75ec09712..a0d48fa1e
--- a/frontend/src/locales/pt.js
+++ b/frontend/src/locales/pt.js
@@@ -580,25 -579,8 +580,30 @@@ export default
'secondary': 'secundário',
'No exercises with an estimated 1RM yet.': 'Ainda não há exercícios com 1RM estimado.',
'Tap a muscle to see its exercises.': 'Toque num músculo para ver os seus exercícios.',
+ 'Unpair': 'Desfazer',
+
+ // --- equipment profiles ---
+ 'Showing all equipment': 'A mostrar todo o equipamento',
+ 'Showing what you have in "{0}"': 'A mostrar o que tens em «{0}»',
+ 'Show all equipment': 'Mostrar todo o equipamento',
+ 'Filter by "{0}"': 'Filtrar por «{0}»',
+ 'Edit profile': 'Editar perfil',
+ 'New equipment profile': 'Novo perfil de equipamento',
+ 'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': 'Dá-lhe o nome do sítio onde treinas — p. ex. «Casa» ou «Ginásio» — e marca o que tens lá.',
+ 'Profile name': 'Nome do perfil',
+ 'Body-weight exercises are always available, in every profile.': 'Os exercícios com o peso do corpo estão sempre disponíveis, em todos os perfis.',
+ '{0} of {1} exercises need equipment outside "{2}"': '{0} de {1} exercícios precisam de equipamento fora de «{2}»',
+ 'Needs {0} — not in your active profile': 'Precisa de {0} — não está no teu perfil ativo',
+ 'Filter by equipment': 'Filtrar por equipamento',
+ 'Active profile': 'Perfil ativo',
+ '{0} equipment types': '{0} tipos de equipamento',
+ 'Add equipment profile': 'Adicionar perfil de equipamento',
+ 'Delete profile?': 'Eliminar perfil?',
+ '"{0}" and its equipment list will be removed.': '«{0}» e a respetiva lista de equipamento serão removidos.',
+ 'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': 'Filtra a biblioteca de exercícios e o seletor, e assinala os exercícios das rotinas que precisam de algo que não tens no perfil ativo.',
++
++ // --- muscle groups ---
+ 'Primary muscle groups': 'Grupos musculares primários',
+ 'Additional muscle groups': 'Grupos musculares adicionais',
- 'No explicit muscle group': 'Nenhum grupo muscular explícito',
- 'Unpair': 'Desfazer'
++ 'No explicit muscle group': 'Nenhum grupo muscular explícito'
}
diff --cc frontend/src/locales/ru.js
index 63e10fcf9,20788d50b..4d1681897
--- a/frontend/src/locales/ru.js
+++ b/frontend/src/locales/ru.js
@@@ -580,25 -579,8 +580,30 @@@ export default
'secondary': 'вспомогательная',
'No exercises with an estimated 1RM yet.': 'Пока нет упражнений с расчётным 1ПМ.',
'Tap a muscle to see its exercises.': 'Нажмите на мышцу, чтобы увидеть её упражнения.',
+ 'Unpair': 'Разъединить',
+
+ // --- equipment profiles ---
+ 'Showing all equipment': 'Показан весь инвентарь',
+ 'Showing what you have in "{0}"': 'Показано то, что есть в «{0}»',
+ 'Show all equipment': 'Показать весь инвентарь',
+ 'Filter by "{0}"': 'Фильтровать по «{0}»',
+ 'Edit profile': 'Изменить профиль',
+ 'New equipment profile': 'Новый профиль инвентаря',
+ 'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': 'Назови его по месту тренировок — например, «Дом» или «Зал» — и отметь, что там есть.',
+ 'Profile name': 'Название профиля',
+ 'Body-weight exercises are always available, in every profile.': 'Упражнения с собственным весом доступны всегда, в любом профиле.',
+ '{0} of {1} exercises need equipment outside "{2}"': '{0} из {1} упражнений требуют инвентаря вне «{2}»',
+ 'Needs {0} — not in your active profile': 'Нужен инвентарь: {0} — его нет в активном профиле',
+ 'Filter by equipment': 'Фильтровать по инвентарю',
+ 'Active profile': 'Активный профиль',
+ '{0} equipment types': 'Типов инвентаря: {0}',
+ 'Add equipment profile': 'Добавить профиль инвентаря',
+ 'Delete profile?': 'Удалить профиль?',
+ '"{0}" and its equipment list will be removed.': '«{0}» и его список инвентаря будут удалены.',
+ 'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': 'Фильтрует библиотеку упражнений и выбор, а также отмечает упражнения в программах, для которых нужно то, чего нет в активном профиле.',
++
++ // --- muscle groups ---
+ 'Primary muscle groups': 'Основные группы мышц',
+ 'Additional muscle groups': 'Дополнительные мышечные группы',
- 'No explicit muscle group': 'Без явной мышечной группы',
- 'Unpair': 'Разъединить'
++ 'No explicit muscle group': 'Без явной мышечной группы'
}
diff --cc frontend/src/locales/tr.js
index 012f5cc63,5b12b8e2c..d2edcc8d0
--- a/frontend/src/locales/tr.js
+++ b/frontend/src/locales/tr.js
@@@ -580,25 -579,8 +580,30 @@@ export default
'secondary': 'ikincil',
'No exercises with an estimated 1RM yet.': 'Henüz tahmini 1RM olan egzersiz yok.',
'Tap a muscle to see its exercises.': 'Egzersizlerini görmek için bir kas seçin.',
+ 'Unpair': 'Ayır',
+
+ // --- equipment profiles ---
+ 'Showing all equipment': 'Tüm ekipman gösteriliyor',
+ 'Showing what you have in "{0}"': '“{0}” içinde sahip olduklarını gösteriyor',
+ 'Show all equipment': 'Tüm ekipmanı göster',
+ 'Filter by "{0}"': '“{0}” ile filtrele',
+ 'Edit profile': 'Profili düzenle',
+ 'New equipment profile': 'Yeni ekipman profili',
+ 'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': 'Antrenman yaptığın yerin adını ver — örn. “Ev” veya “Spor salonu” — sonra orada nelerin olduğunu işaretle.',
+ 'Profile name': 'Profil adı',
+ 'Body-weight exercises are always available, in every profile.': 'Vücut ağırlığı hareketleri her profilde her zaman kullanılabilir.',
+ '{0} of {1} exercises need equipment outside "{2}"': '{1} hareketten {0} tanesi “{2}” dışında ekipman gerektiriyor',
+ 'Needs {0} — not in your active profile': '{0} gerekiyor — aktif profilinde yok',
+ 'Filter by equipment': 'Ekipmana göre filtrele',
+ 'Active profile': 'Aktif profil',
+ '{0} equipment types': '{0} ekipman türü',
+ 'Add equipment profile': 'Ekipman profili ekle',
+ 'Delete profile?': 'Profil silinsin mi?',
+ '"{0}" and its equipment list will be removed.': '“{0}” ve ekipman listesi kaldırılacak.',
+ 'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': 'Hareket kitaplığını ve seçiciyi filtreler, ayrıca aktif profilinde olmayan bir şeye ihtiyaç duyan rutin hareketlerini işaretler.',
++
++ // --- muscle groups ---
+ 'Primary muscle groups': 'Birincil kas grupları',
+ 'Additional muscle groups': 'Ek kas grupları',
- 'No explicit muscle group': 'Açık kas grubu yok',
- 'Unpair': 'Ayır'
++ 'No explicit muscle group': 'Açık kas grubu yok'
}
diff --cc frontend/src/locales/zh.js
index ac9a643e8,bb0f972d6..594d4f697
--- a/frontend/src/locales/zh.js
+++ b/frontend/src/locales/zh.js
@@@ -580,25 -579,8 +580,30 @@@ export default
'secondary': '次要',
'No exercises with an estimated 1RM yet.': '暂无估算1RM的动作。',
'Tap a muscle to see its exercises.': '点击肌肉查看其动作。',
+ 'Unpair': '取消组合',
+
+ // --- equipment profiles ---
+ 'Showing all equipment': '正在显示全部器械',
+ 'Showing what you have in "{0}"': '正在显示你在“{0}”拥有的器械',
+ 'Show all equipment': '显示全部器械',
+ 'Filter by "{0}"': '按“{0}”筛选',
+ 'Edit profile': '编辑配置',
+ 'New equipment profile': '新建器械配置',
+ 'Name it after where you train — e.g. "Home" or "Gym" — then check what you have there.': '用你训练的地点命名 —— 例如“家里”或“健身房”—— 然后勾选你在那里有的器械。',
+ 'Profile name': '配置名称',
+ 'Body-weight exercises are always available, in every profile.': '自重动作在每个配置中都始终可用。',
+ '{0} of {1} exercises need equipment outside "{2}"': '{1} 个动作中有 {0} 个需要“{2}”之外的器械',
+ 'Needs {0} — not in your active profile': '需要{0} —— 不在你的当前配置中',
+ 'Filter by equipment': '按器械筛选',
+ 'Active profile': '当前配置',
+ '{0} equipment types': '{0} 种器械',
+ 'Add equipment profile': '添加器械配置',
+ 'Delete profile?': '删除配置?',
+ '"{0}" and its equipment list will be removed.': '“{0}”及其器械清单将被删除。',
+ 'Filters the exercise library and picker, and flags routine exercises that need something you don’t have in the active profile.': '筛选动作库和选择器,并标记训练计划中需要当前配置里没有的器械的动作。',
++
++ // --- muscle groups ---
+ 'Primary muscle groups': '主要肌群',
+ 'Additional muscle groups': '其他肌群',
- 'No explicit muscle group': '无明确肌群',
- 'Unpair': '取消组合'
++ 'No explicit muscle group': '无明确肌群'
}
diff --cc frontend/src/sheets.jsx
index 9327b7657,84997aeec..d8562efb3
--- a/frontend/src/sheets.jsx
+++ b/frontend/src/sheets.jsx
@@@ -12,10 -11,10 +12,10 @@@ import { starterRoutines } from './lib/
import Media, { Thumb } from './components/Media.jsx'
import Stepper from './components/Stepper.jsx'
import Icon from './components/Icon.jsx'
- import { Button, Slider, Switch, Segmented, SelectRow, Row, TextField } from './components/ui.jsx'
-import { Button, Slider, Switch, Segmented, SelectRow, Row, MultiSelectRow } from './components/ui.jsx'
++import { Button, Slider, Switch, Segmented, SelectRow, Row, TextField, MultiSelectRow } from './components/ui.jsx'
import { glyphOf, GLYPH_GROUPS, DEFAULT_GLYPH } from './lib/glyphs.js'
import BodyMap from './components/BodyMap.jsx'
- import { exerciseMuscleSnapshot, loadOfWorkouts } from './lib/muscles.js'
+ import { exerciseMuscleSnapshot, loadOfWorkouts, MUSCLES, MUSCLE_NAME, normalizeMuscleGroups, hasExplicitMuscleMetadata } from './lib/muscles.js'
import { parseImport, mergeImport } from './lib/import-csv.js'
import { buildPlanBundle, parsePlan, mergePlan, printPlan } from './lib/plan-share.js'
import { estimate1RM, best1RM, is1RMRecord, REP_CAP } from './lib/onerm.js'