Skip to content

Add French (fr) exercise instructions#44

Open
umutcakirai wants to merge 2 commits into
hasaneyldrm:mainfrom
umutcakirai:add-french-instructions
Open

Add French (fr) exercise instructions#44
umutcakirai wants to merge 2 commits into
hasaneyldrm:mainfrom
umutcakirai:add-french-instructions

Conversation

@umutcakirai

Copy link
Copy Markdown

Adds a tenth language — French (fr) — to all 1,324 exercises: instructions.fr and instruction_steps.fr, plus the JSON Schema, README, index.html viewer and setup.html.

Register

The dataset's existing translations all use the informal second-person imperative. French follows suit (tutoiement, not vouvoiement):

en Lie flat on your back with your knees bent and feet flat on the ground.
es Túmbate sobre tu espalda con las rodillas flexionadas…
it Sdraiati sulla schiena con le ginocchia piegate…
pl Połóż się płasko na plecach, ugnij kolana…
fr Allonge-toi sur le dos, les genoux fléchis et les pieds à plat au sol.

How it was produced

The 7,710 English step sentences deduplicate to 4,414 unique strings. Those were translated (LLM-assisted, glossary-constrained, then audited), and each exercise's instruction_steps.fr was rebuilt deterministically by mapping its English steps back through that table. instructions.fr is the join of instruction_steps.fr, so the two cannot drift apart.

A fixed glossary pinned the recurring terminology so it stays consistent across all 1,324 records instead of varying sentence to sentence:

repetitionsrépétitions · starting positionposition de départ · dumbbellhaltère · barbellbarre · your coresangle abdominale · shoulder bladesomoplates · shoulder-width apartécartés à la largeur des épaules

Term-fidelity audit over the translated corpus: repetitions 88/88, starting position 562/562, dumbbell 530/530, shoulder blades 107/107, kettlebell 127/127, bench 299/299, your core 213/213, shoulder-width apart 398/398.

Verified

Check Result
1,324 records validate against the updated schema 0 errors
Record missing fr → rejected by schema 2 errors (as intended)
len(instruction_steps.fr) == len(instruction_steps.en) 1324/1324
instructions.fr == ' '.join(instruction_steps.fr) 1324/1324
Every pre-existing field byte-identical (fr purely additive) 1324/1324
Empty fr strings / left in English 0 / 0
Vouvoiement leakage across 7,710 steps 0
index.html embed still equals data/exercises.json

The step-count parity check is the dataset's own invariant — it already holds for all nine existing languages, so fr had to hold it too.

The viewer was loaded in a browser: the language picker renders Français as the tenth tab and the steps display correctly, no console errors.

Note on the schema

This branch is stacked on #43 (which adds the already-shipped hi/pl/ko to the schema's language maps), so the schema here declares all ten languages. If #43 merges first this rebases cleanly; if this merges first, #43 becomes redundant and can be closed.

Caveat

These are machine translations, reviewed programmatically rather than by a native speaker. The terminology and register are consistent and the invariants hold, but I'd welcome a native-speaker pass on the wording — happy to adjust anything.

The schema was added before the Hindi (73b0c68) and Polish/Korean
(118e4bd) instructions landed, so languageMap and languageStepsMap
still only declared en, es, it, tr, ru, zh.

All 1,324 records carry all nine languages and the README documents
nine, but `additionalProperties` let hi/pl/ko through unvalidated and
unrequired — a record silently missing them still passed validation.

Declare all nine in `properties` and `required` for both maps.
Verified: the 1,324 records validate cleanly against the updated
schema, and a record missing hi/pl/ko is now rejected.
Adds a tenth language to all 1,324 exercises: `instructions.fr` and
`instruction_steps.fr`, plus the schema, README, viewer and setup guide.

Register matches the existing Spanish/Italian/Polish translations —
informal second-person imperative (tutoiement):

  en: Lie flat on your back with your knees bent and feet flat on the ground.
  fr: Allonge-toi sur le dos, les genoux fléchis et les pieds à plat au sol.

How it was produced
-------------------
The 7,710 English step sentences deduplicate to 4,414 unique strings.
Those were translated (LLM-assisted, glossary-constrained, then audited),
and the per-exercise arrays were rebuilt deterministically by mapping each
English step back through that table. `instructions.fr` is the join of
`instruction_steps.fr`, so the two can never drift.

A fixed glossary pinned the recurring terms — répétitions, position de
départ, haltère/barre, sangle abdominale, omoplates, largeur des épaules —
so terminology is consistent across all 1,324 records rather than varying
sentence by sentence.

Verified
--------
- 1,324 records validate against the updated schema; a record missing `fr`
  is now rejected.
- fr step count == en step count in every record (the dataset's existing
  invariant across all nine prior languages).
- instructions.fr == ' '.join(instruction_steps.fr) in every record.
- Every pre-existing field is byte-identical; `fr` is purely additive.
- No empty strings, none left in English, no vouvoiement across 7,710 steps.
- index.html embed stays in sync with data/exercises.json; the language
  picker renders "Français" and the steps display correctly.

Note for review: these are machine translations, reviewed programmatically
rather than by a native speaker. Happy to adjust any wording.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant