Skip to content

refactor: replace toLocale*String() calls with shared formatEventDate helper#517

Merged
MikeWedderburn-Clarke merged 11 commits intomainfrom
copilot/default-branch-name
Apr 5, 2026
Merged

refactor: replace toLocale*String() calls with shared formatEventDate helper#517
MikeWedderburn-Clarke merged 11 commits intomainfrom
copilot/default-branch-name

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

  • Fix hardcoded "en" locale in formatEventDate calls (previous commits)
  • Extract hardcoded strings in directory page and ExplorerShell (previous commits)
  • Extract hardcoded strings in certifications page → new certification-messages.ts
  • Extract hardcoded strings in event-group detail page → event-group-messages.ts
  • Extract admin layout navigation labels → admin-messages.ts
  • Extract "All roles" in directory filter → directory-messages.ts
  • Fix EventDetailPage concession label → use msg.concessionLabel()
  • Fix text-lefttext-start for RTL (permissions, certifications)
  • Fix text-righttext-end for RTL (bookings, teachers, occurrences)
  • Fix ml-*ms-* for RTL (8 files)
  • Fix toggle switch left-*start-* for RTL (privacy settings)
  • Tighten lint-i18n.sh regex to catch 2-word phrases
  • Add translation keys to en.json, es.json, ar.json
  • Fix spacing before middot separator (code review feedback)
  • Typecheck ✅ | Lint ✅ | Tests ✅ (781) | Build ✅

Copilot AI and others added 3 commits April 4, 2026 20:56
…n.json, es.json

Spec 014 tasks T001-T010: Install next-intl v4, create shared i18n types
and formatting helpers, English/Spanish translation files, configure
next-intl plugin, update root layout with NextIntlClientProvider.

All 20 new i18n tests pass. 760 total tests passing.

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/62b65f5e-f339-4f5a-ae6f-ef89aebcf8d2

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
…te Storybook

Spec 014 tasks T011-T017: Add i18n label props to EventCard and
DirectoryCard, use shared formatEventDate/formatCurrency helpers,
wrap Storybook with NextIntlClientProvider. All 119 shared-ui tests pass.

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/62b65f5e-f339-4f5a-ae6f-ef89aebcf8d2

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
… helper

Replace all toLocaleDateString(), toLocaleString(), and toLocaleTimeString()
calls across 16 web app files with the shared formatEventDate() helper from
@acroyoga/shared/utils/format. This ensures consistent, locale-aware date
formatting throughout the application.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
Copilot AI and others added 3 commits April 4, 2026 21:12
…ration tests

Spec 014 tasks T028-T035: LocaleSwitcher component in nav header,
Arabic translation stub for RTL testing, integration tests for locale
switching and RTL layout. Root layout sets dir attribute dynamically.

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/62b65f5e-f339-4f5a-ae6f-ef89aebcf8d2

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
Spec 014 tasks T036-T040: Upgraded lint-i18n.sh to exit 1 on violations,
fixed 2 remaining raw strings, added i18n sections to CONTRIBUTING.md
and docs/testing.md, added lint enforcement test. 781 tests passing.

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/62b65f5e-f339-4f5a-ae6f-ef89aebcf8d2

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
…complete

Spec 014 complete: all 44 tasks done, 781 tests passing, typecheck and
lint clean. Updated README, deferred task rationales in specs 001/003/004,
spec status changed to Implemented.

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/62b65f5e-f339-4f5a-ae6f-ef89aebcf8d2

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
Copilot AI and others added 2 commits April 5, 2026 06:42
…tDate calls

All 16 client components now use next-intl's useLocale() hook to pass
the user's active locale to formatEventDate instead of hardcoding 'en'.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
…maining hardcoded strings

- Replace hardcoded "en" locale with useLocale() from next-intl in 16 client components
- Add locale prop to shared-ui EventCard for cross-platform locale support
- Extract "Friends" and "Follows you" from directory page to message constants
- Extract "Loading map…" from ExplorerShell to explorer-messages
- Add loadingMap key to en/es/ar translation files
- All 781 tests pass, typecheck clean, lint clean, build clean

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/110724e8-8a49-4d8f-8d66-563fcc14860c

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
Copilot AI and others added 2 commits April 5, 2026 07:34
…rties for RTL, tighten lint pattern

- Extract hardcoded strings in admin certifications page to certification-messages.ts
- Extract hardcoded strings in event-group detail page to event-group-messages.ts
- Extract admin layout navigation labels to admin-messages.ts
- Extract "All roles" in directory filter to directory-messages.ts
- Use msg.concessionLabel() in EventDetailPage instead of hardcoded string
- Replace text-left with text-start, text-right with text-end for RTL
- Replace ml-* with ms-*, left-* with start-* for RTL logical properties
- Fix toggle switch in privacy page for RTL direction
- Tighten lint-i18n.sh regex to catch 2-word phrases (was 3+)
- Add new translation keys to en.json, es.json, ar.json

Agent-Logs-Url: https://github.com/microsoft/CommunityManagement-Sample-Spec-Kit/sessions/0c59fe10-fe39-435c-bec2-3ac096b9daf7

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
@MikeWedderburn-Clarke
Copy link
Copy Markdown
Member

@copilot resolve conflicts

…h-name

# Conflicts:
#	README.md
#	apps/web/src/components/NavHeader.tsx
#	packages/shared/src/types/index.ts

Co-authored-by: MikeWedderburn-Clarke <5323631+MikeWedderburn-Clarke@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 5, 2026

@copilot resolve conflicts

Resolved in ffe1ba4. Three conflicts from the Spec 015 merge:

  • README.md — both specs now show "Implemented"
  • NavHeader.tsx — kept both LocaleSwitcher and NotificationBell imports
  • packages/shared/src/types/index.ts — kept both i18n and notifications exports

All 852 tests pass, typecheck/lint/build clean.

@MikeWedderburn-Clarke MikeWedderburn-Clarke marked this pull request as ready for review April 5, 2026 08:05
@MikeWedderburn-Clarke MikeWedderburn-Clarke merged commit aa4f5ca into main Apr 5, 2026
5 checks passed
@MikeWedderburn-Clarke MikeWedderburn-Clarke deleted the copilot/default-branch-name branch April 5, 2026 08:05
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.

2 participants