File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed
src/i18n/TranslationBuilder/notifications Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 1
1
import {
2
2
attachmentUploadBlockedNotificationTranslator ,
3
3
attachmentUploadFailedNotificationTranslator ,
4
+ attachmentUploadNotTerminatedTranslator ,
4
5
} from './attachmentUpload' ;
5
6
import { TranslationTopic } from '../../TranslationBuilder' ;
6
7
import type { Notification } from 'stream-chat' ;
@@ -16,6 +17,7 @@ export const defaultNotificationTranslators: Record<
16
17
'api:attachment:upload:failed' : attachmentUploadFailedNotificationTranslator ,
17
18
'api:poll:create:failed' : pollCreationFailedNotificationTranslator ,
18
19
'validation:attachment:upload:blocked' : attachmentUploadBlockedNotificationTranslator ,
20
+ 'validation:attachment:upload:in-progress' : attachmentUploadNotTerminatedTranslator ,
19
21
'validation:poll:castVote:limit' : pollVoteCountTrespass ,
20
22
} ;
21
23
Original file line number Diff line number Diff line change @@ -36,3 +36,10 @@ export const attachmentUploadFailedNotificationTranslator: Translator<
36
36
// custom reason string
37
37
return t ( 'Attachment upload failed due to {{reason}}' , { reason } ) ;
38
38
} ;
39
+
40
+ export const attachmentUploadNotTerminatedTranslator : Translator <
41
+ NotificationTranslatorOptions
42
+ > = ( { options : { notification } , t } ) => {
43
+ if ( ! notification ?. message ) return null ;
44
+ return t ( 'Wait until all attachments have uploaded' ) ;
45
+ } ;
You can’t perform that action at this time.
0 commit comments