The cardio target keeps its translation now that it goes through MUSCLE_NAME — "Cardiovascular system" in all 14 packs (QA C9 follow-up)

Routing the target through MUSCLE_NAME (2bf86a5) mapped "cardiovascular system" to the display
name "Cardiovascular system", which no pack carried — only the lowercase dataset key had a
translation. Every built-in cardio exercise (29 in the dataset, plus custom cardio) therefore fell
back to English in the picker row, the routine config sheet and the workout tag, where the parent
build already said "Herz-Kreislauf". The display name now carries the same translation each pack
had for the dataset key (pt-BR inherits it from pt-PT like the other muscle names; fingerprint
regenerated: 648 inherited). That also cures the Library row and the detail sheet, which mapped
through MUSCLE_NAME before this branch and leaked English there all along.

Regression tests: picker row + config sheet (sheets.muscle-names.test.jsx) and the workout tag
(Workout.test.jsx) for burpee 1160 in German, both failing before this change. Rig check on the
branch build (slot 71, de): configTags Cardio/Herz-Kreislauf/Körpergewicht, picker row
"burpee — Herz-Kreislauf · Körpergewicht", workout tags identical to the config tags, Library row
"Herz-Kreislauf · Körpergewicht", detail sheet Cardio/Herz-Kreislauf/Körpergewicht/…
This commit is contained in:
Duarte Santos committed 2026-09-19 21:34:30 +02:00
1 parent 2bf86a5318
commit 6796e559d3
16 files changed
+43 -2

No files matched your search

+14
View File
@@ -96,6 +96,20 @@ describe('muscle names in the rows and tags (QA C9)', () => {
expect(rowFor(host, 'QA Custom Thrust').querySelector('.ss').textContent).toBe('Gesäß · Langhantel')
})
// The dataset's cardio target "cardiovascular system" is both a map id and a translated key
// of its own. Routing it through MUSCLE_NAME must not cost it its translation: the 29
// built-in cardio exercises read "Herz-Kreislauf" in German, never "Cardiovascular system".
it('keeps the cardio target translated (burpee, de)', () => {
_setLangState('de', de, null, null)
exercisePicker(vi.fn())
const host = renderTop()
act(() => type(host.querySelector('input.input'), 'burpee'))
expect(rowFor(host, 'burpee').querySelector('.ss').textContent).toBe('Herz-Kreislauf · Körpergewicht')
exConfigSheet(EXIDX['1160'], null, vi.fn())
const tags = [...renderTop().querySelectorAll('.tag')].map(e => e.textContent.trim())
expect(tags).toEqual(['Cardio', 'Herz-Kreislauf', 'Körpergewicht'])
})
it('Muscles explorer row names the target the same way', () => {
seed(custom())
const host = render(<MuscleExplorer onDetail={vi.fn()} onPlan={vi.fn()} />)