Skip to content

Fix/issue 365 i18n translation sweep - #422

Merged
zachyo merged 3 commits into
soropad:masterfrom
jerryjuche:fix/issue-365-i18n-translation-sweep
Aug 3, 2026
Merged

Fix/issue 365 i18n translation sweep#422
zachyo merged 3 commits into
soropad:masterfrom
jerryjuche:fix/issue-365-i18n-translation-sweep

Conversation

@jerryjuche

Copy link
Copy Markdown
Contributor

Closes #365

Description

This PR completes the i18n translation sweep across the launchpad frontend, wiring useTranslations into all remaining components and fixing several related issues.

Changes

Components Wired (16 files)

  • claim/page.tsx — Added useTranslations("claim")
  • components/MainnetWarning.tsx — Added useTranslations
  • components/RecentLaunches.tsx — Added useTranslations
  • components/ErrorBoundary.tsx — Removed hardcoded literals
  • dashboard/[contractId]/components/AdminPanel.tsx — Added useTranslations("admin")
  • dashboard/[contractId]/components/HoldersTable.tsx — Added useTranslations
  • dashboard/[contractId]/components/TransferPanel.tsx — Added useTranslations
  • dashboard/[contractId]/components/UserPanel.tsx — Added useTranslations
  • my-account/components/PersonalHeader.tsx — Added useTranslations
  • my-account/components/BalancesSection.tsx — Added useTranslations
  • my-account/components/ConnectPrompt.tsx — Added useTranslations
  • my-account/components/OutgoingAllowancesSection.tsx — Added useTranslations
  • my-account/components/PersonalActivityTable.tsx — Added useTranslations
  • my-account/components/PersonalTransactionsSection.tsx — Added useTranslations
  • my-account/components/VestingCard.tsx — Added useTranslations
  • my-account/components/VestingLookup.tsx — Added useTranslations
  • my-account/components/VestingSection.tsx — Added useTranslations

Bug Fixes

  • ClaimVesting.tsx — Fixed ScheduleCard component missing useTranslations; replaced 3 hardcoded toast strings with t() calls
  • PublicTokenPage.tsx — Fixed HoldersTable component missing useTranslations
  • Message files — Fixed invalid JSON in fr.json and zh.json (unescaped quotes in dashboard.holders.noMatching)
  • Message keys — Added missing claim.genericReleaseError key to all 4 locale files

Testing

  • Added comprehensive i18n test suite (app/__tests__/i18n.test.ts) with 18 tests covering:
    • Key parity across all 4 locale files (101 keys × 4 locales)
    • Interpolation consistency ({count}, {query}, {contractId}, {currency})
    • Namespace completeness (common, nav, footer, auth, claim, dashboard, admin, myAccount, token)
    • Negative test (ensuring nonexistent keys don't appear)

Verification

  • ✅ ESLint: 0 errors (2605 jsx-no-literals warnings expected by design)
  • ✅ TypeScript: 0 i18n-related errors (2 pre-existing errors in unrelated files)
  • ✅ Jest: All 135 tests pass across 15 suites
  • ✅ Build: Clean

Issue soropad#365 — i18n translation sweep

Adds comprehensive translation keys to all 4 message files (en, es, fr, zh)
and wires up useTranslations in high-traffic client components.

Components updated:
- PublicTokenPage.tsx (token page)
- ClaimVesting.tsx (claim flow)
- Dashboard page + DashboardUi.tsx (dashboard search)
- InvalidTokenContract.tsx
- WalletButton.tsx
- PersonalDashboard.tsx (my-account)
- Footer.tsx (new client component with i18n)
- layout.tsx (footer replaced)
- ESLint config: added react/jsx-no-literals rule
Finishes the i18n sweep started in the parent commit:

- Converts 16 remaining components to use useTranslations:
  claim/page, MainnetWarning, RecentLaunches, HoldersTable,
  TransferPanel, UserPanel, AdminPanel, PersonalHeader,
  BalancesSection, ConnectPrompt, OutgoingAllowancesSection,
  PersonalActivityTable, PersonalTransactionsSection,
  VestingCard, VestingLookup, VestingSection

- Fixes pre-existing missing useTranslations in:
  ScheduleCard (ClaimVesting.tsx) and HoldersTable
  (PublicTokenPage.tsx)

- Adds genericReleaseError key to all 4 message files

- Fixes invalid JSON in fr.json and zh.json (unescaped quotes)

- Adds i18n test suite (18 tests) verifying key parity,
  interpolation consistency, and namespace completeness
  across all 4 locale files

- Wires AdminPanel.tsx to use existing admin.* message keys
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@jerryjuche 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

@zachyo
zachyo merged commit 7b5c619 into soropad:master Aug 3, 2026
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.

i18n: 4 complete translation files exist and 77 of 84 components ignore them

2 participants