@@ -4,6 +4,7 @@ import { ActivityIndicator, Pressable, StyleSheet, Text, View } from 'react-nati
44import { LocalAttachmentUploadMetadata } from 'stream-chat' ;
55
66import { useTheme } from '../../../../contexts/themeContext/ThemeContext' ;
7+ import { useTranslationContext } from '../../../../contexts/translationContext/TranslationContext' ;
78import { ExclamationCircle } from '../../../../icons/exclamation-circle-fill' ;
89import { Warning } from '../../../../icons/exclamation-triangle-fill' ;
910import { primitives } from '../../../../theme' ;
@@ -41,6 +42,7 @@ export const FileUploadRetryIndicator = ({ onPress }: FileUploadRetryIndicatorPr
4142 messageComposer : { fileUploadRetryIndicator } ,
4243 } ,
4344 } = useTheme ( ) ;
45+ const { t } = useTranslationContext ( ) ;
4446 const styles = useFileUploadRetryStyles ( ) ;
4547
4648 return (
@@ -56,7 +58,7 @@ export const FileUploadRetryIndicator = ({ onPress }: FileUploadRetryIndicatorPr
5658 width = { 16 }
5759 />
5860 < Text style = { [ styles . networkErrorText , fileUploadRetryIndicator . networkErrorText ] } >
59- Network error
61+ { t ( ' Network error' ) }
6062 </ Text >
6163 </ View >
6264 < Pressable
@@ -66,7 +68,9 @@ export const FileUploadRetryIndicator = ({ onPress }: FileUploadRetryIndicatorPr
6668 fileUploadRetryIndicator . retryButton ,
6769 ] }
6870 >
69- < Text style = { [ styles . retryText , fileUploadRetryIndicator . retryText ] } > Retry Upload</ Text >
71+ < Text style = { [ styles . retryText , fileUploadRetryIndicator . retryText ] } >
72+ { t ( 'Retry Upload' ) }
73+ </ Text >
7074 </ Pressable >
7175 </ View >
7276 ) ;
@@ -86,9 +90,10 @@ export const FileUploadNotSupportedIndicator = ({
8690 messageComposer : { fileUploadNotSupportedIndicator } ,
8791 } ,
8892 } = useTheme ( ) ;
93+ const { t } = useTranslationContext ( ) ;
8994
9095 const reason = localMetadata . uploadPermissionCheck ?. reason === 'size_limit' ;
91- const message = reason ? 'File too large' : 'Not supported' ;
96+ const message = reason ? t ( 'File too large' ) : t ( 'Not supported' ) ;
9297
9398 return (
9499 < View
0 commit comments