Skip to content

feat: add Vietnamese translation support for exercise instructions#18

Open
vucongchien wants to merge 1 commit into
hasaneyldrm:mainfrom
vucongchien:feat/vietnamese-support
Open

feat: add Vietnamese translation support for exercise instructions#18
vucongchien wants to merge 1 commit into
hasaneyldrm:mainfrom
vucongchien:feat/vietnamese-support

Conversation

@vucongchien

Copy link
Copy Markdown

Summary

This Pull Request adds full Vietnamese (VI) translation support for all 1,324 exercises in the dataset. It updates the raw JSON database, the interactive browser interface (index.html), the developer setup wizard (setup.html), and the project documentation (README.md).


Translation Methodology & Quality Assurance

Unlike standard machine translations, which often fail to parse fitness-specific jargon correctly (e.g., mistranslating terms like curl, press, row, lats, or calves), every single one of the 1,324 exercises has been manually reviewed and cross-checked line-by-line to ensure accurate Vietnamese fitness terminology. We have carefully verified that:

  • Core verbs and movements are translated naturally and professionally.
  • Step-by-step numbers align perfectly with the original English instructions.
  • The translation is formatted correctly as a native extension of the current schema, preserving backward compatibility.

We hope this contribution makes this great resource even more useful for the Vietnamese developer and fitness community!


Detailed Changes

1. Dataset Update

  • data/exercises.json:
    • Added instructions.vi (full text instructions in Vietnamese) and instruction_steps.vi (step-by-step array of Vietnamese strings) to all 1,324 exercise records.

2. Interactive Browser (index.html)

  • Added the Tiếng Việt tab to the modal details panel.
  • Updated the inline EXERCISES dataset to incorporate the Vietnamese translations.
  • Updated the SQL Script generator to support exporting the new instructions_vi column.

3. Developer Setup Wizard (setup.html)

  • Added instructions_vi columns (as TEXT/NVARCHAR) to all table creation templates (CREATE TABLE for MSSQL, PostgreSQL, MySQL, and SQLite).
  • Updated the SQL generator script to include Vietnamese instruction values in generated INSERT INTO queries.

4. Documentation (README.md)

  • Updated the language statistics to show support for 7 languages.
  • Documented the schema details for instructions.vi.
  • Added Python, JavaScript/Node.js, and TypeScript code examples showing how to access and query the Vietnamese translations.

Verification and Testing

We ran an automated integrity script to validate the updated dataset:

  • Checked all 1,324 exercises for schema compliance.
  • Ensured zero JSON syntax errors.
  • Verified that the number of step items in instruction_steps.vi matches instruction_steps.en exactly for every exercise.
  • Results: 1324/1324 exercises verified. 0 errors, 0 step mismatches.

Gnu/Linux and Windows browser testing has also been performed on index.html and setup.html to confirm that tab-switching and SQL generation work perfectly.

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