Skip to content

Add Bengali exercise instructions#54

Open
rarhs wants to merge 1 commit into
hasaneyldrm:mainfrom
rarhs:add-bengali
Open

Add Bengali exercise instructions#54
rarhs wants to merge 1 commit into
hasaneyldrm:mainfrom
rarhs:add-bengali

Conversation

@rarhs

@rarhs rarhs commented Jul 14, 2026

Copy link
Copy Markdown

Adds Bengali (bn) as the 10th instruction language, following the Hindi (#42) and Polish/Korean (118e4bd) convention: nested instructions.bn + instruction_steps.bn on all 1,324 records, no flat *_bn fields.

Updates data/exercises.json, the embedded EXERCISES blob and SQL schemas/INSERT builder in index.html, the same in setup.html plus its LLM-prompt field list, and the README (9 → 10 languages).

Verification: validates against data/exercises.schema.json (1,324 records, zero errors); both copies of the data are byte-identical; purely additive — stripping bn reproduces the previous data byte-for-byte, with every attribution field intact.

Translations are AI-assisted and haven't had a native-speaker review yet — happy to revise terminology or register if you have preferences.

@riju568

riju568 commented Jul 16, 2026

Copy link
Copy Markdown
  1. JSON Data & Schema Validation Failures
    The main components of the project lie in data/exercises.json, which should validate against the schema in data/exercises.schema.json, and the common mistakes include:

(a.)Exercise Language Not Found:If you added or altered an exercise instruction at instruction., then you have also toadd an identical instruction string arrayatinstruction_steps.. If the one exist and the other don't then the schema validator and the build will break.

(b.)Schema Drift: If you are introducing a completely new language (like French fr), you have to update data/exercises.schema.json to allow fr under the language pattern maps. If you don't, the automated dataset validator (added in PR #36) will reject it.

(c.)Trailing Commas / Invalid JSON Syntax. One missing or misplaced comma in a large 1,324 element JSON file would prevent it from being parsed entirely.

  1. Media Asset & Path Issues:
    This dataset uses very strict matching rules for both the animation GIF and thumbnail media:

(a.)Path Format: The value for the image and gifurl fields within the JSON structure need to be represented as relative paths. (E.g., images/0001-2gPfomN.jpg rather than http://site.net/images/0001-2gPfomN.jpg) If you fail to align the image name along with the mediaid field, you'll get failed image rendering issues.

  1. Front-end Integration (index.html & setup.html)
    If the PR touches the interactive browser or developer setup tools:

(a.)UI Dropdown Sync: Whenever a language is added, you need to update the menus inside index.html for language selection and filtering by client side

(b.)Template Mismatch: The client-side script that auto-generates SQL for users will break if either the structure of the database generation script or the live LLM prompt in setup.html is modified.

Adds instructions.bn and instruction_steps.bn to all 1,324 records in
both data/exercises.json and the EXERCISES blob in index.html, registers
Bengali in the browser UI language tabs, and updates the README
(language count 10 -> 11, schema table, sample record, usage examples).

Following the precedent of hasaneyldrm#43/hasaneyldrm#44, bn is added to the JSON Schema
language maps as a required language.

Also adds the instructions_fr / instructions_bn columns to the SQL
templates and insert generator in setup.html — the French PR (hasaneyldrm#44) had
updated the LLM prompt but not the SQL generation, so generated SQL
silently dropped French text.
@rarhs

rarhs commented Jul 16, 2026

Copy link
Copy Markdown
Author

Thanks for the checklist, @riju568! Quick summary of where this PR stands on each point:

  1. Data & schema — All 1,324 records carry both instructions.bn and instruction_steps.bn, in both copies of the dataset (data/exercises.json and the EXERCISES blob embedded in index.html), and I've verified the two copies are identical. The schema now explicitly lists bn as a required language, following the precedent set by Add hi, pl, ko to JSON Schema language maps #43 and Add French (fr) exercise instructions #44. One small correction, though: the schema's language maps accept new languages via additionalProperties (that's how hi/pl/ko validated before Add hi, pl, ko to JSON Schema language maps #43 listed them), and the validator from Add dataset validator #36 hasn't been merged, so there's no automated check in CI here yet — I validated locally against data/exercises.schema.json with jsonschema: 0 errors.

  2. Media — This PR is instructions-only; no media files or image/gif_url/media_id fields are touched.

  3. Front-end — bn is registered in index.html (LANG_LABELS + the langs array, which drive the language tabs in the detail modal), and setup.html now includes instructions_bn in all four SQL dialect templates, the INSERT generator, and the LLM prompt. While doing that I noticed Add French (fr) exercise instructions #44 had added French to the LLM prompt but not to the SQL generation, so the generated SQL was silently dropping French text — this PR adds the missing instructions_fr columns alongside bn to keep the tool consistent.

Also worth noting: after #44 merged, this branch conflicted with main (French touched every record), so I've rebuilt it on top of the current main — it's conflict-free and mergeable again as of the latest push.

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.

2 participants