fix(settings): translate join-request approve/deny toasts - #6411
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
useJoinRequestActionsinuse-join-requests.tshardcoded 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 surroundingjoin-requests-section.tsxcomponent and its dictionary keys (settings.joinRequestsSection.*) already exist and are threaded throught(). A pt-br user approving/denying a join request saw English toasts.Fix: added
approved/denied/approveFailed/denyFailedkeys toen/settings.tsandpt-br/settings.ts, and routed the four toast calls throughuseT().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 oxlinton 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).
useJoinRequestActionsthroughuseT(). Use the server error message when present; otherwise use translated fallbacks.approved,denied,approveFailed, anddenyFailedkeys toen/settings.tsandpt-br/settings.ts.Written for commit 3748d7c. Summary will update on new commits.