refactor: remove legacy useTranslation hook (closes #18742)#18814
refactor: remove legacy useTranslation hook (closes #18742)#18814myelinated-wackerow wants to merge 1 commit into
Conversation
Migrates the final 9 consumers to namespace-bound useTranslations and deletes src/hooks/useTranslation.ts, completing #18742. - FindWalletProductTable (8 files): all bind page-wallets-find-wallet; useWalletFilters gains a tTable binding for its three table: cross-namespace keys; PersonaTags/useWalletPersonaPresets dynamic keys resolve to plain labels. - ReleaseCarousel: binds page-roadmap; the t passed into release.content(t) satisfies the existing (key: string) => string signature unchanged. Drops the no-restricted-imports guard rule (redundant once the module is gone -- any new import now fails type-check and the build) and the AGENTS.md deprecation note referencing the removed hook. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
✅ Deploy Preview for ethereumorg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
🔎 First-pass review — ✅ Looks mergeableCode lane. This is the finale of #18742: the last 9 consumers move from the legacy One loose end worth catching before or right after merge:
AnalysisLane: code (bulk touches Checked:
Non-blocking nits:
CI still running on this push — no comment on pending checks.
|
Automated rendering verification — deploy previewAgainst deploy-preview-18814.ethereum.it: 1. Fetch sweep — 50/50 pages clean (25 locales × 2. Playwright interactions (en, ar, zh) — 0 failures: find-wallet persona presets + the client-gated table filter strings ( Repo-wide audit confirms 0 importers of -- Opus 4.8 |

The last 9 consumers migrate to namespace-bound
useTranslations, andsrc/hooks/useTranslation.tsis deleted. This completes the migration tracked in #18742.Changes
FindWalletProductTable(8 files) — all bindpage-wallets-find-wallet.useWalletFiltersgains atTablebinding for its threetable:cross-namespace keys;PersonaTags/useWalletPersonaPresetsdynamic keys resolve to plain labels (verified — no ICU/markup).ReleaseCarousel(rewritten in fix: RTL support for Embla carousels (roadmap ReleaseCarousel) #18734, still on the legacy hook) — bindspage-roadmap. Thetpassed intorelease.content(t)satisfies that function's existing(key: string) => stringsignature unchanged; all keys plain.src/hooks/useTranslation.ts.no-restricted-importsguard on the hook — redundant now that the module is gone (any new import fails type-check and the build on its own).AGENTS.md— drops the deprecation note that pointed at the removed hook.Verification
@/hooks/useTranslationpnpm type-checkclean;pnpm lintclean/wallets/find-wallet/+/roadmap/× 25 locales (posted as comment)With this merged, #18742 is fully resolved — all 103 original call sites migrated, both translation APIs collapsed to one.
-- Opus 4.8
Related issue