Repository navigation
fix: use calendar/browser date locale for time entry date headers (#2740) - #2746
Merged
Merged
Conversation
…ate-locale # Conflicts: # docs/releases/unreleased.md
…ate-locale # Conflicts: # docs/releases/unreleased.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2740.
Summary
TimeEntryEditorModalto format each time entry's date header usinggetPluginCalendarLocale(this.plugin)(configuredcalendarViewSettings.locale, falling back tonavigator.languageand then the runtime default locale) instead ofuiLocale(), matching TaskNotes' documented numeric date-ordering policy (docs/development/translations.md) and the native<input type="datetime-local">controls directly below it.dateDisplayFormat === "iso"handling for the time entry header (usingparseVaultDateOption+formatDateLabel), which had been added in [FR]: FR: Support configurable ISO-8601 date format in "Task Information" modal #2354 and dropped during the v5 Lingui merge, and preserved configured vault time zone handling.calendarViewSettings.localeis invalid.toLocaleDateString(uiLocale(), ...)call sites unchanged:src/components/CustomRecurrenceModal.ts:238(weekday: "long"inside"Weekly on {day}")src/ui/NotificationService.ts:732(month: "short", day: "numeric"inside missed-reminder sentences)Both format prose weekday/month names inside translated UI sentences, so they should continue to follow
uiLocale().tests/unit/modals/TimeEntryEditorModal.test.tsand updateddocs/releases/unreleased.md.Validation
npm run i18n:checknpm run buildnpm run typechecknpm run lintnpx jest tests/unit/modals/TimeEntryEditorModal.test.ts tests/unit/issues/issue-2354-date-display-format.test.ts tests/unit/issues/issue-2206-time-entry-editor-large-list.test.ts tests/unit/issues/issue-1602-time-entry-timezone-mismatch.test.ts