stream-chat-react-native-core 5.32.0-beta.1 → 5.32.0-beta.3
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 +88 -81
- package/lib/commonjs/i18n/es.json +88 -81
- package/lib/commonjs/i18n/fr.json +88 -81
- package/lib/commonjs/i18n/he.json +88 -81
- package/lib/commonjs/i18n/hi.json +88 -81
- package/lib/commonjs/i18n/it.json +88 -81
- package/lib/commonjs/i18n/ja.json +88 -81
- package/lib/commonjs/i18n/ko.json +88 -81
- package/lib/commonjs/i18n/nl.json +88 -81
- package/lib/commonjs/i18n/pt-br.json +90 -0
- package/lib/commonjs/i18n/ru.json +88 -81
- package/lib/commonjs/i18n/tr.json +88 -81
- package/lib/commonjs/index.js +2 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/{module/utils → commonjs/utils/i18n}/Streami18n.js +62 -69
- 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 +88 -81
- package/lib/module/i18n/es.json +88 -81
- package/lib/module/i18n/fr.json +88 -81
- package/lib/module/i18n/he.json +88 -81
- package/lib/module/i18n/hi.json +88 -81
- package/lib/module/i18n/it.json +88 -81
- package/lib/module/i18n/ja.json +88 -81
- package/lib/module/i18n/ko.json +88 -81
- package/lib/module/i18n/nl.json +88 -81
- package/lib/module/i18n/pt-br.json +90 -0
- package/lib/module/i18n/ru.json +88 -81
- package/lib/module/i18n/tr.json +88 -81
- package/lib/module/index.js +2 -1
- package/lib/module/index.js.map +1 -1
- package/lib/{commonjs/utils → module/utils/i18n}/Streami18n.js +62 -69
- 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 +88 -81
- package/lib/typescript/i18n/es.json +88 -81
- package/lib/typescript/i18n/fr.json +88 -81
- package/lib/typescript/i18n/he.json +88 -81
- package/lib/typescript/i18n/hi.json +88 -81
- package/lib/typescript/i18n/it.json +88 -81
- package/lib/typescript/i18n/ja.json +88 -81
- package/lib/typescript/i18n/ko.json +88 -81
- package/lib/typescript/i18n/nl.json +88 -81
- package/lib/typescript/i18n/pt-br.json +90 -0
- package/lib/typescript/i18n/ru.json +88 -81
- package/lib/typescript/i18n/tr.json +88 -81
- 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 -10
- 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 +10 -10
- 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 +8 -1
- package/src/i18n/es.json +73 -66
- package/src/i18n/fr.json +73 -66
- package/src/i18n/he.json +73 -66
- package/src/i18n/hi.json +73 -66
- package/src/i18n/it.json +73 -66
- package/src/i18n/ja.json +73 -66
- package/src/i18n/ko.json +75 -68
- package/src/i18n/nl.json +73 -66
- package/src/i18n/pt-br.json +90 -0
- package/src/i18n/ru.json +73 -66
- package/src/i18n/tr.json +73 -66
- 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/i18n/pt-BR.json +0 -83
- 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/i18n/pt-BR.json +0 -83
- 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/i18n/pt-BR.json +0 -83
- 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/i18n/pt-BR.json +0 -83
- package/src/utils/getDateString.ts +0 -67
|
@@ -1,83 +1,90 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
2
|
+
"1 Reply": "1 Cevap",
|
|
3
|
+
"1 Thread Reply": "1 Konu Yanıtı",
|
|
4
|
+
"Allow access to your Gallery": "Galerinize erişime izin verin",
|
|
5
|
+
"Allow camera access in device settings": "Cihaz ayarlarında kamera erişimine izin ver",
|
|
6
|
+
"Also send to channel": "Kanala da gönder",
|
|
7
|
+
"Are you sure you want to permanently delete this message?": "Bu mesajı kalıcı olarak silmek istediğinizden emin misiniz?",
|
|
8
|
+
"Are you sure?": "Emin misiniz?",
|
|
9
|
+
"Block User": "Kullanıcıyı engelle",
|
|
10
|
+
"Cancel": "İptal",
|
|
11
|
+
"Cannot Flag Message": "Raporlama Başarısız",
|
|
12
|
+
"Consider how your comment might make others feel and be sure to follow our Community Guidelines": "Yorumunuzun diğerlerini nasıl hissettirebileceğini düşünün ve topluluk kurallarımızı takip ettiğinizden emin olun",
|
|
13
|
+
"Copy Message": "Mesajı Kopyala",
|
|
14
|
+
"Delete": "Sil",
|
|
15
|
+
"Delete Message": "Mesajı Sil",
|
|
16
|
+
"Device camera is used to take photos or videos.": "Cihaz kamerası fotoğraf veya video çekmek için kullanılır.",
|
|
17
|
+
"Do you want to send a copy of this message to a moderator for further investigation?": "Detaylı inceleme için bu mesajın kopyasını moderatöre göndermek istiyor musunuz?",
|
|
18
|
+
"Edit Message": "Mesajı Düzenle",
|
|
19
|
+
"Edited": "Düzenlendi",
|
|
20
|
+
"Editing Message": "Mesaj Düzenleniyor",
|
|
21
|
+
"Emoji matching": "Emoji eşleştirme",
|
|
22
|
+
"Empty message...": "Boş mesaj...",
|
|
23
|
+
"Error loading": "Yükleme hatası",
|
|
24
|
+
"Error loading channel list...": "Kanal listesi yüklenirken hata oluştu...",
|
|
25
|
+
"Error loading messages for this channel...": "Bu kanal için mesajlar yüklenirken hata oluştu...",
|
|
26
|
+
"Error while loading, please reload/refresh": "Yüklenirken hata oluştu, lütfen tekrar deneyiniz",
|
|
27
|
+
"File is too large: {{ size }}, maximum upload size is {{ limit }}": "Dosya çok büyük: {{ size }}, maksimum yükleme boyutu {{ limit }}",
|
|
28
|
+
"File type not supported": "Dosya türü desteklenmiyor",
|
|
29
|
+
"Flag": "Raporla",
|
|
30
|
+
"Flag Message": "Mesajı Raporla",
|
|
31
|
+
"Flag action failed either due to a network issue or the message is already flagged": "Mesajın daha önce raporlanmış olması veya bir ağ bağlantısı sorunu nedeniyle raporlama işlemi başarısız oldu.",
|
|
32
|
+
"Hold to start recording.": "Kayıt yapmak için basılı tutun.",
|
|
33
|
+
"How about sending your first message to a friend?": "İlk mesajınızı bir arkadaşınıza göndermeye ne dersiniz?",
|
|
34
|
+
"Instant Commands": "Anlık Komutlar",
|
|
35
|
+
"Let's start chatting!": "Haydi sohbete başlayalım!",
|
|
36
|
+
"Links are disabled": "Bağlantılar devre dışı",
|
|
37
|
+
"Loading channels...": "Kanallar yükleniyor...",
|
|
38
|
+
"Loading messages...": "Mesajlar yükleniyor...",
|
|
39
|
+
"Loading...": "Yükleniyor...",
|
|
40
|
+
"Message Reactions": "Mesaj Tepkileri",
|
|
41
|
+
"Message deleted": "Mesaj silindi",
|
|
42
|
+
"Message flagged": "Mesaj işaretlendi",
|
|
43
|
+
"Mute User": "Kullanıcıyı sessize al",
|
|
44
|
+
"No chats here yet…": "Henüz burada sohbet yok…",
|
|
45
|
+
"Not supported": "Desteklenmiyor",
|
|
46
|
+
"Nothing yet...": "Henüz değil...",
|
|
47
|
+
"Ok": "Tamam",
|
|
48
|
+
"Only visible to you": "Sadece siz görebilirsiniz",
|
|
49
|
+
"Open Settings": "Ayarları aç",
|
|
50
|
+
"Photo": "Fotoğraf",
|
|
51
|
+
"Photos and Videos": "Fotoğraflar ve Videolar",
|
|
52
|
+
"Pin to Conversation": "Konuşmaya sabitle",
|
|
53
|
+
"Pinned by": "Tarafından sabitlendi",
|
|
54
|
+
"Please allow Audio permissions in settings.": "Lütfen ayarlarda ses izinlerine izin verin",
|
|
55
|
+
"Please enable access to your photos and videos so you can share them.": "Paylaşım yapabilmek için lutfen fotoğraflarınıza ve videolarınıza erişimi etkinleştirin.",
|
|
56
|
+
"Please select a channel first": "Lütfen önce bir kanal seçiniz",
|
|
57
|
+
"Reconnecting...": "Yeniden Bağlanılıyor...",
|
|
58
|
+
"Reply": "Yanıtla",
|
|
59
|
+
"Reply to Message": "Mesajı Yanıtla",
|
|
60
|
+
"Resend": "Yeniden gönder",
|
|
61
|
+
"Search GIFs": "GIF Ara",
|
|
62
|
+
"Select More Photos": "Daha Fazla Fotoğraf Seçin",
|
|
63
|
+
"Send Anyway": "Yine de Gönder",
|
|
64
|
+
"Send a message": "Mesaj gönder",
|
|
65
|
+
"Sending links is not allowed in this conversation": "Bu konuşmada bağlantı göndermek desteklenmiyor",
|
|
66
|
+
"Slow mode ON": "Yavaş Mod Açık",
|
|
67
|
+
"The message has been reported to a moderator.": "Mesaj moderatöre bildirildi.",
|
|
68
|
+
"Thread Reply": "Konu Yanıtı",
|
|
69
|
+
"Unblock User": "Kullanıcının engelini kaldır",
|
|
70
|
+
"Unknown User": "Bilinmeyen kullanıcı",
|
|
71
|
+
"Unmute User": "Kullanıcının sesini aç",
|
|
72
|
+
"Unpin from Conversation": "Sabitlemeyi kaldır",
|
|
73
|
+
"Unread Messages": "Okunmamış Mesajlar",
|
|
74
|
+
"Video": "Video",
|
|
75
|
+
"You": "Sen",
|
|
76
|
+
"You can't send messages in this channel": "Bu konuşmaya mesaj gönderemezsiniz",
|
|
77
|
+
"timestamp/ChannelPreviewStatus": "{{ timestamp | timestampFormatter(calendar: true; calendarFormats: {\"lastDay\":\"[Dün]\",\"lastWeek\":\"dddd\",\"nextDay\":\"[Yarın]\",\"nextWeek\":\"dddd [saat] 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) }}",
|
|
84
|
+
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": "{{ firstUser }} ve {{ nonSelfUserLength }} kişi daha yazıyor",
|
|
85
|
+
"{{ index }} of {{ photoLength }}": "{{ index }} / {{ photoLength }}",
|
|
86
|
+
"{{ replyCount }} Replies": "{{ replyCount }} Cevap",
|
|
87
|
+
"{{ replyCount }} Thread Replies": "{{responseCount}} Konu Cevapı",
|
|
88
|
+
"{{ user }} is typing": "{{ user }} yazıyor",
|
|
89
|
+
"🏙 Attachment...": "🏙 Ek..."
|
|
83
90
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
/** i18next polyfill to handle intl format for pluralization. For more info see https://www.i18next.com/misc/json-format#i-18-next-json-v4 */
|
|
2
|
+
import 'intl-pluralrules';
|
|
1
3
|
export * from './components';
|
|
2
4
|
export * from './hooks';
|
|
3
5
|
export { registerNativeHandlers, NetInfo, iOS14RefreshGallerySelection } from './native';
|
|
@@ -6,7 +8,7 @@ export * from './emoji-data';
|
|
|
6
8
|
export * from './icons';
|
|
7
9
|
export * from './types/types';
|
|
8
10
|
export * from './utils/patchMessageTextCommand';
|
|
9
|
-
export * from './utils/Streami18n';
|
|
11
|
+
export * from './utils/i18n/Streami18n';
|
|
10
12
|
export * from './utils/utils';
|
|
11
13
|
export * from './utils/StreamChatRN';
|
|
12
14
|
export { default as enTranslations } from './i18n/en.json';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACzF,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAE7B,cAAc,SAAS,CAAC;AAExB,cAAc,eAAe,CAAC;AAE9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,6IAA6I;AAC7I,OAAO,kBAAkB,CAAC;AAE1B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AACzF,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAE7B,cAAc,SAAS,CAAC;AAExB,cAAc,eAAe,CAAC;AAE9B,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AAErC,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAE3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,KAAK,gBAAgB,MAAM,cAAc,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import Dayjs from 'dayjs';
|
|
2
2
|
import { FallbackLng, TFunction } from 'i18next';
|
|
3
3
|
import type moment from 'moment';
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import { CustomFormatters, PredefinedFormatters } from './predefinedFormatters';
|
|
5
|
+
import type { TDateTimeParser } from '../../contexts/translationContext/TranslationContext';
|
|
6
|
+
import enTranslations from '../../i18n/en.json';
|
|
6
7
|
import 'dayjs/locale/es';
|
|
7
8
|
import 'dayjs/locale/fr';
|
|
8
9
|
import 'dayjs/locale/he';
|
|
@@ -20,12 +21,13 @@ import 'dayjs/locale/tr';
|
|
|
20
21
|
* sure we don't mess up languages in other places in the app.
|
|
21
22
|
*/
|
|
22
23
|
import 'dayjs/locale/en';
|
|
23
|
-
import type { DefaultStreamChatGenerics } from '
|
|
24
|
-
type
|
|
24
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
25
|
+
type Streami18nOptions = {
|
|
25
26
|
DateTimeParser?: typeof Dayjs | typeof moment;
|
|
26
27
|
dayjsLocaleConfigForLanguage?: Partial<ILocale>;
|
|
27
28
|
debug?: boolean;
|
|
28
29
|
disableDateTimeTranslations?: boolean;
|
|
30
|
+
formatters?: Partial<PredefinedFormatters> & CustomFormatters;
|
|
29
31
|
language?: string;
|
|
30
32
|
logger?: (msg?: string) => void;
|
|
31
33
|
translationsForLanguage?: Partial<typeof enTranslations>;
|
|
@@ -35,6 +37,7 @@ type I18NextConfig = {
|
|
|
35
37
|
fallbackLng: false | FallbackLng;
|
|
36
38
|
interpolation: {
|
|
37
39
|
escapeValue: boolean;
|
|
40
|
+
formatSeparator: string;
|
|
38
41
|
};
|
|
39
42
|
keySeparator: false | string;
|
|
40
43
|
lng: string;
|
|
@@ -71,6 +74,7 @@ export declare class Streami18n {
|
|
|
71
74
|
logger: (msg?: string) => void;
|
|
72
75
|
currentLanguage: string;
|
|
73
76
|
DateTimeParser: typeof Dayjs | typeof moment;
|
|
77
|
+
formatters: PredefinedFormatters & CustomFormatters;
|
|
74
78
|
isCustomDateTimeParser: boolean;
|
|
75
79
|
i18nextConfig: I18NextConfig;
|
|
76
80
|
/**
|
|
@@ -99,7 +103,7 @@ export declare class Streami18n {
|
|
|
99
103
|
*
|
|
100
104
|
* @param {*} options
|
|
101
105
|
*/
|
|
102
|
-
constructor(options?:
|
|
106
|
+
constructor(options?: Streami18nOptions, i18nextConfig?: Partial<I18NextConfig>);
|
|
103
107
|
/**
|
|
104
108
|
* Initializes the i18next instance with configuration (which enables natural language as default keys)
|
|
105
109
|
*/
|
|
@@ -135,11 +139,6 @@ export declare class Streami18n {
|
|
|
135
139
|
"Editing Message": string;
|
|
136
140
|
"Emoji matching": string;
|
|
137
141
|
"Empty message...": string;
|
|
138
|
-
/**
|
|
139
|
-
* These locale imports also set these locales globally.
|
|
140
|
-
* So as a last step we import the english locale to make
|
|
141
|
-
* sure we don't mess up languages in other places in the app.
|
|
142
|
-
*/
|
|
143
142
|
"Error loading": string;
|
|
144
143
|
"Error loading channel list...": string;
|
|
145
144
|
"Error loading messages for this channel...": string;
|
|
@@ -194,6 +193,13 @@ export declare class Streami18n {
|
|
|
194
193
|
Video: string;
|
|
195
194
|
You: string;
|
|
196
195
|
"You can't send messages in this channel": string;
|
|
196
|
+
"timestamp/ChannelPreviewStatus": string;
|
|
197
|
+
"timestamp/ImageGalleryHeader": string;
|
|
198
|
+
"timestamp/InlineDateSeparator": string;
|
|
199
|
+
"timestamp/MessageEditedTimestamp": string;
|
|
200
|
+
"timestamp/MessageSystem": string;
|
|
201
|
+
"timestamp/MessageTimestamp": string;
|
|
202
|
+
"timestamp/StickyHeader": string;
|
|
197
203
|
"{{ firstUser }} and {{ nonSelfUserLength }} more are typing": string;
|
|
198
204
|
"{{ index }} of {{ photoLength }}": string;
|
|
199
205
|
"{{ replyCount }} Replies": string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Streami18n.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/Streami18n.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
type CalendarFormats = {
|
|
2
|
+
lastDay: string;
|
|
3
|
+
lastWeek: string;
|
|
4
|
+
nextDay: string;
|
|
5
|
+
nextWeek: string;
|
|
6
|
+
sameDay: string;
|
|
7
|
+
sameElse: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Calendar formats for different languages.
|
|
11
|
+
*/
|
|
12
|
+
export declare const calendarFormats: Record<string, CalendarFormats>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=calendarFormats.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"calendarFormats.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/calendarFormats.ts"],"names":[],"mappings":"AAAA,KAAK,eAAe,GAAG;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAiG3D,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { TimestampFormatterOptions } from './predefinedFormatters';
|
|
2
|
+
import { TranslatorFunctions } from '../../contexts/translationContext/TranslationContext';
|
|
3
|
+
type DateFormatterOptions = TimestampFormatterOptions & Partial<TranslatorFunctions> & {
|
|
4
|
+
/**
|
|
5
|
+
* The timestamp to be formatted.
|
|
6
|
+
*/
|
|
7
|
+
date?: string | Date;
|
|
8
|
+
timestampTranslationKey?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const noParsingFunctionWarning = "MessageTimestamp was called but there is no datetime parsing function available";
|
|
11
|
+
/**
|
|
12
|
+
* Utility function to format the date string.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getDateString({ calendar, calendarFormats, date, format, t, tDateTimeParser, timestampTranslationKey, }: DateFormatterOptions): string | number | undefined;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=getDateString.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getDateString.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/getDateString.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAExE,OAAO,EAEL,mBAAmB,EACpB,MAAM,sDAAsD,CAAC;AAE9D,KAAK,oBAAoB,GAAG,yBAAyB,GACnD,OAAO,CAAC,mBAAmB,CAAC,GAAG;IAC7B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAIrB,uBAAuB,CAAC,EAAE,MAAM,CAAC;CAClC,CAAC;AAEJ,eAAO,MAAM,wBAAwB,oFAC8C,CAAC;AAEpF;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,eAAe,EACf,IAAI,EACJ,MAAM,EACN,CAAC,EACD,eAAe,EACf,uBAAuB,GACxB,EAAE,oBAAoB,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CA0CpD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Streami18n } from './Streami18n';
|
|
2
|
+
export type TimestampFormatterOptions = {
|
|
3
|
+
calendar?: boolean | null;
|
|
4
|
+
calendarFormats?: Record<string, string>;
|
|
5
|
+
format?: string;
|
|
6
|
+
};
|
|
7
|
+
export type FormatterFactory<V> = (streamI18n: Streami18n) => (value: V, lng: string | undefined, options: Record<string, unknown>) => string;
|
|
8
|
+
export type CustomFormatters = Record<string, FormatterFactory<any>>;
|
|
9
|
+
export type PredefinedFormatters = {
|
|
10
|
+
timestampFormatter: FormatterFactory<string | Date>;
|
|
11
|
+
};
|
|
12
|
+
export declare const predefinedFormatters: PredefinedFormatters;
|
|
13
|
+
//# sourceMappingURL=predefinedFormatters.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"predefinedFormatters.d.ts","sourceRoot":"","sources":["../../../../src/utils/i18n/predefinedFormatters.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,MAAM,MAAM,yBAAyB,GAAG;IAEtC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAE1B,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAEzC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,gBAAgB,CAAC,CAAC,IAAI,CAChC,UAAU,EAAE,UAAU,KACnB,CAAC,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,MAAM,CAAC;AAKrF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,GAAG,CAAC,CAAC,CAAC;AAErE,MAAM,MAAM,oBAAoB,GAAG;IACjC,kBAAkB,EAAE,gBAAgB,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,oBAqClC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react-native-core",
|
|
3
3
|
"description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
|
|
4
|
-
"version": "5.32.0-beta.
|
|
4
|
+
"version": "5.32.0-beta.3",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -23,17 +23,16 @@
|
|
|
23
23
|
],
|
|
24
24
|
"scripts": {
|
|
25
25
|
"analyze": "yarn build -- --stats && webpack-bundle-analyzer build/bundle-stats.json",
|
|
26
|
-
"build": "rm -rf lib && yarn run --silent build-translations && bob build && yarn run --silent copy-translations
|
|
27
|
-
"
|
|
28
|
-
"build-translations": "rm -rf .tmpi18ncache || true && mkdir .tmpi18ncache && yarn run babel --config-file ./babel.i18next-extract.json 'src/**/*.{js,jsx,ts,tsx}' --out-dir '.tmpi18ncache/' && rm -rf .tmpi18ncache && prettier --write 'src/i18n/*.{js,ts,tsx,md,json}' .eslintrc.json ../.prettierrc .babelrc",
|
|
26
|
+
"build": "rm -rf lib && yarn run --silent build-translations && bob build && yarn run --silent copy-translations",
|
|
27
|
+
"build-translations": "i18next",
|
|
29
28
|
"copy-translations": "echo '\u001b[34mℹ\u001b[0m Copying translation files to \u001b[34mlib/typescript/i18n\u001b[0m' && cp -R -f ./src/i18n ./lib/typescript/i18n && echo '\u001b[32m✓\u001b[0m Done Copying Translations'",
|
|
30
29
|
"eslint": "eslint 'src/**/*.{js,md,ts,jsx,tsx}' --max-warnings 0",
|
|
31
|
-
"lint": "prettier --ignore-path ../.prettierignore --list-different 'src/**/*.{js,ts,tsx,md,json}' .eslintrc.json ../.prettierrc .
|
|
32
|
-
"lint-fix": "prettier --ignore-path ../.prettierignore --write 'src/**/*.{js,ts,tsx,md,json}' .eslintrc.json ../.prettierrc .
|
|
30
|
+
"lint": "prettier --ignore-path ../.prettierignore --list-different 'src/**/*.{js,ts,tsx,md,json}' .eslintrc.json ../.prettierrc babel.config.js && eslint 'src/**/*.{js,ts,tsx,md}' --max-warnings 0 && yarn run validate-translations",
|
|
31
|
+
"lint-fix": "prettier --ignore-path ../.prettierignore --write 'src/**/*.{js,ts,tsx,md,json}' .eslintrc.json ../.prettierrc babel.config.js && eslint --fix 'src/**/*.{js,ts,tsx,md}' --max-warnings 0",
|
|
33
32
|
"prepare": "yarn run build",
|
|
34
33
|
"prepare-distribution": "cd examples/SampleApp && npm version patch && react-native-version && git add ./ && git commit -m 'Bump build version' --no-verify",
|
|
35
|
-
"prettier": "prettier --list-different '**/*.{js,ts,tsx,md,json}' .eslintrc.json ../.prettierrc .
|
|
36
|
-
"prettier-fix": "prettier --write '**/*.{js,ts,tsx,md,json}' .eslintrc.json ../.prettierrc .
|
|
34
|
+
"prettier": "prettier --list-different '**/*.{js,ts,tsx,md,json}' .eslintrc.json ../.prettierrc babel.config.js",
|
|
35
|
+
"prettier-fix": "prettier --write '**/*.{js,ts,tsx,md,json}' .eslintrc.json ../.prettierrc babel.config.js",
|
|
37
36
|
"test:coverage": "yarn test:unit --coverage",
|
|
38
37
|
"test:unit": "TZ=UTC jest",
|
|
39
38
|
"validate-translations": "node bin/validate-translations.js",
|
|
@@ -71,7 +70,8 @@
|
|
|
71
70
|
"@gorhom/bottom-sheet": "4.4.8",
|
|
72
71
|
"dayjs": "1.10.5",
|
|
73
72
|
"emoji-regex": "^10.3.0",
|
|
74
|
-
"i18next": "
|
|
73
|
+
"i18next": "^21.6.14",
|
|
74
|
+
"intl-pluralrules": "^2.0.1",
|
|
75
75
|
"linkifyjs": "^4.1.1",
|
|
76
76
|
"lodash-es": "4.17.21",
|
|
77
77
|
"mime-types": "^2.1.34",
|
|
@@ -120,7 +120,6 @@
|
|
|
120
120
|
"babel-eslint": "10.1.0",
|
|
121
121
|
"babel-jest": "29.6.3",
|
|
122
122
|
"babel-loader": "8.2.2",
|
|
123
|
-
"babel-plugin-i18next-extract": "0.8.3",
|
|
124
123
|
"babel-plugin-module-resolver": "4.1.0",
|
|
125
124
|
"better-sqlite3": "9.0.0",
|
|
126
125
|
"eslint": "7.32.0",
|
|
@@ -134,6 +133,7 @@
|
|
|
134
133
|
"eslint-plugin-react": "7.34.1",
|
|
135
134
|
"eslint-plugin-sort-destructure-keys": "1.5.0",
|
|
136
135
|
"eslint-plugin-typescript-sort-keys": "3.2.0",
|
|
136
|
+
"i18next-parser": "^9.0.0",
|
|
137
137
|
"jest": "29.6.3",
|
|
138
138
|
"moment": "2.29.2",
|
|
139
139
|
"prettier": "2.8.8",
|
|
@@ -23,7 +23,7 @@ import { generateMember } from '../../../mock-builders/generator/member';
|
|
|
23
23
|
import { generateMessage } from '../../../mock-builders/generator/message';
|
|
24
24
|
import { generateUser } from '../../../mock-builders/generator/user';
|
|
25
25
|
import { getTestClientWithUser } from '../../../mock-builders/mock';
|
|
26
|
-
import { Streami18n } from '../../../utils/Streami18n';
|
|
26
|
+
import { Streami18n } from '../../../utils/i18n/Streami18n';
|
|
27
27
|
import { ImageLoadingFailedIndicator } from '../../Attachment/ImageLoadingFailedIndicator';
|
|
28
28
|
import { ImageLoadingIndicator } from '../../Attachment/ImageLoadingIndicator';
|
|
29
29
|
import { Channel } from '../../Channel/Channel';
|
|
@@ -127,6 +127,7 @@ import { MessageReplies as MessageRepliesDefault } from '../Message/MessageSimpl
|
|
|
127
127
|
import { MessageRepliesAvatars as MessageRepliesAvatarsDefault } from '../Message/MessageSimple/MessageRepliesAvatars';
|
|
128
128
|
import { MessageSimple as MessageSimpleDefault } from '../Message/MessageSimple/MessageSimple';
|
|
129
129
|
import { MessageStatus as MessageStatusDefault } from '../Message/MessageSimple/MessageStatus';
|
|
130
|
+
import { MessageTimestamp as MessageTimestampDefault } from '../Message/MessageSimple/MessageTimestamp';
|
|
130
131
|
import { ReactionList as ReactionListDefault } from '../Message/MessageSimple/ReactionList';
|
|
131
132
|
import { AttachButton as AttachButtonDefault } from '../MessageInput/AttachButton';
|
|
132
133
|
import { CommandsButton as CommandsButtonDefault } from '../MessageInput/CommandsButton';
|
|
@@ -156,6 +157,7 @@ import { MessageList as MessageListDefault } from '../MessageList/MessageList';
|
|
|
156
157
|
import { MessageSystem as MessageSystemDefault } from '../MessageList/MessageSystem';
|
|
157
158
|
import { NetworkDownIndicator as NetworkDownIndicatorDefault } from '../MessageList/NetworkDownIndicator';
|
|
158
159
|
import { ScrollToBottomButton as ScrollToBottomButtonDefault } from '../MessageList/ScrollToBottomButton';
|
|
160
|
+
import { StickyHeader as StickyHeaderDefault } from '../MessageList/StickyHeader';
|
|
159
161
|
import { TypingIndicator as TypingIndicatorDefault } from '../MessageList/TypingIndicator';
|
|
160
162
|
import { TypingIndicatorContainer as TypingIndicatorContainerDefault } from '../MessageList/TypingIndicatorContainer';
|
|
161
163
|
import { OverlayReactionList as OverlayReactionListDefault } from '../MessageOverlay/OverlayReactionList';
|
|
@@ -305,6 +307,7 @@ export type ChannelPropsWithContext<
|
|
|
305
307
|
| 'MessageStatus'
|
|
306
308
|
| 'MessageSystem'
|
|
307
309
|
| 'MessageText'
|
|
310
|
+
| 'MessageTimestamp'
|
|
308
311
|
| 'myMessageTheme'
|
|
309
312
|
| 'onLongPressMessage'
|
|
310
313
|
| 'onPressInMessage'
|
|
@@ -542,6 +545,7 @@ const ChannelWithContext = <
|
|
|
542
545
|
MessageStatus = MessageStatusDefault,
|
|
543
546
|
MessageSystem = MessageSystemDefault,
|
|
544
547
|
MessageText,
|
|
548
|
+
MessageTimestamp = MessageTimestampDefault,
|
|
545
549
|
MoreOptionsButton = MoreOptionsButtonDefault,
|
|
546
550
|
myMessageTheme,
|
|
547
551
|
NetworkDownIndicator = NetworkDownIndicatorDefault,
|
|
@@ -573,7 +577,7 @@ const ChannelWithContext = <
|
|
|
573
577
|
ShowThreadMessageInChannelButton = ShowThreadMessageInChannelButtonDefault,
|
|
574
578
|
StartAudioRecordingButton = AudioRecordingButtonDefault,
|
|
575
579
|
stateUpdateThrottleInterval = defaultThrottleInterval,
|
|
576
|
-
StickyHeader,
|
|
580
|
+
StickyHeader = StickyHeaderDefault,
|
|
577
581
|
supportedReactions = reactionData,
|
|
578
582
|
t,
|
|
579
583
|
thread: threadProps,
|
|
@@ -2328,6 +2332,7 @@ const ChannelWithContext = <
|
|
|
2328
2332
|
MessageStatus,
|
|
2329
2333
|
MessageSystem,
|
|
2330
2334
|
MessageText,
|
|
2335
|
+
MessageTimestamp,
|
|
2331
2336
|
myMessageTheme,
|
|
2332
2337
|
onLongPressMessage,
|
|
2333
2338
|
onPressInMessage,
|
|
@@ -69,6 +69,7 @@ export const useCreateMessagesContext = <
|
|
|
69
69
|
MessageStatus,
|
|
70
70
|
MessageSystem,
|
|
71
71
|
MessageText,
|
|
72
|
+
MessageTimestamp,
|
|
72
73
|
myMessageTheme,
|
|
73
74
|
onLongPressMessage,
|
|
74
75
|
onPressInMessage,
|
|
@@ -165,6 +166,7 @@ export const useCreateMessagesContext = <
|
|
|
165
166
|
MessageStatus,
|
|
166
167
|
MessageSystem,
|
|
167
168
|
MessageText,
|
|
169
|
+
MessageTimestamp,
|
|
168
170
|
myMessageTheme,
|
|
169
171
|
onLongPressMessage,
|
|
170
172
|
onPressInMessage,
|
|
@@ -1,4 +1,4 @@
|
|
|
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 { ChannelPreviewProps } from './ChannelPreview';
|
|
@@ -6,9 +6,11 @@ import type { ChannelPreviewMessengerPropsWithContext } from './ChannelPreviewMe
|
|
|
6
6
|
import { MessageReadStatus } from './hooks/useLatestMessagePreview';
|
|
7
7
|
|
|
8
8
|
import { useTheme } from '../../contexts/themeContext/ThemeContext';
|
|
9
|
+
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
|
|
9
10
|
import { Check, CheckAll } from '../../icons';
|
|
10
11
|
|
|
11
12
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
13
|
+
import { getDateString } from '../../utils/i18n/getDateString';
|
|
12
14
|
|
|
13
15
|
const styles = StyleSheet.create({
|
|
14
16
|
date: {
|
|
@@ -35,6 +37,7 @@ export const ChannelPreviewStatus = <
|
|
|
35
37
|
props: ChannelPreviewStatusProps<StreamChatGenerics>,
|
|
36
38
|
) => {
|
|
37
39
|
const { formatLatestMessageDate, latestMessagePreview } = props;
|
|
40
|
+
const { t, tDateTimeParser } = useTranslationContext();
|
|
38
41
|
const {
|
|
39
42
|
theme: {
|
|
40
43
|
channelPreview: { checkAllIcon, checkIcon, date },
|
|
@@ -44,6 +47,17 @@ export const ChannelPreviewStatus = <
|
|
|
44
47
|
|
|
45
48
|
const created_at = latestMessagePreview.messageObject?.created_at;
|
|
46
49
|
const latestMessageDate = created_at ? new Date(created_at) : new Date();
|
|
50
|
+
|
|
51
|
+
const formattedDate = useMemo(
|
|
52
|
+
() =>
|
|
53
|
+
getDateString({
|
|
54
|
+
date: created_at,
|
|
55
|
+
t,
|
|
56
|
+
tDateTimeParser,
|
|
57
|
+
timestampTranslationKey: 'timestamp/ChannelPreviewStatus',
|
|
58
|
+
}),
|
|
59
|
+
[created_at, t, tDateTimeParser],
|
|
60
|
+
);
|
|
47
61
|
const status = latestMessagePreview.status;
|
|
48
62
|
|
|
49
63
|
return (
|
|
@@ -56,7 +70,7 @@ export const ChannelPreviewStatus = <
|
|
|
56
70
|
<Text style={[styles.date, { color: grey }, date]}>
|
|
57
71
|
{formatLatestMessageDate && latestMessageDate
|
|
58
72
|
? formatLatestMessageDate(latestMessageDate).toString()
|
|
59
|
-
:
|
|
73
|
+
: formattedDate}
|
|
60
74
|
</Text>
|
|
61
75
|
</View>
|
|
62
76
|
);
|
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
|
+
import { TFunction } from 'i18next';
|
|
3
4
|
import type { Channel, ChannelState, MessageResponse, StreamChat, UserResponse } from 'stream-chat';
|
|
4
5
|
|
|
5
6
|
import { useChatContext } from '../../../contexts/chatContext/ChatContext';
|
|
6
|
-
import {
|
|
7
|
-
isDayOrMoment,
|
|
8
|
-
TDateTimeParser,
|
|
9
|
-
useTranslationContext,
|
|
10
|
-
} from '../../../contexts/translationContext/TranslationContext';
|
|
7
|
+
import { useTranslationContext } from '../../../contexts/translationContext/TranslationContext';
|
|
11
8
|
|
|
12
9
|
import { useTranslatedMessage } from '../../../hooks/useTranslatedMessage';
|
|
13
10
|
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
@@ -21,13 +18,13 @@ type LatestMessage<
|
|
|
21
18
|
export type LatestMessagePreview<
|
|
22
19
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
23
20
|
> = {
|
|
24
|
-
created_at: string | number | Date;
|
|
25
21
|
messageObject: LatestMessage<StreamChatGenerics> | undefined;
|
|
26
22
|
previews: {
|
|
27
23
|
bold: boolean;
|
|
28
24
|
text: string;
|
|
29
25
|
}[];
|
|
30
26
|
status: number;
|
|
27
|
+
created_at?: string | Date;
|
|
31
28
|
};
|
|
32
29
|
|
|
33
30
|
const getMessageSenderName = <
|
|
@@ -131,22 +128,6 @@ const getLatestMessageDisplayText = <
|
|
|
131
128
|
];
|
|
132
129
|
};
|
|
133
130
|
|
|
134
|
-
const getLatestMessageDisplayDate = <
|
|
135
|
-
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
136
|
-
>(
|
|
137
|
-
message: LatestMessage<StreamChatGenerics> | undefined,
|
|
138
|
-
tDateTimeParser: TDateTimeParser,
|
|
139
|
-
) => {
|
|
140
|
-
const parserOutput = tDateTimeParser(message?.created_at);
|
|
141
|
-
if (isDayOrMoment(parserOutput)) {
|
|
142
|
-
if (parserOutput.isSame(new Date(), 'day')) {
|
|
143
|
-
return parserOutput.format('LT');
|
|
144
|
-
}
|
|
145
|
-
return parserOutput.format('L');
|
|
146
|
-
}
|
|
147
|
-
return parserOutput;
|
|
148
|
-
};
|
|
149
|
-
|
|
150
131
|
export enum MessageReadStatus {
|
|
151
132
|
NOT_SENT_BY_CURRENT_USER = 0,
|
|
152
133
|
UNREAD = 1,
|
|
@@ -190,13 +171,12 @@ const getLatestMessagePreview = <
|
|
|
190
171
|
channel: Channel<StreamChatGenerics>;
|
|
191
172
|
client: StreamChat<StreamChatGenerics>;
|
|
192
173
|
readEvents: boolean;
|
|
193
|
-
t:
|
|
194
|
-
tDateTimeParser: TDateTimeParser;
|
|
174
|
+
t: TFunction;
|
|
195
175
|
lastMessage?:
|
|
196
176
|
| ReturnType<ChannelState<StreamChatGenerics>['formatMessage']>
|
|
197
177
|
| MessageResponse<StreamChatGenerics>;
|
|
198
178
|
}) => {
|
|
199
|
-
const { channel, client, lastMessage, readEvents, t
|
|
179
|
+
const { channel, client, lastMessage, readEvents, t } = params;
|
|
200
180
|
|
|
201
181
|
const messages = channel.state.messages;
|
|
202
182
|
|
|
@@ -219,7 +199,7 @@ const getLatestMessagePreview = <
|
|
|
219
199
|
const message = lastMessage !== undefined ? lastMessage : channelStateLastMessage;
|
|
220
200
|
|
|
221
201
|
return {
|
|
222
|
-
created_at:
|
|
202
|
+
created_at: message?.created_at,
|
|
223
203
|
messageObject: message,
|
|
224
204
|
previews: getLatestMessageDisplayText(channel, client, message, t),
|
|
225
205
|
status: getLatestMessageReadStatus(channel, client, message, readEvents),
|
|
@@ -240,7 +220,7 @@ export const useLatestMessagePreview = <
|
|
|
240
220
|
forceUpdate: number,
|
|
241
221
|
) => {
|
|
242
222
|
const { client } = useChatContext<StreamChatGenerics>();
|
|
243
|
-
const { t
|
|
223
|
+
const { t } = useTranslationContext();
|
|
244
224
|
|
|
245
225
|
const channelConfigExists = typeof channel?.getConfig === 'function';
|
|
246
226
|
|
|
@@ -286,7 +266,6 @@ export const useLatestMessagePreview = <
|
|
|
286
266
|
lastMessage: translatedLastMessage,
|
|
287
267
|
readEvents,
|
|
288
268
|
t,
|
|
289
|
-
tDateTimeParser,
|
|
290
269
|
}),
|
|
291
270
|
),
|
|
292
271
|
[channelLastMessageString, forceUpdate, readEvents, readStatus],
|