Skip to content

fix(calendar-agenda): respect user regional date and time formatting preferences - #29

Open
tobiasge wants to merge 1 commit into
bulwarkmail:mainfrom
tobiasge:fix/calendar-agenda-locale
Open

tobiasge wants to merge 1 commit into
bulwarkmail:mainfrom
tobiasge:fix/calendar-agenda-locale

Conversation

@tobiasge

Copy link
Copy Markdown

Summary

The calendar-agenda plugin previously formatted times and dates with the browser's native toLocaleTimeString / toLocaleDateString, ignoring the user's regional configuration in webmail (timeFormat 12h/24h, dateLocale override, and effective timeZone). Additionally, untitled event titles were baked in on fetch, causing them not to re-translate when the user switched language.

Changes:

  • Uses api.i18n.formatTime and api.i18n.formatDate (with backwards-compatible fallbacks) so the agenda honors user formatting preferences.
  • Resolves untitled event titles dynamically in render (titleOf) so language changes update untitled events immediately.
  • Unifies BannerAgenda chip labels with titleOf to support dynamic untitled strings and strikethroughs for cancelled events.
  • Bumps calendar-agenda to version 1.4.4 with minAppVersion: 1.18.0.
  • Rebuilds calendar-agenda.zip.
  • Updates test-utils/fake-api.mjs with regional formatting capabilities.
  • Adds test cases for 12h vs 24h clock, dateLocale, and dynamic translation.

Related

…preferences

- Use api.i18n.formatTime and api.i18n.formatDate so the agenda respects the user's 12h/24h time format, date locale, and time zone.
- Resolve untitled event fallback dynamically in render (titleOf) so language switches update untitled event titles immediately.
- Bump calendar-agenda to 1.4.4 and minAppVersion to 1.18.0.
- Update test-utils/fake-api.mjs with regional properties and formatIntl helper.
- Add test coverage for 12h vs 24h clock, dateLocale, and dynamic translation.

This branch has not been deployed

No deployments
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