Localization: 12 UI languages + exercise instructions in 10 (#7)

Adds a Language setting (Settings → Appearance) that translates the whole
app: a tiny dependency-free i18n layer (English source strings as keys,
per-language dictionaries in frontend/src/locales/) plus per-language
exercise-instruction packs generated from the upstream dataset
(frontend/src/instr/, via scripts/build-instructions.mjs).

UI: en, de, es, fr, it, pt, pl, tr, ru, zh, ko, hi. Instructions: all of
those except de/pt (not in the upstream dataset — fall back to English).
Body-part/equipment/muscle labels and date formats are localized too;
exercise names stay English (upstream limitation).

Everything is lazy-loaded per language (Vite code-splitting), so the
initial bundle is unchanged; the choice syncs with the profile like the
theme. Closes #7.
This commit is contained in:
Duarte Santos committed 2026-07-21 21:45:24 +02:00
1 parent b9f8d18bbd
commit c05b0756ec
44 files changed
+3891 -274

No files matched your search

+6 -4
View File
@@ -5,9 +5,11 @@ openGym's own code is licensed under the **GNU AGPL v3.0** (see [LICENSE](LICENS
## Exercise data & media
The exercise names, instructions, images and animations (fetched into `media/` at build time and
indexed in `frontend/src/lib/exercises-data.js`) come from
The exercise names, instructions (English in `frontend/src/lib/exercises-data.js`, other
languages in `frontend/src/instr/`, regenerated via `scripts/build-instructions.mjs`), images
and animations (fetched into `media/` at build time) come from
[**hasaneyldrm/exercises-dataset**](https://github.com/hasaneyldrm/exercises-dataset)
and are **not** covered by openGym's AGPL license — they remain under that dataset's own terms.
This media is not distributed in this repository; it is downloaded from the upstream source on
first run. If you redistribute openGym with the media included, review the upstream license first.
The media files are not distributed in this repository; they are downloaded from the upstream
source on first run. If you redistribute openGym with the media included, review the upstream
license first.