feat(settings): add 12/24-hour time format toggle
Add a TimeFormatPref (Auto/12h/24h) preference. Auto follows the device's 24-hour system setting; the others force a clock app-wide. The resolved convention is provided once at the app root via LocalUse24HourFormat, so every in-app time label reads it without per-screen plumbing. A shared, pure TimeFormat helper (formatTimeOfDay / formatMinuteOfDay / formatHourLabel / timeOfDayFormatter) is now the single source for all time-of-day rendering. Routing every site through it also fixes a pre-existing inconsistency: the week/day timeline gutters and the agenda screen + widget hard-coded 24h, while event detail/edit/search/reminders followed the locale — so a 12h-locale user previously saw mixed formats. Covered: week & day timelines (gutter + event blocks), agenda screen and widget, event detail/edit, search, and reminder notifications. Closes #6 (Codeberg) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -271,6 +271,10 @@
|
||||
<string name="settings_week_start_auto">Automatic</string>
|
||||
<string name="settings_week_start_monday">Monday</string>
|
||||
<string name="settings_week_start_sunday">Sunday</string>
|
||||
<string name="settings_time_format">Time format</string>
|
||||
<string name="settings_time_format_auto">Automatic</string>
|
||||
<string name="settings_time_format_12h">12-hour (2:00 PM)</string>
|
||||
<string name="settings_time_format_24h">24-hour (14:00)</string>
|
||||
<string name="settings_section_event_form">New event form</string>
|
||||
<string name="settings_form_fields_hint">Fields shown by default — everything else sits behind \"More fields\"</string>
|
||||
<string name="settings_color_unsupported">Allow colors on unsupported calendars</string>
|
||||
|
||||
Reference in New Issue
Block a user