mirror of
https://github.com/mattermost/mattermost.git
synced 2026-05-28 04:35:04 -04:00
Fix i18n sync and TypeScript errors for DM schedule UI
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 <svelle@users.noreply.github.com>
This commit is contained in:
parent
7a86a34999
commit
e2d7dcc5d4
3 changed files with 6 additions and 8 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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<typeof useTimePostBoxIndicator>);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
|
|
|
|||
|
|
@ -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.",
|
||||
|
|
|
|||
Loading…
Reference in a new issue