Skip to content

fix(sandbox): translate the section CRUD toasts in the content browser - #6488

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/content-browser-section-crud-i18n-w1
Aug 25, 2026
Merged

fix(sandbox): translate the section CRUD toasts in the content browser#6488
pedrofrxncx merged 1 commit into
mainfrom
fix/content-browser-section-crud-i18n-w1

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

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/src to go through t(); these toasts ("Created section...", "Section not found.", "Duplicated...", "Duplicate failed", "Section renamed", "Rename failed") were shown verbatim in English regardless of the user's pt-BR preference.

Change: added 6 keys to sandbox.contentBrowser.* in both en/sandbox.ts and pt-br/sandbox.ts, and swapped the corresponding literal strings in handleCreateAvailableSection, handleDuplicateSection, and handleRenameSection for t(...) calls. No behavior change — same messages, same triggers, just localized.

Verify: cd apps/web && bunx tsc --noEmit (confirms TranslationKey completeness across both locale files) and bunx 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 oxlint on 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 new sandbox.contentBrowser.* keys so messages follow the user’s locale with no behavior change.

  • Adds six keys to apps/web/src/i18n/en/sandbox.ts and apps/web/src/i18n/pt-br/sandbox.ts (includes {name} interpolation where shown).
  • Replaces literal toasts in handleCreateAvailableSection, handleDuplicateSection, and handleRenameSection with t(...); keeps existing error handling (use err.message if present, otherwise translated fallback).
  • No migrations or API changes.

Written for commit 4b5c244. Summary will update on new commits.

Review in cubic

@pedrofrxncx
pedrofrxncx merged commit 310d007 into main Aug 25, 2026
34 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/content-browser-section-crud-i18n-w1 branch August 25, 2026 02:02
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