Skip to content

Localize calendar date pickers to the active UI locale - #234

Merged
paulocastellano merged 8 commits into
mainfrom
fix/localize-calendar-date-pickers
Aug 6, 2026
Merged

Localize calendar date pickers to the active UI locale#234
paulocastellano merged 8 commits into
mainfrom
fix/localize-calendar-date-pickers

Conversation

@paulocastellano

@paulocastellano paulocastellano commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Wire DatePicker, PickTimePopover, and DateRangePicker to the active Inertia UI locale via useCalendarLocale
  • Translate calendar a11y labels (common.date_picker.label) and Facebook preview fallback (common.just_now) across all 16 locales
  • Format DatePicker trigger text with localized dayjs LL / LLL
  • Route remaining UI date displays through @/date localized helpers — posts lists, calendar headers, comments, labels/signatures/automations, metrics charts, and platform preview timestamps
  • Drive platform preview timestamps from the post schedule (or now) via named helpers (formatXPreview, formatDiscordPreview, etc.)
  • Fix API key expiry display shifting one day behind in negative-UTC timezones (formatDateOnly)
  • Assert expiry calendar day through Inertia props in ApiKeyControllerTest

Fixes #233

Test plan

  • Switch UI to Ukrainian — Posts calendar jump-to-date; weekday/month names should be Ukrainian
  • Switch UI to pt-BR — post editor schedule picker + calendar week/day headers (day-first, e.g. 3–9 de agosto de 2026)
  • Analytics / Automations metrics date range picker shows localized weekdays
  • API key expiry DatePicker still works; table shows the chosen calendar day (not the previous day in America/Sao_Paulo)
  • Posts list / show / calendar headers / labels dates follow the active locale
  • Platform previews (Discord/X/Facebook/etc.) show scheduled time when set, otherwise now / just now
  • Draft with a picked time reloads showing Schedule (not Post now); removing the time restores Post now
  • php artisan test --compact tests/Feature/ApiKeyControllerTest.php tests/Feature/LocalizationParityTest.php passes

paulocastellano and others added 8 commits August 5, 2026 19:48
Pass the Inertia locale into Reka calendars, translate a11y labels, and use dayjs LL/LLL for DatePicker display text.

Co-authored-by: Cursor <cursoragent@cursor.com>
Route list/calendar/preview timestamps through localized LL/LLL helpers so formats follow the active UI locale instead of English or Portuguese-locked patterns.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drive preview labels from the post schedule when set, localize Discord without dayjs calendar(), and expose a single formatPreviewPostedAt helper.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restore hasPickedTime from any saved scheduled_at, keep time on non-today Discord labels, and use a localized just-now fallback for unschedled Facebook previews.

Co-authored-by: Cursor <cursoragent@cursor.com>
Format date-only expiry in UTC calendar days, and use compact dayjs titles for calendar day/week headers.

Co-authored-by: Cursor <cursoragent@cursor.com>
Drop the Vue/TS file scanner and assert expiry calendar days through ApiKeyController props instead.

Co-authored-by: Cursor <cursoragent@cursor.com>
Avoid English month-day order in week headers and chart axis labels so locales like pt-BR keep natural day-first dates.

Co-authored-by: Cursor <cursoragent@cursor.com>
Replace the style-switch formatPreviewPostedAt with clear per-platform helpers so call sites read as formatDiscordPreview / formatXPreview / etc.

Co-authored-by: Cursor <cursoragent@cursor.com>
@paulocastellano
paulocastellano merged commit 1af705f into main Aug 6, 2026
5 checks passed
@paulocastellano
paulocastellano deleted the fix/localize-calendar-date-pickers branch August 6, 2026 00: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.

Localize calendar date pickers to the active UI locale

1 participant