From e2d7dcc5d4c63449401b3cdfc6954a8d1a0dc38d Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Fri, 22 May 2026 10:10:48 +0000 Subject: [PATCH] Fix i18n sync and TypeScript errors for DM schedule UI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove stale teammate_user_hour from en.json via i18n-extract, drop invalid useDate prop on Timestamp preview, and update core_menu_options test mock for extended useTimePostBoxIndicator return shape. Co-authored-by: Sven Hüster --- .../schedule_dual_time_preview.tsx | 1 - .../send_post_options/core_menu_options.test.tsx | 12 ++++++------ webapp/channels/src/i18n/en.json | 1 - 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/webapp/channels/src/components/advanced_text_editor/send_button/scheduled_post_custom_time_modal/schedule_dual_time_preview.tsx b/webapp/channels/src/components/advanced_text_editor/send_button/scheduled_post_custom_time_modal/schedule_dual_time_preview.tsx index 748f87f4a65..65eecad224c 100644 --- a/webapp/channels/src/components/advanced_text_editor/send_button/scheduled_post_custom_time_modal/schedule_dual_time_preview.tsx +++ b/webapp/channels/src/components/advanced_text_editor/send_button/scheduled_post_custom_time_modal/schedule_dual_time_preview.tsx @@ -32,7 +32,6 @@ function PreviewTime({value, timeZone}: {value: number; timeZone: string}) { ranges={DATE_RANGES} value={value} timeZone={timeZone} - useDate={DATE_RANGES} useTime={{ hour: 'numeric', minute: 'numeric', diff --git a/webapp/channels/src/components/advanced_text_editor/send_button/send_post_options/core_menu_options.test.tsx b/webapp/channels/src/components/advanced_text_editor/send_button/send_post_options/core_menu_options.test.tsx index 69039d684da..2e3393b7ea5 100644 --- a/webapp/channels/src/components/advanced_text_editor/send_button/send_post_options/core_menu_options.test.tsx +++ b/webapp/channels/src/components/advanced_text_editor/send_button/send_post_options/core_menu_options.test.tsx @@ -30,8 +30,13 @@ const teammateTimezone = { const defaultUseTimePostBoxIndicatorReturnValue = { userCurrentTimezone: 'America/New_York', teammateTimezone, + recipientTimezoneString: 'Europe/London', teammateDisplayName, + teammateFirstName: 'John', + teammate: undefined, isDM: false, + isSelfDM: false, + isBot: false, showRemoteUserHour: false, currentUserTimesStamp: 0, isScheduledPostEnabled: false, @@ -56,12 +61,7 @@ describe('CoreMenuOptions Component', () => { beforeEach(() => { handleOnSelect.mockReset(); mockedIsDmScheduleRedesign.mockReturnValue(false); - mockedUseTimePostBoxIndicator.mockReturnValue({ - ...defaultUseTimePostBoxIndicatorReturnValue, - isDM: false, - isSelfDM: false, - isBot: false, - }); + mockedUseTimePostBoxIndicator.mockReturnValue(defaultUseTimePostBoxIndicatorReturnValue as unknown as ReturnType); }); afterEach(() => { diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index 3c89d3ed31c..67858f44610 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -4561,7 +4561,6 @@ "create_post_button.option.schedule_message.options.recently_used_dm.subtitle": "Your time · recently used", "create_post_button.option.schedule_message.options.their_morning": "Their morning", "create_post_button.option.schedule_message.options.their_morning.subtitle": "{theirDay} {theirTime} · {senderTime} yours", - "create_post_button.option.schedule_message.options.teammate_user_hour": "{time} {user}’s time", "create_post_button.option.schedule_message.options.tomorrow": "Tomorrow at {9amTime}", "create_post_button.option.send_now": "Send Now", "create_post.dm_or_gm_remote": "Direct Messages and Group Messages with remote users are not supported.",