Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ const AttachmentImage = (props: AttachmentPickerItemType) => {
} = useTheme();
const styles = useStyles();
const { vw } = useViewport();
const { t } = useTranslationContext();
const { uploadNewFile } = useMessageInputContext();
const messageComposer = useMessageComposer();
const { attachmentManager } = messageComposer;
Expand All @@ -120,7 +121,7 @@ const AttachmentImage = (props: AttachmentPickerItemType) => {
}
} else {
if (!availableUploadSlots) {
Alert.alert('Maximum number of files reached');
Alert.alert(t('Maximum number of files reached'));
return;
}
await uploadNewFile(asset);
Expand Down Expand Up @@ -150,6 +151,7 @@ const AttachmentImage = (props: AttachmentPickerItemType) => {
const AttachmentIosLimited = () => {
const { numberOfAttachmentPickerImageColumns } = useAttachmentPickerContext();
const { vw } = useViewport();
const { t } = useTranslationContext();
const size = vw(100) / (numberOfAttachmentPickerImageColumns || 3) - 2;
const styles = useStyles();
return (
Expand All @@ -164,7 +166,7 @@ const AttachmentIosLimited = () => {
onPress={NativeHandlers.iOS14RefreshGallerySelection}
>
<Plus width={20} height={20} stroke={styles.iosLimitedIcon.color} strokeWidth={1.5} />
<Text style={styles.iosLimitedText}>Add more</Text>
<Text style={styles.iosLimitedText}>{t('Add more')}</Text>
</BottomSheetTouchableOpacity>
);
};
Expand Down
4 changes: 3 additions & 1 deletion package/src/components/Indicators/EmptyStateIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ export const EmptyStateIndicator = ({ listType }: EmptyStateProps) => {
);
default:
return (
<Text style={[{ color: semantics.textSecondary }, messageContainer]}>No items exist</Text>
<Text style={[{ color: semantics.textSecondary }, messageContainer]}>
{t('No items exist')}
</Text>
);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ActivityIndicator, Pressable, StyleSheet, Text, View } from 'react-nati
import { LocalAttachmentUploadMetadata } from 'stream-chat';

import { useTheme } from '../../../../contexts/themeContext/ThemeContext';
import { useTranslationContext } from '../../../../contexts/translationContext/TranslationContext';
import { ExclamationCircle } from '../../../../icons/exclamation-circle-fill';
import { Warning } from '../../../../icons/exclamation-triangle-fill';
import { primitives } from '../../../../theme';
Expand Down Expand Up @@ -41,6 +42,7 @@ export const FileUploadRetryIndicator = ({ onPress }: FileUploadRetryIndicatorPr
messageComposer: { fileUploadRetryIndicator },
},
} = useTheme();
const { t } = useTranslationContext();
const styles = useFileUploadRetryStyles();

return (
Expand All @@ -56,7 +58,7 @@ export const FileUploadRetryIndicator = ({ onPress }: FileUploadRetryIndicatorPr
width={16}
/>
<Text style={[styles.networkErrorText, fileUploadRetryIndicator.networkErrorText]}>
Network error
{t('Network error')}
</Text>
</View>
<Pressable
Expand All @@ -66,7 +68,9 @@ export const FileUploadRetryIndicator = ({ onPress }: FileUploadRetryIndicatorPr
fileUploadRetryIndicator.retryButton,
]}
>
<Text style={[styles.retryText, fileUploadRetryIndicator.retryText]}>Retry Upload</Text>
<Text style={[styles.retryText, fileUploadRetryIndicator.retryText]}>
{t('Retry Upload')}
</Text>
</Pressable>
</View>
);
Expand All @@ -86,9 +90,10 @@ export const FileUploadNotSupportedIndicator = ({
messageComposer: { fileUploadNotSupportedIndicator },
},
} = useTheme();
const { t } = useTranslationContext();

const reason = localMetadata.uploadPermissionCheck?.reason === 'size_limit';
const message = reason ? 'File too large' : 'Not supported';
const message = reason ? t('File too large') : t('Not supported');

return (
<View
Expand Down
8 changes: 5 additions & 3 deletions package/src/components/Poll/CreatePollContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ export const CreatePollContent = () => {
<View style={[styles.optionCard, anonymousPoll.wrapper]}>
<View style={[styles.optionCardContent, anonymousPoll.optionCardContent]}>
<Text style={[styles.title, anonymousPoll.title]}>{t('Anonymous voting')}</Text>
<Text style={[styles.description, anonymousPoll.description]}>Hide who voted</Text>
<Text style={[styles.description, anonymousPoll.description]}>
{t('Hide who voted')}
</Text>
</View>

<Switch
Expand All @@ -179,7 +181,7 @@ export const CreatePollContent = () => {
<View style={[styles.optionCardContent, suggestOption.optionCardContent]}>
<Text style={[styles.title, suggestOption.title]}>{t('Suggest an option')}</Text>
<Text style={[styles.description, suggestOption.description]}>
Let others add options
{t('Let others add options')}
</Text>
</View>

Expand All @@ -193,7 +195,7 @@ export const CreatePollContent = () => {
<View style={[styles.optionCardContent, addComment.optionCardContent]}>
<Text style={[styles.title, addComment.title]}>{t('Add a comment')}</Text>
<Text style={[styles.description, addComment.description]}>
Add a comment to the poll
{t('Add a comment to the poll')}
</Text>
</View>

Expand Down
8 changes: 8 additions & 0 deletions package/src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"1 Reply": "1 Reply",
"1 Thread Reply": "1 Thread Reply",
"Add a comment": "Add a comment",
"Add a comment to the poll": "Add a comment to the poll",
"Add an option": "Add an option",
"Add more": "Add more",
"Allow access to your Gallery": "Allow access to your Gallery",
"Allow camera access in device settings": "Allow camera access in device settings",
"Also send to channel": "Also send to channel",
Expand Down Expand Up @@ -42,15 +44,18 @@
"Error marking message unread. Cannot mark unread messages older than the newest 100 channel messages.": "Error marking message unread. Cannot mark unread messages older than the newest 100 channel messages.",
"Error while loading, please reload/refresh": "Error while loading, please reload/refresh",
"File is too large: {{ size }}, maximum upload size is {{ limit }}": "File is too large: {{ size }}, maximum upload size is {{ limit }}",
"File too large": "File too large",
"File type not supported": "File type not supported",
"Flag": "Flag",
"Flag Message": "Flag Message",
"Flag action failed either due to a network issue or the message is already flagged": "Flag action failed either due to a network issue or the message is already flagged.",
"Generating...": "Generating...",
"Giphy": "Giphy",
"Hide who voted": "Hide who voted",
"Hold to start recording.": "Hold to start recording.",
"How about sending your first message to a friend?": "How about sending your first message to a friend?",
"Instant Commands": "Instant Commands",
"Let others add options": "Let others add options",
"Let's start chatting!": "Let's start chatting!",
"Links are disabled": "Links are disabled",
"Live Location": "Live Location",
Expand All @@ -65,11 +70,13 @@
"Message deleted": "Message deleted",
"Message flagged": "Message flagged",
"Multiple votes": "Multiple votes",
"Network error": "Network error",
"Select more than one option": "Select more than one option",
"Limit votes per person": "Limit votes per person",
"Choose between 2–10 options": "Choose between 2–10 options",
"Mute User": "Mute User",
"No chats here yet…": "No chats here yet…",
"No items exist": "No items exist",
"No threads here yet": "No threads here yet",
"Not supported": "Not supported",
"Nothing yet...": "Nothing yet...",
Expand All @@ -96,6 +103,7 @@
"Reply to {{name}}": "Reply to {{name}}",
"Reply to Message": "Reply to Message",
"Resend": "Resend",
"Retry Upload": "Retry Upload",
"SEND": "SEND",
"Search": "Search",
"Select More Photos": "Select More Photos",
Expand Down
8 changes: 8 additions & 0 deletions package/src/i18n/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"1 Reply": "1 respuesta",
"1 Thread Reply": "1 respuesta de hilo",
"Add a comment": "Agregar un comentario",
"Add a comment to the poll": "Añadir un comentario a la encuesta",
"Add an option": "Agregar una opción",
"Add more": "Añadir más",
"Allow access to your Gallery": "Permitir acceso a tu galería",
"Allow camera access in device settings": "Permitir el acceso a la cámara en la configuración del dispositivo",
"Also send to channel": "También enviar al canal",
Expand Down Expand Up @@ -42,15 +44,18 @@
"Error marking message unread. Cannot mark unread messages older than the newest 100 channel messages.": "Error al marcar el mensaje como no leído. No se pueden marcar mensajes no leídos más antiguos que los 100 mensajes más recientes del canal.",
"Error while loading, please reload/refresh": "Error al cargar, por favor recarga/actualiza",
"File is too large: {{ size }}, maximum upload size is {{ limit }}": "El archivo es demasiado grande: {{ size }}, el tamaño máximo de carga es de {{ limit }}",
"File too large": "Archivo demasiado grande",
"File type not supported": "Tipo de archivo no admitido",
"Flag": "Reportar",
"Flag Message": "Reportar mensaje",
"Flag action failed either due to a network issue or the message is already flagged": "El reporte falló debido a un problema de red o el mensaje ya fue reportado.",
"Generating...": "Generando...",
"Giphy": "Giphy",
"Hide who voted": "Ocultar quién votó",
"Hold to start recording.": "Mantén presionado para comenzar a grabar.",
"How about sending your first message to a friend?": "¿Qué tal enviar tu primer mensaje a un amigo?",
"Instant Commands": "Comandos instantáneos",
"Let others add options": "Permitir que otros añadan opciones",
"Let's start chatting!": "¡Empecemos a charlar!",
"Links are disabled": "Los enlaces están desactivados",
"Live Location": "Ubicación en vivo",
Expand All @@ -65,11 +70,13 @@
"Message deleted": "Mensaje eliminado",
"Message flagged": "Mensaje reportado",
"Multiple votes": "Votos múltiples",
"Network error": "Error de red",
"Select more than one option": "Selecciona más de una opción",
"Limit votes per person": "Limita los votos por persona",
"Choose between 2–10 options": "Elige entre 2 y 10 opciones",
"Mute User": "Silenciar usuario",
"No chats here yet…": "No hay chats aquí todavía...",
"No items exist": "No hay elementos",
"No threads here yet": "Aún no hay hilos aquí",
"Not supported": "No admitido",
"Nothing yet...": "Aún no hay nada...",
Expand All @@ -96,6 +103,7 @@
"Reply to {{name}}": "Responder a {{name}}",
"Reply to Message": "Responder al mensaje",
"Resend": "Reenviar",
"Retry Upload": "Reintentar carga",
"SEND": "ENVIAR",
"Search": "Buscar",
"Select More Photos": "Seleccionar más fotos",
Expand Down
8 changes: 8 additions & 0 deletions package/src/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"1 Reply": "1 Réponse",
"1 Thread Reply": "Réponse à 1 fil",
"Add a comment": "Ajouter un commentaire",
"Add a comment to the poll": "Ajouter un commentaire au sondage",
"Add an option": "Ajouter une option",
"Add more": "Ajouter plus",
"Allow access to your Gallery": "Autoriser l'accès à votre galerie",
"Allow camera access in device settings": "Autoriser l'accès à la caméra dans les paramètres de l'appareil",
"Also send to channel": "Envoyer également à la chaîne",
Expand Down Expand Up @@ -42,15 +44,18 @@
"Error marking message unread. Cannot mark unread messages older than the newest 100 channel messages.": "Erreur lors du marquage du message comme non lu. Impossible de marquer les messages non lus plus anciens que les 100 derniers messages du canal.",
"Error while loading, please reload/refresh": "Erreur lors du chargement, veuillez recharger/rafraîchir",
"File is too large: {{ size }}, maximum upload size is {{ limit }}": "Le fichier est trop volumineux : {{ size }}, la taille de téléchargement maximale est de {{ limit }}",
"File too large": "Fichier trop volumineux",
"File type not supported": "Le type de fichier n'est pas pris en charge",
"Flag": "Signaler",
"Flag Message": "Signaler le message",
"Flag action failed either due to a network issue or the message is already flagged": "L'action de signalisation a échoué en raison d'un problème de réseau ou le message est déjà signalé.",
"Generating...": "Génération...",
"Giphy": "Giphy",
"Hide who voted": "Masquer qui a voté",
"Hold to start recording.": "Hold to start recording.",
"How about sending your first message to a friend?": "Et si vous envoyiez votre premier message à un ami ?",
"Instant Commands": "Commandes Instantanées",
"Let others add options": "Autoriser d'autres à ajouter des options",
"Let's start chatting!": "Commençons à discuter !",
"Links are disabled": "Links are disabled",
"Live Location": "Position en direct",
Expand All @@ -65,11 +70,13 @@
"Message deleted": "Message supprimé",
"Message flagged": "Message signalé",
"Multiple votes": "Votes multiples",
"Network error": "Erreur réseau",
"Select more than one option": "Sélectionnez plus d’une option",
"Limit votes per person": "Limiter les votes par personne",
"Choose between 2–10 options": "Choisissez entre 2 et 10 options",
"Mute User": "Utilisateur muet",
"No chats here yet…": "Pas de discussions ici pour le moment…",
"No items exist": "Aucun élément",
"No threads here yet": "Aucun fil ici pour le moment",
"Not supported": "Non pris en charge",
"Nothing yet...": "Aucun message...",
Expand All @@ -96,6 +103,7 @@
"Reply to {{name}}": "Répondre à {{name}}",
"Reply to Message": "Répondre au message",
"Resend": "Renvoyer",
"Retry Upload": "Réessayer l'envoi",
"SEND": "ENVOYER",
"Search": "Rechercher",
"Select More Photos": "Sélectionner plus de photos",
Expand Down
8 changes: 8 additions & 0 deletions package/src/i18n/he.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
"1 Reply": "תגובה אחת",
"1 Thread Reply": "תגובה אחת לשרשור",
"Add a comment": "הוסף תגובה",
"Add a comment to the poll": "הוסף תגובה לסקר",
"Add an option": "הוסף אפשרות",
"Add more": "הוסף עוד",
"Allow access to your Gallery": "אפשר גישה לגלריה שלך",
"Allow camera access in device settings": "אפשר גישה למצלמה בהגדרות המכשיר",
"Also send to channel": "שלח/י הודעה לשיחה",
Expand Down Expand Up @@ -42,15 +44,18 @@
"Error marking message unread. Cannot mark unread messages older than the newest 100 channel messages.": "שגיאה ארעה בסימון ההודעה כלא נקרא. אין אפשרות לסמן הודעות כלא נקראות שהן ישנות מה-100 ההודעות האחרונות בשיחה.",
"Error while loading, please reload/refresh": "שגיאה ארעה בזמן הטעינה, אנא טען מחדש/רענן",
"File is too large: {{ size }}, maximum upload size is {{ limit }}": "הקובץ גדול מדי: {{ size }}, גודל העלאה מקסימלי הוא {{ limit }}",
"File too large": "הקובץ גדול מדי",
"File type not supported": "סוג הקובץ אינו נתמך",
"Flag": "סמן",
"Flag Message": "סמן הודעה",
"Flag action failed either due to a network issue or the message is already flagged": "פעולת הסימון נכשלה בגלל בעיית רשת או שההודעה כבר סומנה.",
"Generating...": "מייצר...",
"Giphy": "Giphy",
"Hide who voted": "הסתר מי הצביע",
"Hold to start recording.": "לחץ והחזק כדי להתחיל להקליט.",
"How about sending your first message to a friend?": "מה דעתך לשלוח את ההודעה הראשונה שלך לחבר?",
"Instant Commands": "פעולות מיידיות",
"Let others add options": "אפשר לאחרים להוסיף אפשרויות",
"Let's start chatting!": "בואו נתחיל לשוחח!",
"Links are disabled": "הקישורים מבוטלים",
"Live Location": "מיקום חי",
Expand All @@ -65,11 +70,13 @@
"Message deleted": "ההודעה נמחקה",
"Message flagged": "ההודעה סומנה",
"Multiple votes": "הצבעות מרובות",
"Network error": "שגיאת רשת",
"Select more than one option": "בחר/י יותר מאפשרות אחת",
"Limit votes per person": "הגבל/י את מספר ההצבעות לאדם",
"Choose between 2–10 options": "בחר/י בין 2 ל-10 אפשרויות",
"Mute User": "השתק/י משתמש",
"No chats here yet…": "אין צ'אטים כאן עדיין...",
"No items exist": "אין פריטים",
"No threads here yet": "אין שרשורים כאן עדיין",
"Not supported": "לא נתמך",
"Nothing yet...": "אינפורמציה תתקבל בהמשך...",
Expand All @@ -96,6 +103,7 @@
"Reply to {{name}}": "השב/י ל-{{name}}",
"Reply to Message": "השב/י להודעה",
"Resend": "שלח/י שוב",
"Retry Upload": "נסה להעלות שוב",
"SEND": "שלח",
"Search": "חפש/י",
"Select More Photos": "בחר עוד תמונות",
Expand Down
Loading
Loading