diff --git a/src/components/Attachment/AttachmentActions.tsx b/src/components/Attachment/AttachmentActions.tsx index 63fae8cec..72fef6982 100644 --- a/src/components/Attachment/AttachmentActions.tsx +++ b/src/components/Attachment/AttachmentActions.tsx @@ -1,6 +1,8 @@ import React from 'react'; import type { Action, Attachment } from 'stream-chat'; +import { useTranslationContext } from '../../context'; + import type { ActionHandlerReturnType } from '../Message/hooks/useActionHandler'; import type { DefaultStreamChatGenerics } from '../../types/types'; @@ -23,6 +25,7 @@ const UnMemoizedAttachmentActions = < props: AttachmentActionsProps, ) => { const { actionHandler, actions, id, text } = props; + const { t } = useTranslationContext('UnMemoizedAttachmentActions'); const handleActionClick = ( event: React.MouseEvent, @@ -42,7 +45,7 @@ const UnMemoizedAttachmentActions = < key={`${id}-${action.value}`} onClick={(event) => handleActionClick(event, action.name, action.value)} > - {action.text} + {action.text ? t(action.text) : null} ))} diff --git a/src/components/LoadMore/LoadMoreButton.tsx b/src/components/LoadMore/LoadMoreButton.tsx index 5cd12ff0e..593de4761 100644 --- a/src/components/LoadMore/LoadMoreButton.tsx +++ b/src/components/LoadMore/LoadMoreButton.tsx @@ -1,6 +1,7 @@ import React, { PropsWithChildren, useEffect } from 'react'; import { LoadingIndicator } from '../Loading'; import { deprecationAndReplacementWarning } from '../../utils/deprecationWarning'; +import { useTranslationContext } from '../../context'; export type LoadMoreButtonProps = { /** onClick handler load more button. Pagination logic should be executed in this handler. */ @@ -15,11 +16,14 @@ export type LoadMoreButtonProps = { }; const UnMemoizedLoadMoreButton = ({ - children = 'Load more', + children, isLoading, onClick, refreshing, }: PropsWithChildren) => { + const { t } = useTranslationContext('UnMemoizedLoadMoreButton'); + + const childrenOrDefaultString = children ?? t('Load more'); const loading = typeof isLoading !== 'undefined' ? isLoading : refreshing; useEffect(() => { @@ -35,7 +39,7 @@ const UnMemoizedLoadMoreButton = ({ disabled={loading} onClick={onClick} > - {loading ? : children} + {loading ? : childrenOrDefaultString} ); diff --git a/src/components/ReactFileUtilities/ImageDropzone.tsx b/src/components/ReactFileUtilities/ImageDropzone.tsx index ad3aad97f..dd3c1696f 100644 --- a/src/components/ReactFileUtilities/ImageDropzone.tsx +++ b/src/components/ReactFileUtilities/ImageDropzone.tsx @@ -1,6 +1,7 @@ import clsx from 'clsx'; import React, { PropsWithChildren, useCallback, useMemo } from 'react'; import { useDropzone } from 'react-dropzone'; +import { useTranslationContext } from '../../context'; export type ImageDropzoneProps = { /** @@ -25,6 +26,8 @@ export const ImageDropzone = ({ maxNumberOfFiles, multiple, }: PropsWithChildren) => { + const { t } = useTranslationContext('ImageDropzone'); + const handleDrop = useCallback( (accepted: File[]) => { if (!handleFiles) { @@ -78,7 +81,7 @@ export const ImageDropzone = ({ fillRule='nonzero' /> -

Drag your files here to add to your post

+

{t('Drag your files here to add to your post')}

{children} diff --git a/src/i18n/de.json b/src/i18n/de.json index b09a48bbe..f72586b05 100644 --- a/src/i18n/de.json +++ b/src/i18n/de.json @@ -8,7 +8,8 @@ "Connection failure, reconnecting now...": "Verbindungsfehler, Wiederherstellung der Verbindung...", "Delete": "Löschen", "Delivered": "Zugestellt", - "Drag your files here": "Drag your files here", + "Drag your files here": "Ziehen Sie Ihre Dateien hierher", + "Drag your files here to add to your post": "Ziehen Sie Ihre Dateien hierher, um sie Ihrem Beitrag hinzuzufügen", "Edit Message": "Nachricht bearbeiten", "Edit message request failed": "Anfrage zum Bearbeiten der Nachricht fehlgeschlagen", "Emoji matching": "Emoji passend", @@ -26,6 +27,7 @@ "Error: {{ errorMessage }}": "Fehler: {{ errorMessage }}", "Flag": "Meldung", "Latest Messages": "Neueste Nachrichten", + "Load more": "Mehr laden", "Menu": "Menü", "Message Failed · Click to try again": "Nachricht fehlgeschlagen · Klicken, um es erneut zu versuchen", "Message Failed · Unauthorized": "Nachricht fehlgeschlagen · Nicht autorisiert", @@ -50,8 +52,9 @@ "Send": "Senden", "Send message request failed": "Senden der Nachrichtenanfrage fehlgeschlagen", "Sending...": "Senden...", + "Shuffle": "Mischen", "Slow Mode ON": "Slow-Mode EIN", - "Some of the files will not be accepted": "Some of the files will not be accepted", + "Some of the files will not be accepted": "Einige der Dateien werden nicht akzeptiert", "This message was deleted...": "Diese Nachricht wurde gelöscht...", "Thread": "Thread", "Type your message": "Nachricht eingeben", diff --git a/src/i18n/en.json b/src/i18n/en.json index 293d9816e..5b9d10ada 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -9,6 +9,7 @@ "Delete": "Delete", "Delivered": "Delivered", "Drag your files here": "Drag your files here", + "Drag your files here to add to your post": "Drag your files here to add to your post", "Edit Message": "Edit Message", "Edit message request failed": "Edit message request failed", "Emoji matching": "Emoji matching", @@ -26,6 +27,7 @@ "Error: {{ errorMessage }}": "Error: {{ errorMessage }}", "Flag": "Flag", "Latest Messages": "Latest Messages", + "Load more": "Load more", "Menu": "Menu", "Message Failed · Click to try again": "Message Failed · Click to try again", "Message Failed · Unauthorized": "Message Failed · Unauthorized", @@ -50,6 +52,7 @@ "Send": "Send", "Send message request failed": "Send message request failed", "Sending...": "Sending...", + "Shuffle": "Shuffle", "Slow Mode ON": "Slow Mode ON", "Some of the files will not be accepted": "Some of the files will not be accepted", "This message was deleted...": "This message was deleted...", diff --git a/src/i18n/es.json b/src/i18n/es.json index 63f50139a..63968cf07 100644 --- a/src/i18n/es.json +++ b/src/i18n/es.json @@ -8,7 +8,8 @@ "Connection failure, reconnecting now...": "Fallo de conexión, reconectando ahora ...", "Delete": "Borrar", "Delivered": "Entregado", - "Drag your files here": "Drag your files here", + "Drag your files here": "Arrastra tus archivos aquí", + "Drag your files here to add to your post": "Arrastra tus archivos aquí para agregarlos a tu publicación", "Edit Message": "Editar mensaje", "Edit message request failed": "Error al editar la solicitud de mensaje", "Emoji matching": "Coincidencia de emoji", @@ -26,6 +27,7 @@ "Error: {{ errorMessage }}": "Error: {{ errorMessage }}", "Flag": "Bandera", "Latest Messages": "Últimos mensajes", + "Load more": "Cargar más", "Menu": "Menú", "Message Failed · Click to try again": "Mensaje fallido · Haga clic para volver a intentarlo", "Message Failed · Unauthorized": "Mensaje fallido · No autorizado", @@ -50,8 +52,9 @@ "Send": "Enviar", "Send message request failed": "Error al enviar la solicitud de mensaje", "Sending...": "Enviando...", + "Shuffle": "Mezclar", "Slow Mode ON": "Modo lento activado", - "Some of the files will not be accepted": "Some of the files will not be accepted", + "Some of the files will not be accepted": "Algunos de los archivos no serán aceptados", "This message was deleted...": "Este mensaje fue eliminado ...", "Thread": "Hilo", "Type your message": "Escribe tu mensaje", diff --git a/src/i18n/fr.json b/src/i18n/fr.json index 72c8775fb..7b08bf201 100644 --- a/src/i18n/fr.json +++ b/src/i18n/fr.json @@ -8,7 +8,8 @@ "Connection failure, reconnecting now...": "Échec de la connexion, reconnexion en cours...", "Delete": "Supprimer", "Delivered": "Publié", - "Drag your files here": "Drag your files here", + "Drag your files here": "Glissez vos fichiers ici", + "Drag your files here to add to your post": "Glissez vos fichiers ici pour les ajouter à votre publication", "Edit Message": "Éditer un message", "Edit message request failed": "Échec de la demande de modification du message", "Emoji matching": "Correspondance emoji", @@ -26,6 +27,7 @@ "Error: {{ errorMessage }}": "Erreur : {{ errorMessage }}", "Flag": "Signaler", "Latest Messages": "Derniers messages", + "Load more": "Charger plus", "Menu": "Menu", "Message Failed · Click to try again": "Échec de l'envoi du message - Cliquez pour réessayer", "Message Failed · Unauthorized": "Échec de l'envoi du message - Non autorisé", @@ -50,8 +52,9 @@ "Send": "Envoyer", "Send message request failed": "Échec de la demande d'envoi de message", "Sending...": "Envoi en cours...", + "Shuffle": "Mélanger", "Slow Mode ON": "Mode lent activé", - "Some of the files will not be accepted": "Some of the files will not be accepted", + "Some of the files will not be accepted": "Certains fichiers ne seront pas acceptés", "This message was deleted...": "Ce message a été supprimé...", "Thread": "Fil de discussion", "Type your message": "Saisissez votre message", diff --git a/src/i18n/hi.json b/src/i18n/hi.json index a2584b03f..8b3feba36 100644 --- a/src/i18n/hi.json +++ b/src/i18n/hi.json @@ -8,7 +8,8 @@ "Connection failure, reconnecting now...": "कनेक्शन विफल रहा, अब पुनः कनेक्ट हो रहा है ...", "Delete": "डिलीट", "Delivered": "पहुंच गया", - "Drag your files here": "Drag your files here", + "Drag your files here": "अपनी फ़ाइलें यहाँ खींचें", + "Drag your files here to add to your post": "अपनी फ़ाइलें यहाँ खींचें और अपने पोस्ट में जोड़ने के लिए", "Edit Message": "मैसेज में बदलाव करे", "Edit message request failed": "संदेश संपादित करने का अनुरोध विफल रहा", "Emoji matching": "इमोजी मिलान", @@ -26,6 +27,7 @@ "Error: {{ errorMessage }}": "फेल: {{ errorMessage }}", "Flag": "फ्लैग करे", "Latest Messages": "नवीनतम संदेश", + "Load more": "और लोड करें", "Menu": "मेन्यू", "Message Failed · Click to try again": "मैसेज फ़ैल - पुनः कोशिश करें", "Message Failed · Unauthorized": "मैसेज फ़ैल - अनधिकृत", @@ -50,8 +52,9 @@ "Send": "भेजे", "Send message request failed": "संदेश भेजने का अनुरोध विफल रहा", "Sending...": "भेजा जा रहा है", + "Shuffle": "मिश्रित करें", "Slow Mode ON": "स्लो मोड ऑन", - "Some of the files will not be accepted": "Some of the files will not be accepted", + "Some of the files will not be accepted": "कुछ फ़ाइलें स्वीकार नहीं की जाएंगी", "This message was deleted...": "मैसेज हटा दिया गया", "Thread": "रिप्लाई थ्रेड", "Type your message": "अपना मैसेज लिखे", diff --git a/src/i18n/it.json b/src/i18n/it.json index 3510238d5..54adf10f4 100644 --- a/src/i18n/it.json +++ b/src/i18n/it.json @@ -8,7 +8,8 @@ "Connection failure, reconnecting now...": "Connessione fallitta, riconnessione in corso...", "Delete": "Cancella", "Delivered": "Consegnato", - "Drag your files here": "Drag your files here", + "Drag your files here": "Trascina i tuoi file qui", + "Drag your files here to add to your post": "Trascina i tuoi file qui per aggiungerli al tuo post", "Edit Message": "Modifica messaggio", "Edit message request failed": "Richiesta di modifica del messaggio non riuscita", "Emoji matching": "Abbinamento emoji", @@ -26,6 +27,7 @@ "Error: {{ errorMessage }}": "Errore: {{ errorMessage }}", "Flag": "Segnala", "Latest Messages": "Ultimi messaggi", + "Load more": "Carica di più", "Menu": "Menù", "Message Failed · Click to try again": "Invio messaggio fallito · Clicca per riprovare", "Message Failed · Unauthorized": "Invio messaggio fallito · Non autorizzato", @@ -50,8 +52,9 @@ "Send": "Invia", "Send message request failed": "Invia messaggio di richiesta non riuscito", "Sending...": "Invio in corso...", + "Shuffle": "Mescolare", "Slow Mode ON": "Modalità lenta attivata", - "Some of the files will not be accepted": "Some of the files will not be accepted", + "Some of the files will not be accepted": "Alcuni dei file non saranno accettati", "This message was deleted...": "Questo messaggio é stato cancellato", "Thread": "Thread", "Type your message": "Scrivi il tuo messaggio", diff --git a/src/i18n/ja.json b/src/i18n/ja.json index 4679cc65c..0a0069918 100644 --- a/src/i18n/ja.json +++ b/src/i18n/ja.json @@ -8,7 +8,8 @@ "Connection failure, reconnecting now...": "接続が失敗しました。再接続中...", "Delete": "消去", "Delivered": "配信しました", - "Drag your files here": "Drag your files here", + "Drag your files here": "ここにファイルをドラッグ", + "Drag your files here to add to your post": "投稿に追加するためにここにファイルをドラッグ", "Edit Message": "メッセージを編集", "Edit message request failed": "メッセージの編集要求が失敗しました", "Emoji matching": "絵文字マッチング", @@ -26,6 +27,7 @@ "Error: {{ errorMessage }}": "エラー: {{ errorMessage }}", "Flag": "フラグ", "Latest Messages": "最新のメッセージ", + "Load more": "もっと読み込む", "Menu": "メニュー", "Message Failed · Click to try again": "メッセージが失敗しました · クリックして再試行してください", "Message Failed · Unauthorized": "メッセージが失敗しました · 許可されていません", @@ -50,8 +52,9 @@ "Send": "送信", "Send message request failed": "メッセージ送信リクエストが失敗しました", "Sending...": "送信中...", + "Shuffle": "シャッフル", "Slow Mode ON": "スローモードオン", - "Some of the files will not be accepted": "Some of the files will not be accepted", + "Some of the files will not be accepted": "一部のファイルは受け付けられません", "This message was deleted...": "このメッセージは削除されました...", "Thread": "スレッド", "Type your message": "メッセージを入力してください", diff --git a/src/i18n/ko.json b/src/i18n/ko.json index a43d4e045..755ebf1c5 100644 --- a/src/i18n/ko.json +++ b/src/i18n/ko.json @@ -8,7 +8,8 @@ "Connection failure, reconnecting now...": "연결 실패, 지금 다시 연결 중...", "Delete": "삭제", "Delivered": "배달됨", - "Drag your files here": "Drag your files here", + "Drag your files here": "여기로 파일을 끌어다 놓으세요", + "Drag your files here to add to your post": "게시물에 추가하려면 파일을 여기로 끌어다 놓으세요", "Edit Message": "메시지 수정", "Edit message request failed": "메시지 수정 요청 실패", "Emoji matching": "이모티콘 매칭", @@ -26,6 +27,7 @@ "Error: {{ errorMessage }}": "오류: {{ errorMessage }}", "Flag": "플래그", "Latest Messages": "최신 메시지", + "Load more": "더 불러오기", "Menu": "메뉴", "Message Failed · Click to try again": "메시지 실패 · 다시 시도하려면 클릭하세요.", "Message Failed · Unauthorized": "메시지 실패 · 승인되지 않음", @@ -50,8 +52,9 @@ "Send": "보내다", "Send message request failed": "메시지 보내기 요청 실패", "Sending...": "배상중...", + "Shuffle": "셔플", "Slow Mode ON": "슬로우 모드 켜짐", - "Some of the files will not be accepted": "Some of the files will not be accepted", + "Some of the files will not be accepted": "일부 파일은 허용되지 않을 수 있습니다", "This message was deleted...": "이 메시지는 삭제되었습니다...", "Thread": "스레드", "Type your message": "메시지 입력", diff --git a/src/i18n/nl.json b/src/i18n/nl.json index b181d6a3f..fbf1dd653 100644 --- a/src/i18n/nl.json +++ b/src/i18n/nl.json @@ -8,7 +8,8 @@ "Connection failure, reconnecting now...": "Probleem met de verbinding, opnieuw verbinding maken...", "Delete": "Verwijder", "Delivered": "Afgeleverd", - "Drag your files here": "Drag your files here", + "Drag your files here": "Sleep je bestanden hier naartoe", + "Drag your files here to add to your post": "Sleep je bestanden hier naartoe om aan je bericht toe te voegen", "Edit Message": "Pas bericht aan", "Edit message request failed": "Verzoek om bericht bewerken mislukt", "Emoji matching": "Emoji-overeenkomsten", @@ -26,6 +27,7 @@ "Error: {{ errorMessage }}": "Error: {{ errorMessage }}", "Flag": "Markeer", "Latest Messages": "Laatste berichten", + "Load more": "Meer laden", "Menu": "Menu", "Message Failed · Click to try again": "Bericht mislukt, klik om het nogmaals te proberen", "Message Failed · Unauthorized": "Bericht mislukt, ongeautoriseerd", @@ -50,8 +52,9 @@ "Send": "Verstuur", "Send message request failed": "Verzoek om bericht te verzenden mislukt", "Sending...": "Aan het verzenden...", + "Shuffle": "Schudden", "Slow Mode ON": "Langzame modus aan", - "Some of the files will not be accepted": "Some of the files will not be accepted", + "Some of the files will not be accepted": "Sommige bestanden zullen niet worden geaccepteerd", "This message was deleted...": "Dit bericht was verwijderd", "Thread": "Draadje", "Type your message": "Type je bericht", diff --git a/src/i18n/pt.json b/src/i18n/pt.json index f5c6f5e39..ac60d0b7f 100644 --- a/src/i18n/pt.json +++ b/src/i18n/pt.json @@ -8,7 +8,8 @@ "Connection failure, reconnecting now...": "Falha de conexão, reconectando agora...", "Delete": "Excluir", "Delivered": "Entregue", - "Drag your files here": "Drag your files here", + "Drag your files here": "Arraste seus arquivos aqui", + "Drag your files here to add to your post": "Arraste seus arquivos aqui para adicionar ao seu post", "Edit Message": "Editar Mensagem", "Edit message request failed": "O pedido de edição da mensagem falhou", "Emoji matching": "Emoji correspondente", @@ -26,6 +27,7 @@ "Error: {{ errorMessage }}": "Erro: {{ errorMessage }}", "Flag": "Reportar", "Latest Messages": "Mensagens mais recentes", + "Load more": "Carregar mais", "Menu": "Menu", "Message Failed · Click to try again": "A mensagem falhou · Clique para tentar novamente", "Message Failed · Unauthorized": "A mensagem falhou · não autorizado", @@ -50,8 +52,9 @@ "Send": "Enviar", "Send message request failed": "O pedido de envio de mensagem falhou", "Sending...": "Enviando...", + "Shuffle": "Embaralhar", "Slow Mode ON": "Modo lento LIGADO", - "Some of the files will not be accepted": "Some of the files will not be accepted", + "Some of the files will not be accepted": "Alguns dos arquivos não serão aceitos", "This message was deleted...": "Esta mensagem foi excluída...", "Thread": "Fio", "Type your message": "Digite sua mensagem", diff --git a/src/i18n/ru.json b/src/i18n/ru.json index 8f182dd0c..e28da8fad 100644 --- a/src/i18n/ru.json +++ b/src/i18n/ru.json @@ -8,7 +8,8 @@ "Connection failure, reconnecting now...": "Ошибка соединения, переподключение...", "Delete": "Удалить", "Delivered": "Отправлено", - "Drag your files here": "Drag your files here", + "Drag your files here": "Перетащите ваши файлы сюда", + "Drag your files here to add to your post": "Перетащите ваши файлы сюда, чтобы добавить их в ваш пост", "Edit Message": "Редактировать сообщение", "Edit message request failed": "Не удалось изменить запрос сообщения", "Emoji matching": "Соответствие эмодзи", @@ -26,6 +27,7 @@ "Error: {{ errorMessage }}": "Ошибка: {{ errorMessage }}", "Flag": "Пожаловаться", "Latest Messages": "Последние сообщения", + "Load more": "Загрузить больше", "Menu": "Меню", "Message Failed · Click to try again": "Ошибка отправки сообщения · Нажмите чтобы повторить", "Message Failed · Unauthorized": "Ошибка отправки сообщения · Неавторизованный", @@ -50,8 +52,9 @@ "Send": "Отправить", "Send message request failed": "Не удалось отправить запрос на отправку сообщения", "Sending...": "Отправка...", + "Shuffle": "Перемешать", "Slow Mode ON": "Медленный режим включен", - "Some of the files will not be accepted": "Some of the files will not be accepted", + "Some of the files will not be accepted": "Некоторые файлы не будут приняты", "This message was deleted...": "Сообщение было удалено...", "Thread": "Ветка", "Type your message": "Ваше сообщение", diff --git a/src/i18n/tr.json b/src/i18n/tr.json index 5443bec35..eeb9c4521 100644 --- a/src/i18n/tr.json +++ b/src/i18n/tr.json @@ -8,7 +8,8 @@ "Connection failure, reconnecting now...": "Bağlantı hatası, tekrar bağlanılıyor...", "Delete": "Sil", "Delivered": "İletildi", - "Drag your files here": "Drag your files here", + "Drag your files here": "Dosyalarınızı buraya sürükleyin", + "Drag your files here to add to your post": "Gönderinize eklemek için dosyalarınızı buraya sürükleyin", "Edit Message": "Mesajı Düzenle", "Edit message request failed": "Mesaj düzenleme isteği başarısız oldu", "Emoji matching": "Emoji eşleştirme", @@ -26,6 +27,7 @@ "Error: {{ errorMessage }}": "Hata: {{ errorMessage }}", "Flag": "Bayrak", "Latest Messages": "Son Mesajlar", + "Load more": "Daha fazla yükle", "Menu": "Menü", "Message Failed · Click to try again": "Mesaj Başarısız · Tekrar denemek için tıklayın", "Message Failed · Unauthorized": "Mesaj Başarısız · Yetkisiz", @@ -50,8 +52,9 @@ "Send": "Gönder", "Send message request failed": "Mesaj gönderme isteği başarısız oldu", "Sending...": "Gönderiliyor...", + "Shuffle": "Karıştır", "Slow Mode ON": "Yavaş Mod Açık", - "Some of the files will not be accepted": "Some of the files will not be accepted", + "Some of the files will not be accepted": "Bazı dosyalar kabul edilmeyecektir", "This message was deleted...": "Bu mesaj silindi", "Thread": "Konu", "Type your message": "Mesajınızı yazın",