Skip to content

fix(settings): translate join-request approve/deny toasts - #6411

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/join-request-toast-i18n-w3
Aug 21, 2026
Merged

pedrofrxncx merged 1 commit into
mainfrom
fix/join-request-toast-i18n-w3

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Aug 21, 2026 •

Copy link
Copy Markdown
Collaborator

The admin billing page (#5863) is still an open PR — nothing on main under apps/web/src/routes/admin lands billing yet, so this focuses on the adjacent components/settings surface (join-requests-section.tsx, used on the org members admin page for domain-join approvals).

Bug: useJoinRequestActions in use-join-requests.ts hardcoded the approve/deny success and fallback-error toast strings in English ("Request approved", "Request denied", "Failed to approve", "Failed to deny"), bypassing the repo's i18n system even though the surrounding join-requests-section.tsx component and its dictionary keys (settings.joinRequestsSection.*) already exist and are threaded through t(). A pt-br user approving/denying a join request saw English toasts.

Fix: added approved/denied/approveFailed/denyFailed keys to en/settings.ts and pt-br/settings.ts, and routed the four toast calls through useT().

How to confirm: switch language to pt-br in preferences, approve or deny a pending join request on the org members page, see the toast in Portuguese.

Checks run locally: bun run fmt, cd apps/web && bunx tsc --noEmit (clean), bunx oxlint on the three touched files (0 warnings/errors). No test needed — this is a pure string/translation-plumbing change, not new logic. Full CI validates the rest.


Summary by cubic

Localizes join-request approval/denial toasts. Previously success and fallback error toasts were hardcoded in English; now they use existing i18n keys so users see messages in their selected language (including pt-BR).

  • Route toast messages in useJoinRequestActions through useT(). Use the server error message when present; otherwise use translated fallbacks.
  • Add approved, denied, approveFailed, and denyFailed keys to en/settings.ts and pt-br/settings.ts.
  • No logic changes to mutations or cache invalidation; no migration required. QA: set language to pt-BR, approve/deny a join request, verify localized toasts.

Written for commit 3748d7c. Summary will update on new commits.

Review in cubic

@pedrofrxncx
pedrofrxncx merged commit 44a42a8 into main Aug 21, 2026
34 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/join-request-toast-i18n-w3 branch August 21, 2026 13:59
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.

1 participant