fix(sandbox): translate the section CRUD toasts in the content browser - #6488
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.
Follows #6440/#6449, which translated the calendar and autosave toasts in the same file — this covers the section create/duplicate/rename handlers in
content-browser.tsx, which were still hardcoded English.Why: the repo's i18n rule (see CLAUDE.md) requires every user-facing string in
apps/web/srcto go throught(); these toasts ("Created section...", "Section not found.", "Duplicated...", "Duplicate failed", "Section renamed", "Rename failed") were shown verbatim in English regardless of the user'spt-BRpreference.Change: added 6 keys to
sandbox.contentBrowser.*in bothen/sandbox.tsandpt-br/sandbox.ts, and swapped the corresponding literal strings inhandleCreateAvailableSection,handleDuplicateSection, andhandleRenameSectionfort(...)calls. No behavior change — same messages, same triggers, just localized.Verify:
cd apps/web && bunx tsc --noEmit(confirmsTranslationKeycompleteness across both locale files) andbunx oxlint apps/web/src/components/sandbox/content/content-browser.tsx apps/web/src/i18n/en/sandbox.ts apps/web/src/i18n/pt-br/sandbox.ts.Checks run locally:
bun run fmt,bunx tsc --noEmit(apps/web workspace),bunx oxlinton the 3 changed files — all clean. No test file covers this UI-copy change; full CI validates the rest.Summary by cubic
Localizes section create/duplicate/rename toasts in the sandbox content browser. Previously these toasts were hardcoded in English; now they use i18n
t()with newsandbox.contentBrowser.*keys so messages follow the user’s locale with no behavior change.apps/web/src/i18n/en/sandbox.tsandapps/web/src/i18n/pt-br/sandbox.ts(includes{name}interpolation where shown).handleCreateAvailableSection,handleDuplicateSection, andhandleRenameSectionwitht(...); keeps existing error handling (useerr.messageif present, otherwise translated fallback).Written for commit 4b5c244. Summary will update on new commits.