Skip to content

feat(i18n): add spanish translations for Ethernaut levels 30-40 with i18n hardening - #860

Open
JulianColoma wants to merge 3 commits into
OpenZeppelin:masterfrom
JulianColoma:master
Open

JulianColoma wants to merge 3 commits into
OpenZeppelin:masterfrom
JulianColoma:master

Conversation

@JulianColoma

@JulianColoma JulianColoma commented Sep 22, 2026 •

Copy link
Copy Markdown

Summary

Adds Spanish translations for Ethernaut levels 30-40 (description + completion text for 11 levels), a localization validation test to keep translations in sync, and a more resilient i18n loader.

Changes

  • Translations: 22 new markdown files under client/src/gamedata/es/descriptions/levels/ covering HigherOrder, Stake, Impersonator, ImpersonatorTwo, MagicAnimalCarousel, BetHouse, EllipticToken, UniqueNFT, Forger and NotOptimisticPortal.
  • Loader hardening (client/src/utils/translations.js): the language dictionary is now merged over the English baseline, so a missing key falls back to English (or the key itself) instead of undefined; new translate/t helpers support {placeholder} interpolation.
  • Tests:
    • localization.test.js validates ES localization integrity: every es level description mirrors en, every gamedata.json description reference exists in both languages, and every en/strings.json key is indexed in es/strings.json (logs and fails on any gap).
    • translations.test.js covers baseline merging, per-key fallbacks, interpolation and the new helpers.

Verification

  • CI=true npx react-scripts test --watchAll=false — 13/13 tests passing (2 suites).
  • npx eslint on the changed files — 0 errors (eslint-config-react-app).
  • es/strings.json validated as valid JSON (121 keys).

Notes

  • Dependencies installed with yarn (corepack); yarn.lock unchanged.
  • Production build not verified locally: react-scripts 4 / webpack hangs on Node 24.

Related Issues

Closes #850

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Add description and completion markdown for HigherOrder, Stake, Impersonator, ImpersonatorTwo, MagicAnimalCarousel, BetHouse, EllipticToken, Cashback, UniqueNFT, Forger and NotOptimisticPortal under es/descriptions/levels.
Verify every es level description mirrors en, every gamedata.json description reference exists in both, and every en/strings.json key is indexed in es/strings.json, logging and failing on any gap.
Merge the language dictionary over the English baseline so missing keys never resolve to undefined, and expose translate/t helpers supporting {placeholder} interpolation for the new level strings.
@JulianColoma

Copy link
Copy Markdown
Author

I confirm that I have read and hereby agree to the OpenZeppelin Contributor License Agreement

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.

[Translation][ES] Claim: Spanish translation for missing levels (30-40)

1 participant