stream-chat-react-native-core 5.32.0-beta.2 → 5.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/components/Channel/Channel.js +7 -1
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +2 -0
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +18 -3
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js +4 -17
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +9 -6
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageEditedTimestamp.js +4 -5
- package/lib/commonjs/components/Message/MessageSimple/MessageEditedTimestamp.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +8 -8
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTimestamp.js +21 -18
- package/lib/commonjs/components/Message/MessageSimple/MessageTimestamp.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineDateSeparator.js +14 -12
- package/lib/commonjs/components/MessageList/InlineDateSeparator.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +4 -28
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageSystem.js +14 -8
- package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/commonjs/components/MessageList/StickyHeader.js +36 -0
- package/lib/commonjs/components/MessageList/StickyHeader.js.map +1 -0
- package/lib/commonjs/components/index.js +11 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/hooks/useStreami18n.js +1 -1
- package/lib/commonjs/i18n/en.json +7 -0
- package/lib/commonjs/i18n/es.json +7 -0
- package/lib/commonjs/i18n/fr.json +7 -0
- package/lib/commonjs/i18n/he.json +7 -0
- package/lib/commonjs/i18n/hi.json +7 -0
- package/lib/commonjs/i18n/it.json +7 -0
- package/lib/commonjs/i18n/ja.json +7 -0
- package/lib/commonjs/i18n/ko.json +7 -0
- package/lib/commonjs/i18n/nl.json +7 -0
- package/lib/commonjs/i18n/pt-br.json +7 -0
- package/lib/commonjs/i18n/ru.json +7 -0
- package/lib/commonjs/i18n/tr.json +7 -0
- package/lib/commonjs/index.js +2 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/{Streami18n.js → i18n/Streami18n.js} +61 -68
- package/lib/commonjs/utils/i18n/Streami18n.js.map +1 -0
- package/lib/commonjs/utils/i18n/calendarFormats.js +104 -0
- package/lib/commonjs/utils/i18n/calendarFormats.js.map +1 -0
- package/lib/commonjs/utils/i18n/getDateString.js +47 -0
- package/lib/commonjs/utils/i18n/getDateString.js.map +1 -0
- package/lib/commonjs/utils/i18n/predefinedFormatters.js +40 -0
- package/lib/commonjs/utils/i18n/predefinedFormatters.js.map +1 -0
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Channel/Channel.js +7 -1
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +2 -0
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +18 -3
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js +4 -17
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +9 -6
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageEditedTimestamp.js +4 -5
- package/lib/module/components/Message/MessageSimple/MessageEditedTimestamp.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +8 -8
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTimestamp.js +21 -18
- package/lib/module/components/Message/MessageSimple/MessageTimestamp.js.map +1 -1
- package/lib/module/components/MessageList/InlineDateSeparator.js +14 -12
- package/lib/module/components/MessageList/InlineDateSeparator.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +4 -28
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/MessageSystem.js +14 -8
- package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/module/components/MessageList/StickyHeader.js +36 -0
- package/lib/module/components/MessageList/StickyHeader.js.map +1 -0
- package/lib/module/components/index.js +11 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/hooks/useStreami18n.js +1 -1
- package/lib/module/i18n/en.json +7 -0
- package/lib/module/i18n/es.json +7 -0
- package/lib/module/i18n/fr.json +7 -0
- package/lib/module/i18n/he.json +7 -0
- package/lib/module/i18n/hi.json +7 -0
- package/lib/module/i18n/it.json +7 -0
- package/lib/module/i18n/ja.json +7 -0
- package/lib/module/i18n/ko.json +7 -0
- package/lib/module/i18n/nl.json +7 -0
- package/lib/module/i18n/pt-br.json +7 -0
- package/lib/module/i18n/ru.json +7 -0
- package/lib/module/i18n/tr.json +7 -0
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/utils/{Streami18n.js → i18n/Streami18n.js} +61 -68
- package/lib/module/utils/i18n/Streami18n.js.map +1 -0
- package/lib/module/utils/i18n/calendarFormats.js +104 -0
- package/lib/module/utils/i18n/calendarFormats.js.map +1 -0
- package/lib/module/utils/i18n/getDateString.js +47 -0
- package/lib/module/utils/i18n/getDateString.js.map +1 -0
- package/lib/module/utils/i18n/predefinedFormatters.js +40 -0
- package/lib/module/utils/i18n/predefinedFormatters.js.map +1 -0
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts +1 -1
- package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts.map +1 -1
- package/lib/typescript/components/Chat/Chat.d.ts +1 -1
- package/lib/typescript/components/Chat/Chat.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageEditedTimestamp.d.ts +2 -2
- package/lib/typescript/components/Message/MessageSimple/MessageEditedTimestamp.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageTimestamp.d.ts +2 -13
- package/lib/typescript/components/Message/MessageSimple/MessageTimestamp.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +1 -1
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +1 -1
- package/lib/typescript/components/MessageList/DateHeader.d.ts +1 -1
- package/lib/typescript/components/MessageList/DateHeader.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/InlineDateSeparator.d.ts +7 -1
- package/lib/typescript/components/MessageList/InlineDateSeparator.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/MessageList.d.ts +1 -2
- package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/MessageSystem.d.ts +3 -0
- package/lib/typescript/components/MessageList/MessageSystem.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/StickyHeader.d.ts +18 -0
- package/lib/typescript/components/MessageList/StickyHeader.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +2 -3
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +1 -1
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +6 -0
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts.map +1 -1
- package/lib/typescript/hooks/useStreami18n.d.ts +1 -1
- package/lib/typescript/hooks/useStreami18n.d.ts.map +1 -1
- package/lib/typescript/i18n/en.json +7 -0
- package/lib/typescript/i18n/es.json +7 -0
- package/lib/typescript/i18n/fr.json +7 -0
- package/lib/typescript/i18n/he.json +7 -0
- package/lib/typescript/i18n/hi.json +7 -0
- package/lib/typescript/i18n/it.json +7 -0
- package/lib/typescript/i18n/ja.json +7 -0
- package/lib/typescript/i18n/ko.json +7 -0
- package/lib/typescript/i18n/nl.json +7 -0
- package/lib/typescript/i18n/pt-br.json +7 -0
- package/lib/typescript/i18n/ru.json +7 -0
- package/lib/typescript/i18n/tr.json +7 -0
- package/lib/typescript/index.d.ts +3 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/utils/{Streami18n.d.ts → i18n/Streami18n.d.ts} +16 -5
- package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -0
- package/lib/typescript/utils/i18n/calendarFormats.d.ts +14 -0
- package/lib/typescript/utils/i18n/calendarFormats.d.ts.map +1 -0
- package/lib/typescript/utils/i18n/getDateString.d.ts +16 -0
- package/lib/typescript/utils/i18n/getDateString.d.ts.map +1 -0
- package/lib/typescript/utils/i18n/predefinedFormatters.d.ts +13 -0
- package/lib/typescript/utils/i18n/predefinedFormatters.d.ts.map +1 -0
- package/package.json +3 -2
- package/src/components/Attachment/__tests__/Giphy.test.js +1 -1
- package/src/components/Channel/Channel.tsx +6 -1
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +2 -0
- package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +16 -2
- package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +7 -28
- package/src/components/Chat/Chat.tsx +1 -1
- package/src/components/Chat/__tests__/Chat.test.js +1 -1
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +13 -3
- package/src/components/Message/MessageSimple/MessageEditedTimestamp.tsx +10 -5
- package/src/components/Message/MessageSimple/MessageFooter.tsx +10 -7
- package/src/components/Message/MessageSimple/MessageTimestamp.tsx +20 -29
- package/src/components/Message/MessageSimple/__tests__/MessageStatus.test.js +1 -1
- package/src/components/MessageList/DateHeader.tsx +1 -1
- package/src/components/MessageList/InlineDateSeparator.tsx +20 -15
- package/src/components/MessageList/MessageList.tsx +4 -31
- package/src/components/MessageList/MessageSystem.tsx +20 -8
- package/src/components/MessageList/StickyHeader.tsx +42 -0
- package/src/components/MessageList/__tests__/MessageSystem.test.js +8 -3
- package/src/components/MessageList/__tests__/ScrollToBottomButton.test.js +1 -1
- package/src/components/MessageList/__tests__/TypingIndicator.test.js +1 -1
- package/src/components/Thread/__tests__/Thread.test.js +1 -1
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +1 -1
- package/src/components/index.ts +1 -0
- package/src/contexts/channelContext/ChannelContext.tsx +2 -1
- package/src/contexts/messagesContext/MessagesContext.tsx +6 -0
- package/src/contexts/overlayContext/OverlayContext.tsx +1 -1
- package/src/hooks/useStreami18n.ts +1 -1
- package/src/i18n/en.json +7 -0
- package/src/i18n/es.json +7 -0
- package/src/i18n/fr.json +7 -0
- package/src/i18n/he.json +7 -0
- package/src/i18n/hi.json +7 -0
- package/src/i18n/it.json +7 -0
- package/src/i18n/ja.json +7 -0
- package/src/i18n/ko.json +7 -0
- package/src/i18n/nl.json +7 -0
- package/src/i18n/pt-br.json +7 -0
- package/src/i18n/ru.json +7 -0
- package/src/i18n/tr.json +7 -0
- package/src/index.ts +4 -1
- package/src/utils/__tests__/Streami18n.test.js +23 -1
- package/src/utils/{Streami18n.ts → i18n/Streami18n.ts} +60 -71
- package/src/utils/i18n/calendarFormats.ts +110 -0
- package/src/utils/i18n/getDateString.ts +76 -0
- package/src/utils/i18n/predefinedFormatters.ts +63 -0
- package/src/version.json +1 -1
- package/lib/commonjs/utils/Streami18n.js.map +0 -1
- package/lib/commonjs/utils/getDateString.js +0 -31
- package/lib/commonjs/utils/getDateString.js.map +0 -1
- package/lib/module/utils/Streami18n.js.map +0 -1
- package/lib/module/utils/getDateString.js +0 -31
- package/lib/module/utils/getDateString.js.map +0 -1
- package/lib/typescript/utils/Streami18n.d.ts.map +0 -1
- package/lib/typescript/utils/getDateString.d.ts +0 -30
- package/lib/typescript/utils/getDateString.d.ts.map +0 -1
- package/src/utils/getDateString.ts +0 -67
|
@@ -1,27 +1,14 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { StyleSheet, Text } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { useTheme } from '../../../contexts/themeContext/ThemeContext';
|
|
5
5
|
import {
|
|
6
|
-
TDateTimeParserInput,
|
|
7
6
|
TranslationContextValue,
|
|
8
7
|
useTranslationContext,
|
|
9
8
|
} from '../../../contexts/translationContext/TranslationContext';
|
|
10
|
-
import { getDateString } from '../../../utils/getDateString';
|
|
9
|
+
import { getDateString } from '../../../utils/i18n/getDateString';
|
|
11
10
|
|
|
12
11
|
export type MessageTimestampProps = Partial<Pick<TranslationContextValue, 'tDateTimeParser'>> & {
|
|
13
|
-
/**
|
|
14
|
-
* Whether to show the time in Calendar time format. Calendar time displays time relative to a today's date.
|
|
15
|
-
*/
|
|
16
|
-
calendar?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* The format in which the date should be displayed.
|
|
19
|
-
*/
|
|
20
|
-
format?: string;
|
|
21
|
-
/**
|
|
22
|
-
* A function to format the date.
|
|
23
|
-
*/
|
|
24
|
-
formatDate?: (date: TDateTimeParserInput) => string;
|
|
25
12
|
/**
|
|
26
13
|
* Already Formatted date
|
|
27
14
|
*/
|
|
@@ -30,17 +17,21 @@ export type MessageTimestampProps = Partial<Pick<TranslationContextValue, 'tDate
|
|
|
30
17
|
* The timestamp of the message.
|
|
31
18
|
*/
|
|
32
19
|
timestamp?: string | Date;
|
|
20
|
+
/*
|
|
21
|
+
* Lookup key in the language corresponding translations sheet to perform date formatting
|
|
22
|
+
*/
|
|
23
|
+
timestampTranslationKey?: string;
|
|
33
24
|
};
|
|
34
25
|
|
|
35
26
|
export const MessageTimestamp = (props: MessageTimestampProps) => {
|
|
36
27
|
const {
|
|
37
|
-
calendar,
|
|
38
|
-
format,
|
|
39
|
-
formatDate,
|
|
40
28
|
formattedDate,
|
|
41
29
|
tDateTimeParser: propsTDateTimeParser,
|
|
42
30
|
timestamp,
|
|
31
|
+
timestampTranslationKey = 'timestamp/MessageTimestamp',
|
|
43
32
|
} = props;
|
|
33
|
+
const { t, tDateTimeParser: contextTDateTimeParser } = useTranslationContext();
|
|
34
|
+
const tDateTimeParser = propsTDateTimeParser || contextTDateTimeParser;
|
|
44
35
|
|
|
45
36
|
const {
|
|
46
37
|
theme: {
|
|
@@ -50,7 +41,17 @@ export const MessageTimestamp = (props: MessageTimestampProps) => {
|
|
|
50
41
|
},
|
|
51
42
|
},
|
|
52
43
|
} = useTheme();
|
|
53
|
-
|
|
44
|
+
|
|
45
|
+
const dateString = useMemo(
|
|
46
|
+
() =>
|
|
47
|
+
getDateString({
|
|
48
|
+
date: timestamp,
|
|
49
|
+
t,
|
|
50
|
+
tDateTimeParser,
|
|
51
|
+
timestampTranslationKey,
|
|
52
|
+
}),
|
|
53
|
+
[timestamp, t, tDateTimeParser, timestampTranslationKey],
|
|
54
|
+
);
|
|
54
55
|
|
|
55
56
|
if (formattedDate) {
|
|
56
57
|
return (
|
|
@@ -58,16 +59,6 @@ export const MessageTimestamp = (props: MessageTimestampProps) => {
|
|
|
58
59
|
);
|
|
59
60
|
}
|
|
60
61
|
|
|
61
|
-
if (!timestamp) return null;
|
|
62
|
-
|
|
63
|
-
const dateString = getDateString({
|
|
64
|
-
calendar,
|
|
65
|
-
date: timestamp,
|
|
66
|
-
format,
|
|
67
|
-
formatDate,
|
|
68
|
-
tDateTimeParser: propsTDateTimeParser || contextTDateTimeParser,
|
|
69
|
-
});
|
|
70
|
-
|
|
71
62
|
if (!dateString) return null;
|
|
72
63
|
|
|
73
64
|
return <Text style={[styles.text, { color: grey }, timestampText]}>{dateString.toString()}</Text>;
|
|
@@ -5,7 +5,7 @@ import { cleanup, render, waitFor } from '@testing-library/react-native';
|
|
|
5
5
|
import { generateMessage } from '../../../../mock-builders/generator/message';
|
|
6
6
|
import { generateStaticUser, generateUser } from '../../../../mock-builders/generator/user';
|
|
7
7
|
import { getTestClientWithUser } from '../../../../mock-builders/mock';
|
|
8
|
-
import { Streami18n } from '../../../../utils/Streami18n';
|
|
8
|
+
import { Streami18n } from '../../../../utils/i18n/Streami18n';
|
|
9
9
|
import { Chat } from '../../../Chat/Chat';
|
|
10
10
|
import { MessageStatus } from '../MessageStatus';
|
|
11
11
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
5
5
|
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
|
|
6
|
-
import { getDateString } from '../../utils/getDateString';
|
|
6
|
+
import { getDateString } from '../../utils/i18n/getDateString';
|
|
7
7
|
|
|
8
8
|
const styles = StyleSheet.create({
|
|
9
9
|
container: {
|
|
@@ -22,7 +22,13 @@ const styles = StyleSheet.create({
|
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
24
|
|
|
25
|
+
/**
|
|
26
|
+
* Props for the `InlineDateSeparator` component.
|
|
27
|
+
*/
|
|
25
28
|
export type InlineDateSeparatorProps = {
|
|
29
|
+
/**
|
|
30
|
+
* Date to be displayed.
|
|
31
|
+
*/
|
|
26
32
|
date?: Date;
|
|
27
33
|
};
|
|
28
34
|
|
|
@@ -33,19 +39,18 @@ export const InlineDateSeparator = ({ date }: InlineDateSeparatorProps) => {
|
|
|
33
39
|
inlineDateSeparator: { container, text },
|
|
34
40
|
},
|
|
35
41
|
} = useTheme();
|
|
36
|
-
const { tDateTimeParser } = useTranslationContext();
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
});
|
|
42
|
+
const { t, tDateTimeParser } = useTranslationContext();
|
|
43
|
+
|
|
44
|
+
const dateString = useMemo(
|
|
45
|
+
() =>
|
|
46
|
+
getDateString({
|
|
47
|
+
date,
|
|
48
|
+
t,
|
|
49
|
+
tDateTimeParser,
|
|
50
|
+
timestampTranslationKey: 'timestamp/InlineDateSeparator',
|
|
51
|
+
}),
|
|
52
|
+
[date, t, tDateTimeParser],
|
|
53
|
+
);
|
|
49
54
|
|
|
50
55
|
return (
|
|
51
56
|
<View
|
|
@@ -51,13 +51,8 @@ import {
|
|
|
51
51
|
} from '../../contexts/paginatedMessageListContext/PaginatedMessageListContext';
|
|
52
52
|
import { mergeThemes, ThemeProvider, useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
53
53
|
import { ThreadContextValue, useThreadContext } from '../../contexts/threadContext/ThreadContext';
|
|
54
|
-
import {
|
|
55
|
-
TranslationContextValue,
|
|
56
|
-
useTranslationContext,
|
|
57
|
-
} from '../../contexts/translationContext/TranslationContext';
|
|
58
54
|
|
|
59
55
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
60
|
-
import { getDateString } from '../../utils/getDateString';
|
|
61
56
|
|
|
62
57
|
const WAIT_FOR_SCROLL_TO_OFFSET_TIMEOUT = 150;
|
|
63
58
|
const MAX_RETRIES_AFTER_SCROLL_FAILURE = 10;
|
|
@@ -156,8 +151,7 @@ type MessageListPropsWithContext<
|
|
|
156
151
|
| 'TypingIndicator'
|
|
157
152
|
| 'TypingIndicatorContainer'
|
|
158
153
|
> &
|
|
159
|
-
Pick<ThreadContextValue<StreamChatGenerics>, 'loadMoreThread' | 'thread'> &
|
|
160
|
-
Pick<TranslationContextValue, 't' | 'tDateTimeParser'> & {
|
|
154
|
+
Pick<ThreadContextValue<StreamChatGenerics>, 'loadMoreThread' | 'thread'> & {
|
|
161
155
|
/**
|
|
162
156
|
* Besides existing (default) UX behavior of underlying FlatList of MessageList component, if you want
|
|
163
157
|
* to attach some additional props to underlying FlatList, you can add it to following prop.
|
|
@@ -278,7 +272,6 @@ const MessageListWithContext = <
|
|
|
278
272
|
setTargetedMessage,
|
|
279
273
|
StickyHeader,
|
|
280
274
|
targetedMessage,
|
|
281
|
-
tDateTimeParser,
|
|
282
275
|
thread,
|
|
283
276
|
threadList = false,
|
|
284
277
|
TypingIndicator,
|
|
@@ -1025,18 +1018,6 @@ const MessageListWithContext = <
|
|
|
1025
1018
|
threadList,
|
|
1026
1019
|
]);
|
|
1027
1020
|
|
|
1028
|
-
const stickyHeaderDateFormat =
|
|
1029
|
-
stickyHeaderDate?.getFullYear() === new Date().getFullYear() ? 'MMM D' : 'MMM D, YYYY';
|
|
1030
|
-
|
|
1031
|
-
const stickyHeaderDateString = useMemo(() => {
|
|
1032
|
-
if (!stickyHeaderDate) return null;
|
|
1033
|
-
return getDateString({
|
|
1034
|
-
date: stickyHeaderDate,
|
|
1035
|
-
format: stickyHeaderDateFormat,
|
|
1036
|
-
tDateTimeParser,
|
|
1037
|
-
});
|
|
1038
|
-
}, [stickyHeaderDate, stickyHeaderDateFormat]);
|
|
1039
|
-
|
|
1040
1021
|
const dismissImagePicker = () => {
|
|
1041
1022
|
if (!hasMoved && selectedPicker) {
|
|
1042
1023
|
setSelectedPicker(undefined);
|
|
@@ -1092,13 +1073,6 @@ const MessageListWithContext = <
|
|
|
1092
1073
|
[shouldApplyAndroidWorkaround, HeaderComponent],
|
|
1093
1074
|
);
|
|
1094
1075
|
|
|
1095
|
-
const StickyHeaderComponent = () => {
|
|
1096
|
-
if (!stickyHeaderDateString) return null;
|
|
1097
|
-
if (StickyHeader) return <StickyHeader dateString={stickyHeaderDateString} />;
|
|
1098
|
-
if (messageListLengthAfterUpdate) return <DateHeader dateString={stickyHeaderDateString} />;
|
|
1099
|
-
return null;
|
|
1100
|
-
};
|
|
1101
|
-
|
|
1102
1076
|
// We need to omit the style related props from the additionalFlatListProps and add them directly instead of spreading
|
|
1103
1077
|
let additionalFlatListPropsExcludingStyle:
|
|
1104
1078
|
| Omit<NonNullable<typeof additionalFlatListProps>, 'style' | 'contentContainerStyle'>
|
|
@@ -1183,7 +1157,9 @@ const MessageListWithContext = <
|
|
|
1183
1157
|
{!loading && (
|
|
1184
1158
|
<>
|
|
1185
1159
|
<View style={styles.stickyHeader}>
|
|
1186
|
-
|
|
1160
|
+
{messageListLengthAfterUpdate && StickyHeader && (
|
|
1161
|
+
<StickyHeader date={stickyHeaderDate} DateHeader={DateHeader} />
|
|
1162
|
+
)}
|
|
1187
1163
|
</View>
|
|
1188
1164
|
{!disableTypingIndicator && TypingIndicator && (
|
|
1189
1165
|
<TypingIndicatorContainer>
|
|
@@ -1253,7 +1229,6 @@ export const MessageList = <
|
|
|
1253
1229
|
usePaginatedMessageListContext<StreamChatGenerics>();
|
|
1254
1230
|
const { overlay } = useOverlayContext();
|
|
1255
1231
|
const { loadMoreThread, thread } = useThreadContext<StreamChatGenerics>();
|
|
1256
|
-
const { t, tDateTimeParser } = useTranslationContext();
|
|
1257
1232
|
|
|
1258
1233
|
return (
|
|
1259
1234
|
<MessageListWithContext
|
|
@@ -1295,9 +1270,7 @@ export const MessageList = <
|
|
|
1295
1270
|
setSelectedPicker,
|
|
1296
1271
|
setTargetedMessage,
|
|
1297
1272
|
StickyHeader,
|
|
1298
|
-
t,
|
|
1299
1273
|
targetedMessage,
|
|
1300
|
-
tDateTimeParser,
|
|
1301
1274
|
thread,
|
|
1302
1275
|
threadList,
|
|
1303
1276
|
TypingIndicator,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
2
|
import { StyleProp, StyleSheet, Text, View, ViewStyle } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import type { MessageType } from './hooks/useMessageList';
|
|
@@ -7,14 +7,20 @@ import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
|
7
7
|
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
|
|
8
8
|
|
|
9
9
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
10
|
-
import { getDateString } from '../../utils/getDateString';
|
|
10
|
+
import { getDateString } from '../../utils/i18n/getDateString';
|
|
11
11
|
|
|
12
12
|
export type MessageSystemProps<
|
|
13
13
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
14
14
|
> = {
|
|
15
15
|
/** Current [message object](https://getstream.io/chat/docs/#message_format) */
|
|
16
16
|
message: MessageType<StreamChatGenerics>;
|
|
17
|
+
/**
|
|
18
|
+
* Additional styles for the system message container.
|
|
19
|
+
*/
|
|
17
20
|
style?: StyleProp<ViewStyle>;
|
|
21
|
+
/*
|
|
22
|
+
* Lookup key in the language corresponding translations sheet to perform date formatting
|
|
23
|
+
*/
|
|
18
24
|
};
|
|
19
25
|
|
|
20
26
|
/**
|
|
@@ -37,14 +43,20 @@ export const MessageSystem = <
|
|
|
37
43
|
},
|
|
38
44
|
},
|
|
39
45
|
} = useTheme();
|
|
40
|
-
const { tDateTimeParser } = useTranslationContext();
|
|
46
|
+
const { t, tDateTimeParser } = useTranslationContext();
|
|
41
47
|
|
|
42
48
|
const createdAt = message.created_at;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
49
|
+
|
|
50
|
+
const formattedDate = useMemo(
|
|
51
|
+
() =>
|
|
52
|
+
getDateString({
|
|
53
|
+
date: createdAt,
|
|
54
|
+
t,
|
|
55
|
+
tDateTimeParser,
|
|
56
|
+
timestampTranslationKey: 'timestamp/MessageSystem',
|
|
57
|
+
}),
|
|
58
|
+
[createdAt, t, tDateTimeParser],
|
|
59
|
+
);
|
|
48
60
|
|
|
49
61
|
return (
|
|
50
62
|
<View style={[styles.container, style, container]} testID='message-system'>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
|
|
3
|
+
import { MessagesContextValue } from '../../contexts/messagesContext/MessagesContext';
|
|
4
|
+
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
|
|
5
|
+
|
|
6
|
+
import { DefaultStreamChatGenerics } from '../../types/types';
|
|
7
|
+
import { getDateString } from '../../utils/i18n/getDateString';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Props for the StickyHeader component.
|
|
11
|
+
*/
|
|
12
|
+
export type StickyHeaderProps<
|
|
13
|
+
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
14
|
+
> = Pick<MessagesContextValue<StreamChatGenerics>, 'DateHeader'> & {
|
|
15
|
+
/**
|
|
16
|
+
* Date to be displayed in the sticky header.
|
|
17
|
+
*/
|
|
18
|
+
date?: Date;
|
|
19
|
+
/**
|
|
20
|
+
* The formatted date string to be displayed in the sticky header.
|
|
21
|
+
*/
|
|
22
|
+
dateString?: string | number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const StickyHeader = ({ date, DateHeader, dateString }: StickyHeaderProps) => {
|
|
26
|
+
const { t, tDateTimeParser } = useTranslationContext();
|
|
27
|
+
|
|
28
|
+
const stickyHeaderDateString = useMemo(() => {
|
|
29
|
+
if (dateString) return dateString;
|
|
30
|
+
|
|
31
|
+
return getDateString({
|
|
32
|
+
date,
|
|
33
|
+
t,
|
|
34
|
+
tDateTimeParser,
|
|
35
|
+
timestampTranslationKey: 'timestamp/StickyHeader',
|
|
36
|
+
});
|
|
37
|
+
}, [date]);
|
|
38
|
+
|
|
39
|
+
if (!date) return null;
|
|
40
|
+
|
|
41
|
+
return <DateHeader dateString={stickyHeaderDateString} />;
|
|
42
|
+
};
|
|
@@ -8,14 +8,20 @@ import { TranslationProvider } from '../../../contexts/translationContext/Transl
|
|
|
8
8
|
|
|
9
9
|
import { generateMessage, generateStaticMessage } from '../../../mock-builders/generator/message';
|
|
10
10
|
import { generateStaticUser } from '../../../mock-builders/generator/user';
|
|
11
|
-
import { Streami18n } from '../../../utils/Streami18n';
|
|
11
|
+
import { Streami18n } from '../../../utils/i18n/Streami18n';
|
|
12
12
|
import { MessageSystem } from '../MessageSystem';
|
|
13
13
|
|
|
14
14
|
afterEach(cleanup);
|
|
15
15
|
|
|
16
|
+
let i18nInstance;
|
|
17
|
+
|
|
16
18
|
describe('MessageSystem', () => {
|
|
19
|
+
beforeAll(() => {
|
|
20
|
+
i18nInstance = new Streami18n();
|
|
21
|
+
});
|
|
22
|
+
afterEach(cleanup);
|
|
23
|
+
|
|
17
24
|
it('should render the message system', async () => {
|
|
18
|
-
const i18nInstance = new Streami18n();
|
|
19
25
|
const translators = await i18nInstance.getTranslators();
|
|
20
26
|
const message = generateMessage();
|
|
21
27
|
const { queryByTestId } = render(
|
|
@@ -32,7 +38,6 @@ describe('MessageSystem', () => {
|
|
|
32
38
|
});
|
|
33
39
|
|
|
34
40
|
it('should match the snapshot for message system', async () => {
|
|
35
|
-
const i18nInstance = new Streami18n();
|
|
36
41
|
const translators = await i18nInstance.getTranslators();
|
|
37
42
|
const user = generateStaticUser(0);
|
|
38
43
|
const message = generateStaticMessage('Hello World', { user });
|
|
@@ -4,7 +4,7 @@ import { cleanup, fireEvent, render, waitFor } from '@testing-library/react-nati
|
|
|
4
4
|
|
|
5
5
|
import { ThemeProvider } from '../../../contexts/themeContext/ThemeContext';
|
|
6
6
|
import { TranslationProvider } from '../../../contexts/translationContext/TranslationContext';
|
|
7
|
-
import { Streami18n } from '../../../utils/Streami18n';
|
|
7
|
+
import { Streami18n } from '../../../utils/i18n/Streami18n';
|
|
8
8
|
import { ScrollToBottomButton } from '../ScrollToBottomButton';
|
|
9
9
|
|
|
10
10
|
afterEach(cleanup);
|
|
@@ -7,7 +7,7 @@ import { TypingProvider } from '../../../contexts/typingContext/TypingContext';
|
|
|
7
7
|
|
|
8
8
|
import { generateStaticUser, generateUser } from '../../../mock-builders/generator/user';
|
|
9
9
|
import { getTestClientWithUser } from '../../../mock-builders/mock';
|
|
10
|
-
import { Streami18n } from '../../../utils/Streami18n';
|
|
10
|
+
import { Streami18n } from '../../../utils/i18n/Streami18n';
|
|
11
11
|
import { Chat } from '../../Chat/Chat';
|
|
12
12
|
import { TypingIndicator } from '../TypingIndicator';
|
|
13
13
|
|
|
@@ -15,7 +15,7 @@ import { generateMember } from '../../../mock-builders/generator/member';
|
|
|
15
15
|
import { generateMessage, generateStaticMessage } from '../../../mock-builders/generator/message';
|
|
16
16
|
import { generateStaticUser } from '../../../mock-builders/generator/user';
|
|
17
17
|
import { getTestClientWithUser } from '../../../mock-builders/mock';
|
|
18
|
-
import { Streami18n } from '../../../utils/Streami18n';
|
|
18
|
+
import { Streami18n } from '../../../utils/i18n/Streami18n';
|
|
19
19
|
import { Channel } from '../../Channel/Channel';
|
|
20
20
|
import { Chat } from '../../Chat/Chat';
|
|
21
21
|
import { Thread } from '../Thread';
|
package/src/components/index.ts
CHANGED
|
@@ -108,6 +108,7 @@ export * from './Message/MessageSimple/MessageRepliesAvatars';
|
|
|
108
108
|
export * from './Message/MessageSimple/MessageSimple';
|
|
109
109
|
export * from './Message/MessageSimple/MessageStatus';
|
|
110
110
|
export * from './Message/MessageSimple/MessageTextContainer';
|
|
111
|
+
export * from './Message/MessageSimple/MessageTimestamp';
|
|
111
112
|
export * from './Message/MessageSimple/ReactionList';
|
|
112
113
|
export * from './Message/MessageSimple/utils/renderText';
|
|
113
114
|
export * from './Message/utils/messageActions';
|
|
@@ -4,6 +4,7 @@ import type { Channel, ChannelState } from 'stream-chat';
|
|
|
4
4
|
|
|
5
5
|
import type { EmptyStateProps } from '../../components/Indicators/EmptyStateIndicator';
|
|
6
6
|
import type { LoadingProps } from '../../components/Indicators/LoadingIndicator';
|
|
7
|
+
import { StickyHeaderProps } from '../../components/MessageList/StickyHeader';
|
|
7
8
|
import type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';
|
|
8
9
|
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
|
|
9
10
|
|
|
@@ -180,7 +181,7 @@ export type ChannelContextValue<
|
|
|
180
181
|
*
|
|
181
182
|
* **Default** [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/DateHeader.tsx)
|
|
182
183
|
*/
|
|
183
|
-
StickyHeader?: React.ComponentType<
|
|
184
|
+
StickyHeader?: React.ComponentType<StickyHeaderProps>;
|
|
184
185
|
/**
|
|
185
186
|
* Id of message, around which Channel/MessageList gets loaded when opened.
|
|
186
187
|
* You will see a highlighted background for targetted message, when opened.
|
|
@@ -33,6 +33,7 @@ import type { MessageRepliesAvatarsProps } from '../../components/Message/Messag
|
|
|
33
33
|
import type { MessageSimpleProps } from '../../components/Message/MessageSimple/MessageSimple';
|
|
34
34
|
import type { MessageStatusProps } from '../../components/Message/MessageSimple/MessageStatus';
|
|
35
35
|
import type { MessageTextProps } from '../../components/Message/MessageSimple/MessageTextContainer';
|
|
36
|
+
import { MessageTimestampProps } from '../../components/Message/MessageSimple/MessageTimestamp';
|
|
36
37
|
import type { ReactionListProps } from '../../components/Message/MessageSimple/ReactionList';
|
|
37
38
|
import type { MarkdownRules } from '../../components/Message/MessageSimple/utils/renderText';
|
|
38
39
|
import type { MessageActionsParams } from '../../components/Message/utils/messageActions';
|
|
@@ -217,6 +218,11 @@ export type MessagesContextValue<
|
|
|
217
218
|
* Defaults to: [MessageSystem](https://getstream.io/chat/docs/sdk/reactnative/ui-components/message-system/)
|
|
218
219
|
*/
|
|
219
220
|
MessageSystem: React.ComponentType<MessageSystemProps<StreamChatGenerics>>;
|
|
221
|
+
/**
|
|
222
|
+
* UI component for MessageTimestamp
|
|
223
|
+
* Defaults to: [MessageTimestamp](https://github.com/GetStream/stream-chat-react-native/blob/develop/package/src/components/Message/MessageSimple/MessageTimestamp.tsx)
|
|
224
|
+
*/
|
|
225
|
+
MessageTimestamp: React.ComponentType<MessageTimestampProps>;
|
|
220
226
|
/**
|
|
221
227
|
* UI component for OverlayReactionList
|
|
222
228
|
*/
|
|
@@ -8,7 +8,7 @@ import type { ImageGalleryCustomComponents } from '../../components/ImageGallery
|
|
|
8
8
|
|
|
9
9
|
import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
|
|
10
10
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
11
|
-
import type { Streami18n } from '../../utils/Streami18n';
|
|
11
|
+
import type { Streami18n } from '../../utils/i18n/Streami18n';
|
|
12
12
|
import type { AttachmentPickerContextValue } from '../attachmentPickerContext/AttachmentPickerContext';
|
|
13
13
|
import type { MessageOverlayContextValue } from '../messageOverlayContext/MessageOverlayContext';
|
|
14
14
|
import type { DeepPartial } from '../themeContext/ThemeContext';
|
|
@@ -5,7 +5,7 @@ import Dayjs from 'dayjs';
|
|
|
5
5
|
import { useIsMountedRef } from './useIsMountedRef';
|
|
6
6
|
|
|
7
7
|
import type { TranslatorFunctions } from '../contexts/translationContext/TranslationContext';
|
|
8
|
-
import { Streami18n } from '../utils/Streami18n';
|
|
8
|
+
import { Streami18n } from '../utils/i18n/Streami18n';
|
|
9
9
|
|
|
10
10
|
export const useStreami18n = (i18nInstance?: Streami18n) => {
|
|
11
11
|
const [translators, setTranslators] = useState<TranslatorFunctions>({
|
package/src/i18n/en.json
CHANGED
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
"Video": "Video",
|
|
75
75
|
"You": "You",
|
|
76
76
|
"You can't send messages in this channel": "You can't send messages in this channel",
|
|
77
|
+
"timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Yesterday]\", \"lastWeek\":\"dddd\", \"nextDay\":\"[Tomorrow]\", \"nextWeek\":\"dddd [at] LT\", \"sameDay\":\"LT\", \"sameElse\":\"L\"}) }}",
|
|
78
|
+
"timestamp/ImageGalleryHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
79
|
+
"timestamp/InlineDateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
80
|
+
"timestamp/MessageEditedTimestamp": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
81
|
+
"timestamp/MessageSystem": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
82
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(format: LT) }}",
|
|
83
|
+
"timestamp/StickyHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
77
84
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} and {{ nonSelfUserLength }} more are typing",
|
|
78
85
|
"{{ index }} of {{ photoLength }}": "{{ index }} of {{ photoLength }}",
|
|
79
86
|
"{{ replyCount }} Replies": "{{ replyCount }} Replies",
|
package/src/i18n/es.json
CHANGED
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
"Video": "Video",
|
|
75
75
|
"You": "Tú",
|
|
76
76
|
"You can't send messages in this channel": "No puedes enviar mensajes en este canal",
|
|
77
|
+
"timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Ayer]\", \"lastWeek\":\"dddd\", \"nextDay\":\"[Mañana]\", \"nextWeek\":\"dddd [a las] LT\", \"sameDay\":\"LT\", \"sameElse\":\"L\"}) }}",
|
|
78
|
+
"timestamp/ImageGalleryHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
79
|
+
"timestamp/InlineDateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
80
|
+
"timestamp/MessageEditedTimestamp": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
81
|
+
"timestamp/MessageSystem": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
82
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(format: LT) }}",
|
|
83
|
+
"timestamp/StickyHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
77
84
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} y {{ nonSelfUserLength }} más están escribiendo",
|
|
78
85
|
"{{ index }} of {{ photoLength }}": "{{ index }} de {{ photoLength }}",
|
|
79
86
|
"{{ replyCount }} Replies": "{{ replyCount }} Respuestas",
|
package/src/i18n/fr.json
CHANGED
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
"Video": "Vidéo",
|
|
75
75
|
"You": "Toi",
|
|
76
76
|
"You can't send messages in this channel": "You can't send messages in this channel",
|
|
77
|
+
"timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Hier]\", \"lastWeek\":\"dddd\", \"nextDay\":\"[Demain]\", \"nextWeek\":\"dddd [à] LT\", \"sameDay\":\"LT\", \"sameElse\":\"L\"}) }}",
|
|
78
|
+
"timestamp/ImageGalleryHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
79
|
+
"timestamp/InlineDateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
80
|
+
"timestamp/MessageEditedTimestamp": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
81
|
+
"timestamp/MessageSystem": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
82
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(format: LT) }}",
|
|
83
|
+
"timestamp/StickyHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
77
84
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} et {{ nonSelfUserLength }} autres sont en train d'écrire",
|
|
78
85
|
"{{ index }} of {{ photoLength }}": "{{ index }} sur {{ photoLength }}",
|
|
79
86
|
"{{ replyCount }} Replies": "{{ replyCount }} Réponses",
|
package/src/i18n/he.json
CHANGED
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
"Video": "וִידֵאוֹ",
|
|
75
75
|
"You": "את/ה",
|
|
76
76
|
"You can't send messages in this channel": "את/ב לא יכול/ה לשלוח הודעות בשיחה זו",
|
|
77
|
+
"timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[אתמול]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[מחר]\",\"nextWeek\":\"dddd [בשעה] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
|
|
78
|
+
"timestamp/ImageGalleryHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
79
|
+
"timestamp/InlineDateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
80
|
+
"timestamp/MessageEditedTimestamp": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
81
|
+
"timestamp/MessageSystem": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
82
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(format: LT) }}",
|
|
83
|
+
"timestamp/StickyHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
77
84
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ו-{{ nonSelfUserLength }} משתמש/ים אחר/ים מקלידים",
|
|
78
85
|
"{{ index }} of {{ photoLength }}": "{{ index }} מתוך {{ photoLength }}",
|
|
79
86
|
"{{ replyCount }} Replies": "{{ replyCount }} תגובות",
|
package/src/i18n/hi.json
CHANGED
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
"Video": "वीडियो",
|
|
75
75
|
"You": "आप",
|
|
76
76
|
"You can't send messages in this channel": "आप इस चैनल में संदेश नहीं भेज सकते",
|
|
77
|
+
"timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[कल]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[कल]\",\"nextWeek\":\"dddd [को] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
|
|
78
|
+
"timestamp/ImageGalleryHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
79
|
+
"timestamp/InlineDateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
80
|
+
"timestamp/MessageEditedTimestamp": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
81
|
+
"timestamp/MessageSystem": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
82
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(format: LT) }}",
|
|
83
|
+
"timestamp/StickyHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
77
84
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} और {{ nonSelfUserLength }} अधिक टाइप कर रहे हैं",
|
|
78
85
|
"{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
|
|
79
86
|
"{{ replyCount }} Replies": "{{ replyCount }} रिप्लाई",
|
package/src/i18n/it.json
CHANGED
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
"Video": "Video",
|
|
75
75
|
"You": "Tu",
|
|
76
76
|
"You can't send messages in this channel": "Non puoi inviare messaggi in questo canale",
|
|
77
|
+
"timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Ieri]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[Domani]\",\"nextWeek\":\"dddd [alle] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
|
|
78
|
+
"timestamp/ImageGalleryHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
79
|
+
"timestamp/InlineDateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
80
|
+
"timestamp/MessageEditedTimestamp": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
81
|
+
"timestamp/MessageSystem": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
82
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(format: LT) }}",
|
|
83
|
+
"timestamp/StickyHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
77
84
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} e altri {{ nonSelfUserLength }} stanno scrivendo",
|
|
78
85
|
"{{ index }} of {{ photoLength }}": "{{ index }} di {{ photoLength }}",
|
|
79
86
|
"{{ replyCount }} Replies": "{{ replyCount }} Risposte",
|
package/src/i18n/ja.json
CHANGED
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
"Video": "ビデオ",
|
|
75
75
|
"You": "あなた",
|
|
76
76
|
"You can't send messages in this channel": "このチャンネルではメッセージを送信できません",
|
|
77
|
+
"timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[昨日]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[明日]\",\"nextWeek\":\"dddd [の] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
|
|
78
|
+
"timestamp/ImageGalleryHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
79
|
+
"timestamp/InlineDateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
80
|
+
"timestamp/MessageEditedTimestamp": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
81
|
+
"timestamp/MessageSystem": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
82
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(format: LT) }}",
|
|
83
|
+
"timestamp/StickyHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
77
84
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }}と{{ nonSelfUserLength }}人がタイピングしています",
|
|
78
85
|
"{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
|
|
79
86
|
"{{ replyCount }} Replies": "{{ replyCount }}件の返信",
|
package/src/i18n/ko.json
CHANGED
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
"Video": "동영상",
|
|
75
75
|
"You": "당신",
|
|
76
76
|
"You can't send messages in this channel": "이 채널에서는 메세지를 전송할 수 없습니다",
|
|
77
|
+
"timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[어제]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[내일]\",\"nextWeek\":\"dddd [LT에]\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
|
|
78
|
+
"timestamp/ImageGalleryHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
79
|
+
"timestamp/InlineDateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
80
|
+
"timestamp/MessageEditedTimestamp": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
81
|
+
"timestamp/MessageSystem": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
82
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(format: LT) }}",
|
|
83
|
+
"timestamp/StickyHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
77
84
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} 외 {{ nonSelfUserLength }}명이 입력 중입니다",
|
|
78
85
|
"{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
|
|
79
86
|
"{{ replyCount }} Replies": "{{ replyCount }} 답글",
|
package/src/i18n/nl.json
CHANGED
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
"Video": "Video",
|
|
75
75
|
"You": "U",
|
|
76
76
|
"You can't send messages in this channel": "Je kan geen berichten sturen in dit kanaal",
|
|
77
|
+
"timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Gisteren]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[Morgen]\",\"nextWeek\":\"dddd [om] LT\",\"sameDay\":\"LT\",\"sameElse\":\"L\"}) }}",
|
|
78
|
+
"timestamp/ImageGalleryHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
79
|
+
"timestamp/InlineDateSeparator": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
80
|
+
"timestamp/MessageEditedTimestamp": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
81
|
+
"timestamp/MessageSystem": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
82
|
+
"timestamp/MessageTimestamp": "{{ timestamp | timestampFormatter(format: LT) }}",
|
|
83
|
+
"timestamp/StickyHeader": "{{ timestamp | timestampFormatter(calendar: true) }}",
|
|
77
84
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} en {{ nonSelfUserLength }} anderen zijn aan het typen",
|
|
78
85
|
"{{ index }} of {{ photoLength }}": "{{ index }} van {{ photoLength }}",
|
|
79
86
|
"{{ replyCount }} Replies": "{{ replyCount }} Antwoorden",
|