Muscle names in the picker row, config sheet, Muscles rows and the workout tag go through MUSCLE_NAME — "gluteal", "forearm" and "hip-flexors" leaked as raw ids, and "forearm" stayed English in German (QA C9)

Custom exercises and the batch-1/Olympic metadata (#207) name muscles by the map's ids, for which
only the display names in MUSCLE_NAME have translations. The detail sheet and the Library row
already mapped through it; the picker row subtitle, the routine config sheet tags, the Muscles
explorer rows and the tag under the exercise name in a workout translated the id directly.

Rig check on the branch build (slot 71, en + de): picker row "Glutes · barbell" / "Gesäß · Langhantel",
custom config tags Glutes/barbell/Forearms/Hip flexors, power clean config tags in German
Beinbeuger/Langhantel/Waden/Unterarme/Schultern, Muscles > Glutes "Primary target · Glutes · barbell",
workout tag "Glutes" / "Gesäß".
This commit is contained in:
Duarte Santos committed 2026-09-19 21:17:20 +02:00
1 parent cc116bdbcc
commit 2bf86a5318
5 files changed
+131 -6

No files matched your search

+6 -4
View File
@@ -946,7 +946,7 @@ function ExercisePicker({ onPick, close }) {
<div className="grow"><div className="tt">{t('Create your own exercise')}</div><div className="ss">{t('name + body part, no animation')}</div></div><Icon name="plus" className="chev" />
</div>}
{f.slice(0, shown).map(e => <div key={e.id} className="item" {...tappable(() => onPick(e))}>
<Thumb ex={e} /><div className="grow"><div className="tt capitalize">{isFav(st, e.id) && <Icon name="starFill" className="fav-star" />}{exerciseNameFor(e)}</div><div className="ss capitalize">{t(e.tg || e.bp)} · {t(e.eq)}</div></div>
<Thumb ex={e} /><div className="grow"><div className="tt capitalize">{isFav(st, e.id) && <Icon name="starFill" className="fav-star" />}{exerciseNameFor(e)}</div><div className="ss capitalize">{t(MUSCLE_NAME[e.tg] || e.tg || e.bp)} · {t(e.eq)}</div></div>
{/* Accent tag = already in a routine/log ("Chosen"); the yellow star by the name = favourite. */}
{usage[e.id] && <span className="tag acc"><Icon name="starFill" /></span>}
{/* A "+" glyph reads as "add this now" — it used to just open the same detail sheet as
@@ -1225,12 +1225,14 @@ function ExConfig({ ex, existing, onSave, onDelete, close, routine, initial }) {
<Media ex={ex} />
{/* The same tags the exercise detail sheet shows, secondaries included: choosing what goes
into a plan is exactly when "what else does this hit" matters, and until now that was
only visible from the Exercises tab, after the fact. */}
only visible from the Exercises tab, after the fact. Custom exercises and the newer
metadata name muscles by the map's ids ("forearm", "gluteal"), which only MUSCLE_NAME
turns into a translatable label. */}
<div className="row" style={{ gap: 6, flexWrap: 'wrap', margin: '10px 0 14px' }}>
{cardio && <span className="tag acc"><Icon name="figureRun" />{t('Cardio')}</span>}
<span className="tag">{t(ex.tg || ex.bp)}</span><span className="tag">{t(ex.eq)}</span>
<span className="tag">{t(MUSCLE_NAME[ex.tg] || ex.tg || ex.bp)}</span><span className="tag">{t(ex.eq)}</span>
{!cardio && (ex.secondaries?.length ? ex.secondaries : smOf(ex)).slice(0, 3)
.map((s, i) => <span key={i} className="tag dim">{t(s)}</span>)}
.map((s, i) => <span key={i} className="tag dim">{t(MUSCLE_NAME[s] || s)}</span>)}
</div>
{ex.desc && <div className="exnote">{ex.desc}</div>}
{!cardio && <div style={{ marginBottom: 14 }}>