Skip to content

feat(i18n): extract auth-form strings to dictionaries#16

Open
abdout wants to merge 1 commit into
mainfrom
feat/i18n-auth-forms
Open

feat(i18n): extract auth-form strings to dictionaries#16
abdout wants to merge 1 commit into
mainfrom
feat/i18n-auth-forms

Conversation

@abdout
Copy link
Copy Markdown
Contributor

@abdout abdout commented Apr 25, 2026

Summary

  • ~20 hardcoded English strings in auth/login, auth/join, auth/password (new-password), auth/reset, and wizard/theme bypassed the dictionary system → Arabic users saw English placeholders, buttons, and links.
  • Adds 11 new keys to `en.json` and `ar.json` (479 → 490 each, still aligned). Existing keys (`auth.email`, `auth.password`, `auth.forgotPassword`, etc.) reused where possible.
  • Wires `useTranslations` into 5 components.

Changes (per file)

  • `src/components/internationalization/{en,ar}.json` — +11 keys: `name`, `newPassword`, `enterNewPassword`, `twoFactorCode`, `orContinueWith`, `backToLogin`, `join`, plus `errors.{oauthAccountNotLinked,somethingWentWrong}`
  • `src/components/auth/login/form.tsx` — placeholders, divider, 2FA label, error fallbacks, button text, link
  • `src/components/auth/join/form.tsx` — placeholders, divider, button, link
  • `src/components/auth/password/form.tsx` — heading, placeholder, button, link
  • `src/components/auth/reset/form.tsx` — placeholder, button, link
  • `src/components/wizard/theme.tsx` — preview divider + email placeholder

Test plan

  • `/ar/login` — Arabic placeholders + buttons + links + 2FA flow text
  • `/en/login` — visually unchanged
  • `/ar/join`, `/ar/auth/reset`, `/ar/auth/new-password` — fully translated
  • OAuth error path (`?error=OAuthAccountNotLinked`) shows correct-locale message
  • Wizard theme preview shows locale-appropriate mock form
  • `pnpm tsc --noEmit` no new errors

Closes #15

🤖 Generated with Claude Code

Adds 11 new keys under auth.* in en/ar.json (placeholders, button
labels, divider text, error messages, link texts) and wires
useTranslations into the 5 affected components: login, join, password
(new), reset, and the wizard theme preview.

Existing keys are reused where possible (auth.email, auth.password,
auth.forgotPassword, auth.alreadyHaveAccount, auth.dontHaveAccount,
auth.resetPassword, common.login, common.confirm).

Closes #15

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
marketing Ready Ready Preview, Comment Apr 25, 2026 9:47am

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.

feat(i18n): extract auth-form strings to dictionaries

1 participant