Skip to content

Exercise-name packs for it/de/es/fr plus two per-language English-name toggles - #254

Merged
DuarteSantos8 merged 1 commit into
DuarteSantos8:mainfrom
giulioleuci:exercises-name
Sep 28, 2026
Merged

DuarteSantos8 merged 1 commit into
DuarteSantos8:mainfrom
giulioleuci:exercises-name

Conversation

@giulioleuci

@giulioleuci giulioleuci commented Sep 19, 2026 •

Copy link
Copy Markdown
Contributor

Closes #253

Summary

Adds complete exercise-name packs for Italian (it), German (de), Spanish (es) and French (fr) — each translating the full 1,324-exercise built-in catalogue — plus two independent per-language toggles in Settings:

  • "English exercise names" — the "(English)" parenthetical that follows translated names, now a per-language setting (previously always shown for the newly added languages).
  • "English names only" — replaces the translated name with the original English one; while it is on, the parenthetical toggle is disabled for that language since the English name is already the displayed one.

Languages that already had translated packs (pt-BR, hu) are unaffected; each language remembers its own choice; de-CH keeps inheriting the German pack through the existing derivePack transform (ß→ss), so no extra pack to maintain.

What changes

  1. Exercise-name packs — every pack is generated by a build script from an authored JSON source (scripts/exercise-name-sources/*.json → scripts/build-*-exercise-names.mjs → frontend/src/exercise-names/*.js). The scripts fail hard on unknown ids, empty values or an incomplete count. Each pack ships a unit test asserting full catalogue coverage plus per-language translation rules (barbell→Langhantel/barra/barre/... dumbbell→Kurzhantel/mancuerna/haltère/... etc.).

  2. Per-language "(English name)" toggle (#253, point 2) — the English parenthetical that follows translated exercise names is now a per-language user setting:

    • persisted per-language map (DEF.enParens = {}) in the store, defaulting to shown so existing profiles keep today's rendering;
    • Settings shows a single adaptive switch bound to the active language, remembered separately for each language;
    • the toggle row is hidden for languages without an exercise pack, so the option never appears for languages that cannot use it;
    • the app re-applies the exercise-name rendering when the setting changes.
  3. New "English names only" per-language toggle — drops the translation entirely and shows the original English name. Since the parenthetical is redundant in this mode, the "English exercise names" switch is disabled (greyed out) while it is active. The two labels are translated in all 14 packs.

  4. i18n — the new Settings labels are translated in all 14 locale packs (including a Brazilian-Portuguese override), with a locale-coverage.test.js asserting the keys exist and are non-blank in every shipped pack.

Notes on translations

The exercise names in the it/de/es/fr packs were translated from English by an LLM (OpenCode Zen), then reviewed against the exercise catalogue. Please give them a native-speaker pass before relying on them in production.

Tests

Full frontend suite passes: 131 files / 1,611 tests (same Node 22 runtime as the CI gate). No new dependencies.

Issue

Fixes #253 — exercise-name packs for it/de/es/fr plus the per-language "English name in parentheses" toggle and a companion "English names only" toggle.

@giulioleuci

Copy link
Copy Markdown
Contributor Author

Implement #253

ilirhushi added a commit to ilirhushi/openGym that referenced this pull request Sep 20, 2026
The upstream name packs (DuarteSantos8#245, DuarteSantos8#254, DuarteSantos8#266) only cover the 1,324 exercises
shared with upstream; this fork's own 9 additions (landmine row, pike
push-up, nordic hamstring curl, meadows row, bird dog, band clamshell,
deficit deadlift, band pull-apart, copenhagen plank) had no translation
in any of the newly-added languages, failing each pack's completeness
test.
ilirhushi added a commit to ilirhushi/openGym that referenced this pull request Sep 20, 2026
…e toggles

Adds complete exercise-name packs for Italian, German, Spanish and French from
authored JSON sources, generated by fail-fast build scripts and covered by
unit tests asserting full catalogue coverage plus per-language translation
rules. Languages without a pack keep today's rendering.

Alongside the existing per-language "English name in parentheses" toggle,
adds an "English names only" toggle that replaces the translated name with
the original English one; while it is on, the parenthetical toggle is
disabled for that language. The two Settings labels are translated in all 14
locale packs, with new locale-coverage tests.

No new dependencies.
@giulioleuci giulioleuci changed the title Exercise-name packs for it/de/es/fr plus a per-language "English name in parentheses" toggle Exercise-name packs for it/de/es/fr plus two per-language English-name toggles Sep 21, 2026
@DuarteSantos8
DuarteSantos8 merged commit d6d361a into DuarteSantos8:main Sep 28, 2026
DuarteSantos8 added a commit that referenced this pull request Sep 28, 2026
…anish and Russian packs too, an English-only name is title-cased again, and the stray ISSUE_ON_GITHUB.md is gone
@DuarteSantos8

Copy link
Copy Markdown
Owner

Thanks @giulioleuci. From this PR the Italian and French name packs and the two per-language toggles (English in parentheses / English only) are in v1.3.9.

I didn't take your German and Spanish packs: German comes from #290 (@mkoester, partly native-reviewed) and Spanish from #245 (@AlexRomero12, opened first). Your toggles work with those packs and with Russian (#266) as well. I also removed the stray ISSUE_ON_GITHUB.md, and an English-only name is title-cased again.

If you know an Italian or French speaker who could read through the names, a review PR would be very welcome.

Released in v1.3.9: https://github.com/DuarteSantos8/openGym/releases/tag/v1.3.9

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.

[feat] Exercise-name packs for it/de/es/fr plus a per-language "English name in parentheses" toggle

2 participants