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 11import {
22 attachmentUploadBlockedNotificationTranslator ,
33 attachmentUploadFailedNotificationTranslator ,
4+ attachmentUploadNotTerminatedTranslator ,
45} from './attachmentUpload' ;
56import { TranslationTopic } from '../../TranslationBuilder' ;
67import type { Notification } from 'stream-chat' ;
@@ -16,6 +17,7 @@ export const defaultNotificationTranslators: Record<
1617 'api:attachment:upload:failed' : attachmentUploadFailedNotificationTranslator ,
1718 'api:poll:create:failed' : pollCreationFailedNotificationTranslator ,
1819 'validation:attachment:upload:blocked' : attachmentUploadBlockedNotificationTranslator ,
20+ 'validation:attachment:upload:in-progress' : attachmentUploadNotTerminatedTranslator ,
1921 'validation:poll:castVote:limit' : pollVoteCountTrespass ,
2022} ;
2123
Original file line number Diff line number Diff line change @@ -36,3 +36,10 @@ export const attachmentUploadFailedNotificationTranslator: Translator<
3636 // custom reason string
3737 return t ( 'Attachment upload failed due to {{reason}}' , { reason } ) ;
3838} ;
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