Skip to content

Commit 284641d

Browse files
committed
feat: provide translations to VoiceRecording components
1 parent b942100 commit 284641d

File tree

13 files changed

+26
-3
lines changed

13 files changed

+26
-3
lines changed

src/components/Attachment/VoiceRecording.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import { useTranslationContext } from '../../context';
1010
import type { DefaultStreamChatGenerics } from '../../types';
1111

1212
const rootClassName = 'str-chat__message-attachment__voice-recording-widget';
13-
const FALLBACK_TITLE = 'Voice message';
1413

1514
export type VoiceRecordingPlayerProps<
1615
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics
@@ -25,7 +24,7 @@ export const VoiceRecordingPlayer = ({ attachment, playbackRates }: VoiceRecordi
2524
asset_url,
2625
duration,
2726
mime_type,
28-
title = t<string>(FALLBACK_TITLE),
27+
title = t<string>('Voice message'),
2928
waveform_data,
3029
} = attachment;
3130

@@ -89,7 +88,7 @@ export type QuotedVoiceRecordingProps<
8988

9089
export const QuotedVoiceRecording = ({ attachment }: QuotedVoiceRecordingProps) => {
9190
const { t } = useTranslationContext();
92-
const title = attachment.title || t<string>(FALLBACK_TITLE);
91+
const title = attachment.title || t<string>('Voice message');
9392
return (
9493
<div className={rootClassName} data-testid='quoted-voice-recording-widget'>
9594
<div className='str-chat__message-attachment__voice-recording-widget__metadata'>

src/i18n/de.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"Error muting a user ...": "Fehler beim Stummschalten eines Nutzers.",
2323
"Error pinning message": "Fehler beim Pinnen der Nachricht",
2424
"Error removing message pin": "Fehler beim Entfernen der gepinnten Nachricht",
25+
"Error reproducing the recording": "Fehler bei der Wiedergabe der Aufnahme",
2526
"Error unmuting a user ...": "Stummschaltung des Nutzers fehlgeschlagen ...",
2627
"Error uploading file": "Fehler beim Hochladen der Datei",
2728
"Error uploading image": "Hochladen des Bildes fehlgeschlagen",
@@ -70,6 +71,7 @@
7071
"Unread messages": "Ungelesene Nachrichten",
7172
"Upload type: \"{{ type }}\" is not allowed": "Upload-Typ: \"{{ type }}\" ist nicht erlaubt",
7273
"User uploaded content": "Benutzer hochgeladenen Inhalts",
74+
"Voice message": "Sprachnachricht",
7375
"Wait until all attachments have uploaded": "Bitte warten, bis alle Anhänge hochgeladen wurden",
7476
"You have no channels currently": "Du hast momentan noch keinen Channels",
7577
"You've reached the maximum number of files": "Die maximale Dateianzahl ist erreicht",

src/i18n/en.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"Error muting a user ...": "Error muting a user ...",
2323
"Error pinning message": "Error pinning message",
2424
"Error removing message pin": "Error removing message pin",
25+
"Error reproducing the recording": "Error reproducing the recording",
2526
"Error unmuting a user ...": "Error unmuting a user ...",
2627
"Error uploading file": "Error uploading file",
2728
"Error uploading image": "Error uploading image",
@@ -70,6 +71,7 @@
7071
"Unread messages": "Unread messages",
7172
"Upload type: \"{{ type }}\" is not allowed": "Upload type: \"{{ type }}\" is not allowed",
7273
"User uploaded content": "User uploaded content",
74+
"Voice message": "Voice message",
7375
"Wait until all attachments have uploaded": "Wait until all attachments have uploaded",
7476
"You have no channels currently": "You have no channels currently",
7577
"You've reached the maximum number of files": "You've reached the maximum number of files",

src/i18n/es.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"Error muting a user ...": "Error al silenciar a un usuario ...",
2323
"Error pinning message": "Mensaje de error al fijar",
2424
"Error removing message pin": "Error al quitar el pin del mensaje",
25+
"Error reproducing the recording": "Error al reproducir la grabación",
2526
"Error unmuting a user ...": "Error al activar el silencio de un usuario ...",
2627
"Error uploading file": "Error al cargar el archivo",
2728
"Error uploading image": "Error subiendo imagen",
@@ -70,6 +71,7 @@
7071
"Unread messages": "Mensajes no leídos",
7172
"Upload type: \"{{ type }}\" is not allowed": "Tipo de carga: \"{{ type }}\" no está permitido",
7273
"User uploaded content": "Contenido subido por el usuario",
74+
"Voice message": "Mensaje de voz",
7375
"Wait until all attachments have uploaded": "Espere hasta que se hayan cargado todos los archivos adjuntos",
7476
"You have no channels currently": "Actualmente no tienes canales",
7577
"You've reached the maximum number of files": "Has alcanzado el número máximo de archivos",

src/i18n/fr.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"Error muting a user ...": "Erreur de mise en sourdine d'un utilisateur ...",
2323
"Error pinning message": "Erreur d'épinglage du message",
2424
"Error removing message pin": "Erreur lors de la suppression du code PIN du message",
25+
"Error reproducing the recording": "Erreur lors de la reproduction de l'enregistrement",
2526
"Error unmuting a user ...": "Erreur de désactivation de la fonction sourdine pour un utilisateur ...",
2627
"Error uploading file": "Erreur lors du téléchargement du fichier",
2728
"Error uploading image": "Erreur lors de l'envoi de l'image",
@@ -70,6 +71,7 @@
7071
"Unread messages": "Messages non lus",
7172
"Upload type: \"{{ type }}\" is not allowed": "Le type de téléchargement: \"{{ type }}\" n'est pas autorisé",
7273
"User uploaded content": "Contenu téléchargé par l'utilisateur",
74+
"Voice message": "Message vocal",
7375
"Wait until all attachments have uploaded": "Attendez que toutes les pièces jointes soient téléchargées",
7476
"You have no channels currently": "Vous n'avez actuellement aucun canal",
7577
"You've reached the maximum number of files": "Vous avez atteint le nombre maximum de fichiers",

src/i18n/hi.json

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"Error muting a user ...": "यूजर को म्यूट करने का प्रयास फेल हुआ",
2424
"Error pinning message": "संदेश को पिन करने में त्रुटि",
2525
"Error removing message pin": "संदेश पिन निकालने में त्रुटि",
26+
"Error reproducing the recording": "रिकॉर्डिंग पुन: उत्पन्न करने में त्रुटि",
2627
"Error unmuting a user ...": "यूजर को अनम्यूट करने का प्रयास फेल हुआ",
2728
"Error uploading file": "फ़ाइल अपलोड करने में त्रुटि",
2829
"Error uploading image": "छवि अपलोड करने में त्रुटि",
@@ -71,6 +72,7 @@
7172
"Unread messages": "अपठित संदेश",
7273
"Upload type: \"{{ type }}\" is not allowed": "अपलोड प्रकार: \"{{ type }}\" की अनुमति नहीं है",
7374
"User uploaded content": "उपयोगकर्ता अपलोड की गई सामग्री",
75+
"Voice message": "आवाज संदेश",
7476
"Wait until all attachments have uploaded": "सभी अटैचमेंट अपलोड होने तक प्रतीक्षा करें",
7577
"You have no channels currently": "आपके पास कोई चैनल नहीं है",
7678
"You've reached the maximum number of files": "आप अधिकतम फ़ाइलों तक पहुँच गए हैं",

src/i18n/it.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"Error muting a user ...": "Errore silenziando un utente ...",
2323
"Error pinning message": "Errore durante il blocco del messaggio",
2424
"Error removing message pin": "Errore durante la rimozione del PIN del messaggio",
25+
"Error reproducing the recording": "Errore durante la riproduzione della registrazione",
2526
"Error unmuting a user ...": "Errore riattivando le notifiche per l'utente ...",
2627
"Error uploading file": "Errore durante il caricamento del file",
2728
"Error uploading image": "Errore durante il caricamento dell'immagine",
@@ -70,6 +71,7 @@
7071
"Unread messages": "Messaggi non letti",
7172
"Upload type: \"{{ type }}\" is not allowed": "Tipo di caricamento: \"{{ type }}\" non è consentito",
7273
"User uploaded content": "Contenuto caricato dall'utente",
74+
"Voice message": "Messaggio vocale",
7375
"Wait until all attachments have uploaded": "Attendi il caricamento di tutti gli allegati",
7476
"You have no channels currently": "Al momento non sono presenti canali",
7577
"You've reached the maximum number of files": "Hai raggiunto il numero massimo di file",

src/i18n/ja.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"Error muting a user ...": "ユーザーを無音するエラーが発生しました...",
2323
"Error pinning message": "メッセージをピンのエラーが発生しました",
2424
"Error removing message pin": "メッセージのピンを削除のエラーが発生しました",
25+
"Error reproducing the recording": "録音の再生中にエラーが発生しました",
2526
"Error unmuting a user ...": "ユーザーの無音解除のエラーが発生しました...",
2627
"Error uploading file": "ファイルをアップロードのエラーが発生しました",
2728
"Error uploading image": "画像をアップロードのエラーが発生しました",
@@ -70,6 +71,7 @@
7071
"Unread messages": "未読メッセージ",
7172
"Upload type: \"{{ type }}\" is not allowed": "アップロードタイプ:\"{{ type }}\"は許可されていません",
7273
"User uploaded content": "ユーザーがアップロードしたコンテンツ",
74+
"Voice message": "ボイスメッセージ",
7375
"Wait until all attachments have uploaded": "すべての添付ファイルがアップロードされるまでお待ちください",
7476
"You have no channels currently": "現在チャンネルはありません",
7577
"You've reached the maximum number of files": "ファイルの最大数に達しました",

src/i18n/ko.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"Error muting a user ...": "사용자를 음소거하는 중에 오류가 발생했습니다...",
2323
"Error pinning message": "메시지를 핀하는 중에 오류가 발생했습니다.",
2424
"Error removing message pin": "메시지 핀을 제거하는 중에 오류가 발생했습니다.",
25+
"Error reproducing the recording": "녹음 재생 중 오류 발생",
2526
"Error unmuting a user ...": "사용자 음소거 해제 중 오류 발생...",
2627
"Error uploading file": "파일 업로드 오류",
2728
"Error uploading image": "이미지를 업로드하는 동안 오류가 발생했습니다.",
@@ -70,6 +71,7 @@
7071
"Unread messages": "읽지 않은 메시지",
7172
"Upload type: \"{{ type }}\" is not allowed": "업로드 유형: \"{{ type }}\"은(는) 허용되지 않습니다.",
7273
"User uploaded content": "사용자 업로드 콘텐츠",
74+
"Voice message": "음성 메시지",
7375
"Wait until all attachments have uploaded": "모든 첨부 파일이 업로드될 때까지 기다립니다.",
7476
"You have no channels currently": "현재 채널이 없습니다.",
7577
"You've reached the maximum number of files": "최대 파일 수에 도달했습니다.",

src/i18n/nl.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"Error muting a user ...": "Fout bij het muten van de gebruiker",
2323
"Error pinning message": "Fout bij vastzetten van bericht",
2424
"Error removing message pin": "Fout bij verwijderen van berichtpin",
25+
"Error reproducing the recording": "Fout bij het afspelen van de opname",
2526
"Error unmuting a user ...": "Fout bij het unmuten van de gebruiker",
2627
"Error uploading file": "Fout bij uploaden bestand",
2728
"Error uploading image": "Fout bij uploaden afbeelding",
@@ -70,6 +71,7 @@
7071
"Unread messages": "Ongelezen berichten",
7172
"Upload type: \"{{ type }}\" is not allowed": "Uploadtype: \"{{ type }}\" is niet toegestaan",
7273
"User uploaded content": "Gebruikersgeüploade inhoud",
74+
"Voice message": "Voicemail",
7375
"Wait until all attachments have uploaded": "Wacht tot alle bijlagen zijn geüpload",
7476
"You have no channels currently": "Er zijn geen chats beschikbaar",
7577
"You've reached the maximum number of files": "Je hebt het maximale aantal bestanden bereikt",

src/i18n/pt.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"Error muting a user ...": "Erro ao silenciar um usuário...",
2323
"Error pinning message": "Erro ao fixar mensagem",
2424
"Error removing message pin": "Erro ao remover o PIN da mensagem",
25+
"Error reproducing the recording": "Erro ao reproduzir a gravação",
2526
"Error unmuting a user ...": "Erro ao ativar o som de um usuário...",
2627
"Error uploading file": "Erro ao enviar arquivo",
2728
"Error uploading image": "Erro ao carregar a imagem",
@@ -70,6 +71,7 @@
7071
"Unread messages": "Mensagens não lidas",
7172
"Upload type: \"{{ type }}\" is not allowed": "Tipo de upload: \"{{ type }}\" não é permitido",
7273
"User uploaded content": "Conteúdo enviado pelo usuário",
74+
"Voice message": "Mensagem de voz",
7375
"Wait until all attachments have uploaded": "Espere até que todos os anexos tenham sido carregados",
7476
"You have no channels currently": "Você não tem canais atualmente",
7577
"You've reached the maximum number of files": "Você atingiu o número máximo de arquivos",

src/i18n/ru.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"Error muting a user ...": "Ошибка отключения уведомлений от пользователя...",
2323
"Error pinning message": "Сообщение об ошибке при закреплении",
2424
"Error removing message pin": "Ошибка при удалении булавки сообщения",
25+
"Error reproducing the recording": "Ошибка воспроизведения записи",
2526
"Error unmuting a user ...": "Ошибка включения уведомлений...",
2627
"Error uploading file": "Ошибка при загрузке файла",
2728
"Error uploading image": "Ошибка загрузки изображения",
@@ -70,6 +71,7 @@
7071
"Unread messages": "Непрочитанные сообщения",
7172
"Upload type: \"{{ type }}\" is not allowed": "Тип загрузки: \"{{ type }}\" не разрешен",
7273
"User uploaded content": "Пользователь загрузил контент",
74+
"Voice message": "Голосовое сообщение",
7375
"Wait until all attachments have uploaded": "Подождите, пока все вложения загрузятся",
7476
"You have no channels currently": "У вас нет каналов в данный момент",
7577
"You've reached the maximum number of files": "Вы достигли максимального количества файлов",

src/i18n/tr.json

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"Error muting a user ...": "Kullanıcıyı sessize alırken hata oluştu ...",
2323
"Error pinning message": "Mesaj sabitlenirken hata oluştu",
2424
"Error removing message pin": "Mesaj PIN'i kaldırılırken hata oluştu",
25+
"Error reproducing the recording": "Kaydı yeniden üretme hatası",
2526
"Error unmuting a user ...": "Kullanıcının sesini açarken hata oluştu ...",
2627
"Error uploading file": "Dosya yüklenirken hata oluştu",
2728
"Error uploading image": "Resmi yüklerken hata",
@@ -70,6 +71,7 @@
7071
"Unread messages": "Okunmamış mesajlar",
7172
"Upload type: \"{{ type }}\" is not allowed": "Yükleme türü: \"{{ type }}\" izin verilmez",
7273
"User uploaded content": "Kullanıcı tarafından yüklenen içerik",
74+
"Voice message": "Sesli mesaj",
7375
"Wait until all attachments have uploaded": "Tüm ekler yüklenene kadar bekleyin",
7476
"You have no channels currently": "Henüz kanalınız yok",
7577
"You've reached the maximum number of files": "Maksimum dosya sayısına ulaştınız",

0 commit comments

Comments
 (0)