Skip to content

Feat/challenge clock - #330

Open
nank1ro wants to merge 1 commit into
mainfrom
feat/challenge-clock
Open

nank1ro wants to merge 1 commit into
mainfrom
feat/challenge-clock

Conversation

@nank1ro

@nank1ro nank1ro commented Sep 21, 2026

Copy link
Copy Markdown
Owner

Summary

Adds a new "Clock" coding challenge (difficulty 2) across all 6 supported languages (C, Dart, JavaScript, Kotlin, Python, Swift) and all 12 locales (en, de, es, fr, hi, it, ja, ko, pl, pt, ru, zh). The exercise asks the user to implement a clockTime function that formats hours/minutes into a clock display string.

  • 72 challenges/clock.md files (6 languages x 12 locales)
  • 72 challenges/data.json entries with difficulty 2 and a translated name (Clock/Uhr/Reloj/Horloge/घड़ी/Orologio/時計/시계/Zegar/Relógio/Часы/时钟)
  • 1 new asset: assets/challenges/clock.svg

Checks run

  • Validator: pass (frontmatter/title/data.json sync verified for all 72 files)
  • Tester (codecompiler-8081 container): all 6 en type-1 challenge files PASS — c 3s, dart 4s, javascript 2s, kotlin 3s, python 1s, swift 3s (each "Ran 1 exercises: 1 passed, 0 failed, 0 skipped"). Also re-ran all 6 ja files after translation fixes — all PASS.
  • Locale checks: scripts/check_locales.py — 0 problems across 12 en files x 11 locales; scripts/check_string_literals.py — 0 unterminated string literals.

Fixes applied during review

  • Added the missing clock entry (difficulty: 2, name 時計) to 5 Japanese data.json files that had none (ja/c, ja/dart, ja/javascript, ja/kotlin, ja/swift — only ja/python had been updated), appended surgically preserving existing formatting.
  • Translated ja/kotlin/challenges/clock.md and ja/swift/challenges/clock.md, which had been left entirely in English (caught by the title-vs-data.json-name sync validation rule). Spliced in the Japanese prose from ja/dart/challenges/clock.md since the English description/instructions are byte-identical across all 6 languages.

Known issues

  • curriculum.json and _theory.md files are unchanged and absent from this diff. This is expected/informational, not a defect: curriculum.json only indexes arguments, never challenges (confirmed no "anagram" or "clock" strings appear in it), and there is no _theory.md in any challenges/ folder for any language.

Test plan

  • Validator passes
  • Tester passes for all 6 en challenge files against codecompiler-8081
  • Tester passes for all 6 ja challenge files after translation fixes
  • check_locales.py and check_string_literals.py report 0 problems

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