Skip to content

Feat/a19 i18n scaffolding es pt br#222

Open
NnamdiCyber wants to merge 2 commits into
Dgetsylver:mainfrom
NnamdiCyber:feat/a19-i18n-scaffolding-es-pt-br
Open

Feat/a19 i18n scaffolding es pt br#222
NnamdiCyber wants to merge 2 commits into
Dgetsylver:mainfrom
NnamdiCyber:feat/a19-i18n-scaffolding-es-pt-br

Conversation

@NnamdiCyber
Copy link
Copy Markdown
Contributor

Summary

Wires i18next and adds full ES + PT-BR locale coverage for the core trade flow.

Changes

  • frontend/src/i18n/ — index.ts + en.json + es.json + pt-BR.json
  • frontend/src/main.ts — initI18n() at startup, applyI18nToDOM(), lang-select wired
  • frontend/index.html — id="disclaimer-body", id="testnet-hint" for DOM targeting
  • frontend/scripts/check-i18n-keys.mjs — lint script for key parity
  • frontend/package.json — lint:i18n script

Acceptance

  • Language selector persists choice (localStorage key turbolong_lang)
  • EN / ES / PT-BR fully translated for core trade flow
  • npm run lint:i18n passes — all three locale files have identical key sets
  • vite build exits 0

Closes #21

- Add orange_hf threshold to Config (configurable orange zone)
- Replace heuristic compute_unwind_loops with closed-form compute_partial_unwind
  that computes the exact minimal repay amount to restore target HF
- Add partial_unwind() entry point (keeper- or user-triggered when in orange zone)
- Update rebalance() to use orange_hf trigger and minimal unwind logic
- Add 5 tests covering: already-at-target, no-debt, single-loop,
  max-loops (20), and minimal-repay exactness

Closes Dgetsylver#47
- initI18n() called at startup; locale persisted in localStorage
- applyI18nToDOM() updates static text/data-tip on init and locale change
- lang-select in settings dropdown wired to setLocale()
- en.json, es.json, pt-BR.json cover all core flows (nav, trade,
  position, vault, swap, toasts, disclaimer, testnet)
- scripts/check-i18n-keys.mjs lint script verifies key parity across
  all three locales (npm run lint:i18n)
- Build clean; lint:i18n passes

Closes Dgetsylver#21
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 30, 2026

@NnamdiCyber Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

A19: i18n scaffolding + Spanish and Portuguese locales

1 participant