Merge fixes-0917 into fix/custom-muscles: the cardio label translates through one key (QA C9 follow-up)

Both sides cured the same English "Cardiovascular system" for the built-in cardio exercises:
this branch (6796e55) added a capitalised "Cardiovascular system" key to the 13 translated packs,
fix/copy (10ff64b, merged into fixes-0917) made MUSCLE_NAME['cardiovascular system'] lowercase so
the packs' existing dataset key translates it and the places that show it capitalise with CSS.
One mechanism is enough: the lowercase key stays, the 13 capitalised duplicates go, and the pt-BR
guard is back at fixes-0917's numbers (645 overrides, 647 inherited, fingerprint 185cca3d…,
regenerated with scripts/pt-br-inheritance-fingerprint.mjs). The locale packs are now identical
to fixes-0917; the branch's own changes (C10 target = first-tapped primary, C9 MUSCLE_NAME at the
picker row, config sheet, Muscles rows and workout tag) merge cleanly on top.
This commit is contained in:
Duarte Santos committed 2026-09-20 02:19:30 +02:00
commit 185afe6a96
51 files changed
+1041 -99

No files matched your search

+5 -5
View File
@@ -1,9 +1,9 @@
import { useEffect, useMemo, useRef, useState } from 'react'
import { useStore } from './store/useStore.js'
import { useUI } from './store/useUI.js'
import { EXDB, EXIDX, BODYPARTS, isCardio, isBodyweightEq, allExercises, equipmentOf, smOf, matchExercise, exOr } from './lib/exercises.js'
import { EXDB, EXIDX, BODYPARTS, isCardio, isBodyweightEq, allExercises, equipmentOf, smOf, searchExercises, exOr } from './lib/exercises.js'
import { activeProfile, exAvailable, ALL_EQUIPMENT, newProfile } from './lib/equipment.js'
import { fmtDate, fmtNum, capWords, fmtVol, fmtDur, durPart, todayISO, isoOf, uid, exCount, DAYN, DAYS, weekOrder, weekStartOf, weekDayOffset, MONTHS_LONG, ACCENTS } from './lib/format.js'
import { fmtDate, fmtNum, capWords, fmtVol, fmtDur, durPart, todayISO, isoOf, uid, exCount, routineCount, DAYN, DAYS, weekOrder, weekStartOf, weekDayOffset, MONTHS_LONG, ACCENTS } from './lib/format.js'
import { lastEntryFor, bestWeightFor, bestWeightForEntry, buildSets, effectiveRoutineIds, workoutVolume, setsDone, setsDoneActive, setUnitsTotal, lastBW, supersetUnits, unitOf, setLabel, defaultConfig, cleanupSg, modeOf, effortOf, EFFORT, capEffort, stepEffort, isBw, isPerSide, sideReps, workSetsDone, applyIntensifierPlan, MAX_PLANNED_WARMUPS, NOTE_MAX } from './lib/history.js'
import { usesBar, barWeightFor, defaultBarWeight, hasBarOverride } from './lib/bar.js'
import { toScale, rirOf, EFFORT_PRESETS, effortColor } from './lib/effort.js'
@@ -891,7 +891,7 @@ function ExercisePicker({ onPick, close }) {
const all = allExercises(st)
const profile = activeProfile(st)
const inScope = e => bp === '★' ? usage[e.id] : bp === '☆' ? isFav(st, e.id) : (!bp || e.bp === bp)
let base = all.filter(e => inScope(e) && matchExercise(e, q))
let base = searchExercises(all.filter(inScope), q)
if (bp === '★') base = [...base].sort((a, b) => (usage[b.id] - usage[a.id]) || exerciseNameFor(a).localeCompare(exerciseNameFor(b)))
const eqFiltered = (profile && !showAll) ? base.filter(e => exAvailable(st, e)) : base
const eqOpts = equipmentOf(eqFiltered)
@@ -1523,13 +1523,13 @@ function PlanImport({ bundle, close }) {
const apply = () => {
update(s => mergePlan(s, bundle, { schedule }))
close()
toast(t('Added {0} routines to your plan', bundle.routineCount))
toast(t(bundle.routineCount === 1 ? 'Added {0} routine to your plan' : 'Added {0} routines to your plan', bundle.routineCount))
nav('/plan')
}
return <>
<h3>{bundle.name ? t('Import “{0}”', bundle.name) : t('Import this plan')}</h3>
<div className="muted small" style={{ marginBottom: 14 }}>
{t(bundle.routineCount === 1 ? '{0} routine' : '{0} routines', bundle.routineCount)}
{routineCount(bundle.routineCount)}
{' · ' + exCount(bundle.exerciseCount)}
{bundle.scheduledDays > 0
? ' · ' + t(bundle.scheduledDays === 1 ? 'scheduled on {0} day' : 'scheduled on {0} days', bundle.scheduledDays)