Skip to content

fix(cms): translate the post-calendar scheduling toasts - #6440

Merged
pedrofrxncx merged 1 commit into
mainfrom
fix/blog-calendar-toast-i18n-w1
Aug 24, 2026
Merged

fix(cms): translate the post-calendar scheduling toasts#6440
pedrofrxncx merged 1 commit into
mainfrom
fix/blog-calendar-toast-i18n-w1

Conversation

@pedrofrxncx

@pedrofrxncx pedrofrxncx commented Aug 23, 2026

Copy link
Copy Markdown
Collaborator

Follows #6421 (post calendar / blog scheduling): the new schedule/reschedule flow's four toast strings ("Created scheduled post", "Could not create", "Only scheduled posts can be moved.", "Could not reschedule") were hardcoded in content-browser.tsx instead of going through t(), unlike every other user-facing string that same PR added in post-editor.tsx/post-calendar.tsx. Per this repo's i18n rule, any string a user reads in apps/web/src must go through t() so pt-br users don't see raw English mid-flow.

Adds sandbox.postCalendar.{couldNotCreate,couldNotReschedule,createdScheduledPost,onlyScheduledCanMove} to both en/sandbox.ts and pt-br/sandbox.ts, and wires them into handleCreateScheduledPost/handleReschedulePost.

To confirm: open a site with blog scheduling support, switch to pt-br in preferences, create a post from the calendar's "+" button and drag a scheduled post to another day — the toasts now read in pt-br instead of English.

Verified locally: bun run fmt, bunx tsc --noEmit in apps/web (no new errors), bunx oxlint on the three changed files (0 warnings/errors). Full CI (typecheck across all workspaces, lint, tests) validates the rest.


Summary by cubic

Localizes post calendar scheduling toasts to follow apps/web i18n rules. Previously these four toasts were hardcoded in English; now they use t() so pt-br users see translated messages.

  • Adds sandbox.postCalendar.{couldNotCreate,couldNotReschedule,createdScheduledPost,onlyScheduledCanMove} to en/sandbox.ts and pt-br/sandbox.ts.
  • Replaces string literals in content-browser.tsx (handleCreateScheduledPost, handleReschedulePost) with t(), preserving err.message when present and using localized fallbacks otherwise.

Written for commit 8c02470. Summary will update on new commits.

Review in cubic

The new schedule/reschedule flow added in #6421 (post calendar) hardcoded
its four toast strings ("Created scheduled post", "Could not create",
"Only scheduled posts can be moved.", "Could not reschedule") instead of
going through t(), unlike every other string in this same PR's UI
(post-editor.tsx, post-calendar.tsx). Per this repo's i18n rule, any
user-facing string in apps/web/src must go through t().

Adds sandbox.postCalendar.{couldNotCreate,couldNotReschedule,
createdScheduledPost,onlyScheduledCanMove} to en/pt-br and wires them in
content-browser.tsx's handleCreateScheduledPost/handleReschedulePost.
@pedrofrxncx
pedrofrxncx merged commit 6175e37 into main Aug 24, 2026
34 checks passed
@pedrofrxncx
pedrofrxncx deleted the fix/blog-calendar-toast-i18n-w1 branch August 24, 2026 15:50
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