diff --git a/app/containers/Avatar/Avatar.tsx b/app/containers/Avatar/Avatar.tsx index 7d10b29367..8f68bec565 100644 --- a/app/containers/Avatar/Avatar.tsx +++ b/app/containers/Avatar/Avatar.tsx @@ -8,6 +8,7 @@ import { getAvatarURL } from '../../lib/methods/helpers/getAvatarUrl'; import { SubscriptionType } from '../../definitions'; import Emoji from '../markdown/Emoji'; import { IAvatar } from './interfaces'; +import I18n from '../../i18n'; const Avatar = React.memo( ({ @@ -31,12 +32,14 @@ const Avatar = React.memo( type = SubscriptionType.DIRECT, avatarExternalProviderUrl, roomAvatarExternalProviderUrl, - cdnPrefix + cdnPrefix, + accessibilityLabel }: IAvatar) => { if ((!text && !avatar && !emoji && !rid) || !server) { return null; } + const avatarAccessibilityLabel = accessibilityLabel ?? I18n.t('Avatar_Photo', { username: text }); const avatarStyle = { width: size, height: size, @@ -80,11 +83,19 @@ const Avatar = React.memo( } if (onPress) { - image = {image}; + image = ( + + {image} + + ); } return ( - + {image} {children} diff --git a/app/containers/Avatar/AvatarContainer.tsx b/app/containers/Avatar/AvatarContainer.tsx index 3e1282d429..29274a49dc 100644 --- a/app/containers/Avatar/AvatarContainer.tsx +++ b/app/containers/Avatar/AvatarContainer.tsx @@ -19,7 +19,8 @@ const AvatarContainer = ({ onPress, getCustomEmoji, isStatic, - rid + rid, + accessibilityLabel }: IAvatar): React.ReactElement => { const server = useSelector((state: IApplicationState) => state.server.server); const serverVersion = useSelector((state: IApplicationState) => state.server.version); @@ -66,6 +67,7 @@ const AvatarContainer = ({ avatarETag={avatarETag} serverVersion={serverVersion} cdnPrefix={cdnPrefix} + accessibilityLabel={accessibilityLabel} /> ); }; diff --git a/app/containers/Avatar/interfaces.ts b/app/containers/Avatar/interfaces.ts index 625ae4b873..8b53c130d4 100644 --- a/app/containers/Avatar/interfaces.ts +++ b/app/containers/Avatar/interfaces.ts @@ -25,4 +25,5 @@ export interface IAvatar { avatarExternalProviderUrl?: string; roomAvatarExternalProviderUrl?: string; cdnPrefix?: string; + accessibilityLabel?: string; } diff --git a/app/i18n/locales/ar.json b/app/i18n/locales/ar.json index 3fd6638fca..a3caa80d66 100644 --- a/app/i18n/locales/ar.json +++ b/app/i18n/locales/ar.json @@ -36,6 +36,7 @@ "Auto_Translate": "ترجمة تلقائية", "Automatic": "تلقائي", "Avatar_changed_successfully": "تم تغيير الصورة الرمزية بنجاح!", + "Avatar_Photo": "صورة رمزية {{username}}", "Avatar_Url": "عنوان ويب الصورة الرمزية", "Away": "غير متواجد", "Black": "أسود", @@ -158,6 +159,7 @@ "Everyone_can_access_this_team": "يمكن للجميع الوصول إلى هذا الفريق", "Expiration_Days": "انتهاء (أيام)", "Favorites": "مفضلات", + "Fetch_image_from_URL": "جلب الصورة من الرابط", "File_description": "وصف الملف", "Files": "ملفات", "Finish_recording": "إنهاء التسجيل", @@ -398,6 +400,7 @@ "Select_a_User": "حدد مستخدم", "Select_an_option": "حدد خيار", "Select_Server": "حدد خادم", + "Select_Uploaded_Image": "حدد الصورة التي تم تحميلها", "Select_Users": "حدد مستخدمين", "Send": "إرسال", "Send_audio_message": "إرسال رسالة صوتية", diff --git a/app/i18n/locales/bn-IN.json b/app/i18n/locales/bn-IN.json index 87306bdbfb..089f3a95e8 100644 --- a/app/i18n/locales/bn-IN.json +++ b/app/i18n/locales/bn-IN.json @@ -57,6 +57,7 @@ "Automatic": "স্বয়ংক্রিয়", "Avatar": "অবতার", "Avatar_changed_successfully": "অবতার সফলভাবে পরিবর্তন হয়েছে!", + "Avatar_Photo": "{{username}} অবতার", "Avatar_Url": "অবতার URL", "Avatars": "এভাটার", "Away": "দূরে", @@ -265,6 +266,7 @@ "Expanded": "বিস্তৃত", "Expiration_Days": "মেয়াদ শেষ (দিন)", "Favorites": "প্রিয়সমূহ", + "Fetch_image_from_URL": "URL থেকে ছবি আনুন", "File_description": "ফাইল বর্ণনা", "Files": "ফাইলসমূহ", "FileUpload_Error": "ফাইল আপলোড ত্রুটি", @@ -606,6 +608,7 @@ "Select_Team": "দল নির্বাচন করুন", "Select_Team_Channels": "আপনি যে দলের চ্যানেলগুলি ত্যাগ করতে চান তা নির্বাচন করুন।", "Select_Team_Channels_To_Delete": "আপনি যে দলের চ্যানেলগুলি মোছতে চান তা নির্বাচন করুন, যেগুলি আপনি নির্বাচন করবেন না তা উইর্কস্পেসে যাবে। \n\nমনে রাখবেন যে পাবলিক চ্যানেলগুলি এখনও সর্বাধিক এবং সবাইকে দৃশ্যমান থাকবে।", + "Select_Uploaded_Image": "আপলোড করা ছবি নির্বাচন করুন", "Select_Users": "ব্যবহারকারী নির্বাচন করুন", "Send": "পাঠান", "Send_audio_message": "অডিও মেসেজ পাঠান", diff --git a/app/i18n/locales/cs.json b/app/i18n/locales/cs.json index f9ac86866b..b506a0cfbb 100644 --- a/app/i18n/locales/cs.json +++ b/app/i18n/locales/cs.json @@ -60,6 +60,7 @@ "Automatic": "Automatický", "Avatar": "Avatar", "Avatar_changed_successfully": "Avatar se úspěšně změnil!", + "Avatar_Photo": "{{username}} Avatar", "Avatar_Url": "Adresa URL avatara", "Avatars": "Avataři", "Away": "Pryč", @@ -284,6 +285,7 @@ "Expanded": "Rozšířený", "Expiration_Days": "Vypršení platnosti (dny)", "Favorites": "Oblíbené", + "Fetch_image_from_URL": "Načíst obrázek z URL", "File_description": "Popis souboru", "Files": "Soubory", "FileUpload_Error": "Chyba nahrávání souboru", @@ -656,6 +658,7 @@ "Select_Team": "Vybrat tým", "Select_Team_Channels": "Vyberte kanály týmu, které chcete opustit.", "Select_Team_Channels_To_Delete": "Vyberte kanály týmu, které chcete smazat, ty, které nevyberete, budou přesunuty do pracovního prostoru. \n\nVšimněte si, že veřejné kanály budou veřejné a viditelné pro všechny.", + "Select_Uploaded_Image": "Vyberte nahraný obrázek", "Select_Users": "Vybrat uživatele", "Send": "Poslat", "Send_audio_message": "Odeslat zvukovou zprávu", diff --git a/app/i18n/locales/de.json b/app/i18n/locales/de.json index 88c5c6dc1d..a865261607 100644 --- a/app/i18n/locales/de.json +++ b/app/i18n/locales/de.json @@ -57,6 +57,7 @@ "Automatic": "Automatisch", "Avatar": "Profilbild", "Avatar_changed_successfully": "Avatar erfolgreich geändert!", + "Avatar_Photo": "{{username}} Avatar", "Avatar_Url": "Avatar-URL", "Avatars": "Avatare", "Away": "Abwesend", @@ -259,6 +260,7 @@ "Expanded": "Erweitert", "Expiration_Days": "läuft ab (Tage)", "Favorites": "Favoriten", + "Fetch_image_from_URL": "Bild von URL abrufen", "File_description": "Dateibeschreibung", "Files": "Dateien", "FileUpload_Error": "Fehler bei Datei-Upload", @@ -592,6 +594,7 @@ "Select_Team": "Team auswählen", "Select_Team_Channels": "Wählen Sie die Channels des Teams aus, die Sie verlassen möchten.", "Select_Team_Channels_To_Delete": "Wählen Sie die Channels des Teams aus, die Sie löschen möchten. Die Channels, die Sie nicht auswählen, werden in den Arbeitsbereich verschoben \n\nBeachten Sie, dass öffentliche Kanäle öffentlich und für alle sichtbar sind.", + "Select_Uploaded_Image": "Wählen Sie hochgeladenes Bild", "Select_Users": "Benutzer auswählen", "Send": "Senden", "Send_audio_message": "Audio-Nachricht senden", diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json index 45128915cf..942da87ec3 100644 --- a/app/i18n/locales/en.json +++ b/app/i18n/locales/en.json @@ -60,6 +60,7 @@ "Automatic": "Automatic", "Avatar": "Avatar", "Avatar_changed_successfully": "Avatar changed successfully!", + "Avatar_Photo": "{{username}} Avatar", "Avatar_Url": "Avatar URL", "Avatars": "Avatars", "Away": "Away", @@ -305,6 +306,7 @@ "Expanded": "Expanded", "Expiration_Days": "Expiration (days)", "Favorites": "Favorites", + "Fetch_image_from_URL": "Fetch image from URL", "File_description": "File description", "Files": "Files", "FileUpload_Error": "File upload error", @@ -337,7 +339,7 @@ "I_Saved_My_E2E_Password": "I saved my E2E password", "Ignore": "Ignore", "Image": "Image", - "Images_uploaded": "Images uploaded", + "Images_uploaded": "Uploaded Images", "In_app": "In-app", "In_App_And_Desktop": "In-app and desktop", "In_App_and_Desktop_Alert_info": "Displays a banner at the top of the screen when app is open, and displays a notification on desktop", @@ -685,6 +687,7 @@ "Select_Team": "Select team", "Select_Team_Channels": "Select the team's channels you would like to leave.", "Select_Team_Channels_To_Delete": "Select the team’s channels you would like to delete, the ones you do not select will be moved to the workspace. \n\nNotice that public channels will be public and visible to everyone.", + "Select_Uploaded_Image": "Select Uploaded Image", "Select_Users": "Select users", "Selected": "Selected", "Send": "Send", diff --git a/app/i18n/locales/es.json b/app/i18n/locales/es.json index 77741a2b0f..976ce6ec50 100644 --- a/app/i18n/locales/es.json +++ b/app/i18n/locales/es.json @@ -31,6 +31,7 @@ "Auto_Translate": "Traducción automática", "Automatic": "Automático", "Avatar_changed_successfully": "¡Avatar modificado correctamente!", + "Avatar_Photo": "Avatar de {{username}}", "Avatar_Url": "URL del Avatar", "Away": "Ausente", "Black": "Negro", @@ -108,6 +109,7 @@ "error-you-are-last-owner": "Eres el único propietario existente. Debes establecer un nuevo propietario antes de abandonar la sala.", "Everyone_can_access_this_channel": "Todos los usuarios pueden acceder a este canal", "Favorites": "Favoritos", + "Fetch_image_from_URL": "Obtener imagen desde URL", "File_description": "Descripción del archivo", "Files": "Archivos", "Finish_recording": "Finalizar grabación", @@ -239,6 +241,7 @@ "Search_Messages": "Buscar mensajes", "Search_messages": "Buscar mensajes", "Select_Server": "Selecciona servidor", + "Select_Uploaded_Image": "Seleccionar imagen cargada", "Select_Users": "Selecciona usuarios", "Send": "Enviar", "Send_audio_message": "Enviar nota de audio", diff --git a/app/i18n/locales/fi.json b/app/i18n/locales/fi.json index c4f668ddee..a92e89124b 100644 --- a/app/i18n/locales/fi.json +++ b/app/i18n/locales/fi.json @@ -49,6 +49,7 @@ "Auto-join": "Automaattinen liittyminen", "Automatic": "Automaattinen", "Avatar_changed_successfully": "Avatar on vaihdettu!", + "Avatar_Photo": "{{username}} Avatar", "Avatar_Url": "Avatarin URL-osoite", "Avatars": "Avatarit", "Away": "Poissa", @@ -244,6 +245,7 @@ "Expanded": "Laajennettu", "Expiration_Days": "Vanheneminen (päivää)", "Favorites": "Suosikit", + "Fetch_image_from_URL": "Hae kuva URL-osoitteesta", "File_description": "Tiedoston kuvaus", "Files": "Tiedostot", "FileUpload_Error": "Tiedoston latausvirhe", @@ -567,6 +569,7 @@ "Select_Team": "Valitse tiimi", "Select_Team_Channels": "Valitse tiimin kanavat, joilta haluat poistua.", "Select_Team_Channels_To_Delete": "Valitse poistettavat tiimin kanavat. Valitsematta jättämäsi kanavat siirretään työtilaan. \n\nHuomioi, että julkiset kanavat ovat julkisia ja näkyvät kaikille.", + "Select_Uploaded_Image": "Valitse ladattu kuva", "Select_Users": "Valitse käyttäjät", "Send": "Lähetä", "Send_audio_message": "Lähetä ääniviesti", diff --git a/app/i18n/locales/fr.json b/app/i18n/locales/fr.json index 10ac41aad0..5aba81a464 100644 --- a/app/i18n/locales/fr.json +++ b/app/i18n/locales/fr.json @@ -40,6 +40,7 @@ "Auto-join": "Rejoindre automatiquement", "Automatic": "Automatique", "Avatar_changed_successfully": "Avatar changé avec succès !", + "Avatar_Photo": "Avatar de {{username}}", "Avatar_Url": "URL de l'avatar", "Avatars": "Avatars", "Away": "Absent", @@ -210,6 +211,7 @@ "Expanded": "Etendu", "Expiration_Days": "Expiration (Jours)", "Favorites": "Favoris", + "Fetch_image_from_URL": "Récupérer l'image depuis l'URL", "File_description": "Description du fichier", "Files": "Fichiers", "Finish_recording": "Terminer l'enregistrement", @@ -509,6 +511,7 @@ "Select_Team": "Sélectionnez l'équipe", "Select_Team_Channels": "Sélectionnez les canaux de l'équipe que vous souhaitez quitter.", "Select_Team_Channels_To_Delete": "Sélectionnez les canaux de l'équipe que vous souhaitez supprimer, ceux que vous ne sélectionnez pas, seront déplacés vers l'espace de travail. \n\n\nNotez que les canaux publics seront publics et visibles par tous.", + "Select_Uploaded_Image": "Sélectionnez l'image téléchargée", "Select_Users": "Sélectionner les utilisateurs", "Send": "Envoyer", "Send_audio_message": "Envoyer un message audio", diff --git a/app/i18n/locales/hi-IN.json b/app/i18n/locales/hi-IN.json index ba76f50b4d..a361300703 100644 --- a/app/i18n/locales/hi-IN.json +++ b/app/i18n/locales/hi-IN.json @@ -57,6 +57,7 @@ "Automatic": "स्वच्छता से", "Avatar": "अवतार", "Avatar_changed_successfully": "अवतार सफलता पर बदला गया है!", + "Avatar_Photo": "{{username}} अवतार", "Avatar_Url": "अवतार URL", "Avatars": "अवतार", "Away": "दूर", @@ -265,6 +266,7 @@ "Expanded": "विस्तारित", "Expiration_Days": "समाप्ति (दिन)", "Favorites": "पसंदीदा", + "Fetch_image_from_URL": "URL से छवि प्राप्त करें", "File_description": "फ़ाइल विवरण", "Files": "फ़ाइलें", "FileUpload_Error": "फ़ाइल अपलोड त्रुटि", @@ -606,6 +608,7 @@ "Select_Team": "टीम चुनें", "Select_Team_Channels": "उन चैनलों को चुनें जिन्हें आप छोड़ना चाहेंगे", "Select_Team_Channels_To_Delete": "टीम के चैनलों को चुनें जिन्हें आप हटाना चाहते हैं, जिन्हें आप नहीं चुनते हैं वे कार्यस्थान में मूव किए जाएंगे। सार्वजनिक चैनलों को ध्यान दें कि वे फिर भी सार्वजनिक और सभी के द्वारा दृश्यमान रहेंगे।", + "Select_Uploaded_Image": "चुनी हुई छवि का चयन करें", "Select_Users": "उपयोगकर्ता चयन करें", "Send": "भेजें", "Send_audio_message": "ऑडियो संदेश भेजें", diff --git a/app/i18n/locales/hu.json b/app/i18n/locales/hu.json index 7f64cbbbd5..804c9ce32f 100644 --- a/app/i18n/locales/hu.json +++ b/app/i18n/locales/hu.json @@ -57,6 +57,7 @@ "Automatic": "Automatikus", "Avatar": "Avatar", "Avatar_changed_successfully": "Az avatar sikeresen megváltozott!", + "Avatar_Photo": "{{username}} Avatar", "Avatar_Url": "Avatar URL", "Avatars": "Avatarok", "Away": "Távol", @@ -265,6 +266,7 @@ "Expanded": "Kibővített", "Expiration_Days": "Lejárat (napokban)", "Favorites": "Kedvencek", + "Fetch_image_from_URL": "Kép betöltése az URL-ről", "File_description": "Fájl leírás", "Files": "Fájlok", "FileUpload_Error": "Fájlfeltöltési hiba", @@ -607,6 +609,7 @@ "Select_Team": "Csapat kiválasztása", "Select_Team_Channels": "Válassza ki a csapat azon csatornáit, amelyeket el szeretne hagyni.", "Select_Team_Channels_To_Delete": "Válassza ki a törölni kívánt csapat csatornáit, a ki nem választott csatornák a munkaterületre kerülnek. \n\nVegye figyelembe, hogy a nyilvános csatornák nyilvánosak és mindenki számára láthatóak lesznek.", + "Select_Uploaded_Image": "Válassza ki a feltöltött képet", "Select_Users": "Felhasználók kiválasztása", "Send": "Küldés", "Send_audio_message": "Hangüzenet küldése", diff --git a/app/i18n/locales/it.json b/app/i18n/locales/it.json index f30c3cef1f..14abb2f041 100644 --- a/app/i18n/locales/it.json +++ b/app/i18n/locales/it.json @@ -41,6 +41,7 @@ "Auto_Translate": "Traduzione automatica", "Automatic": "Automatico", "Avatar_changed_successfully": "Avatar aggiornato correttamente!", + "Avatar_Photo": "Avatar di {{username}}", "Avatar_Url": "URL avatar", "Away": "Assente", "Black": "Nero", @@ -183,6 +184,7 @@ "Everyone_can_access_this_team": "Tutti hanno accesso a questo team", "Expiration_Days": "Scadenza (giorni)", "Favorites": "Preferiti", + "Fetch_image_from_URL": "Recupera immagine da URL", "File_description": "Descrizione file", "Files": "File", "Finish_recording": "Termina registrazione", @@ -433,6 +435,7 @@ "Select_a_User": "Seleziona un Utente", "Select_an_option": "Seleziona un' opzione", "Select_Server": "Seleziona server", + "Select_Uploaded_Image": "Seleziona immagine caricata", "Select_Users": "Seleziona utenti", "Send": "Invia", "Send_audio_message": "Invia messaggio audio", diff --git a/app/i18n/locales/ja.json b/app/i18n/locales/ja.json index b572ae8dbd..b0ac2cdc55 100644 --- a/app/i18n/locales/ja.json +++ b/app/i18n/locales/ja.json @@ -35,6 +35,7 @@ "Auto_Translate": "自動翻訳", "Automatic": "自動", "Avatar_changed_successfully": "アバターを変更しました!", + "Avatar_Photo": "{{username}} アバター", "Avatar_Url": "アバターURL", "Away": "退出中", "Black": "ブラック", @@ -158,6 +159,7 @@ "Everyone_can_access_this_team": "全員このチームにアクセスできます", "Expiration_Days": "期限切れ (日)", "Favorites": "お気に入り", + "Fetch_image_from_URL": "URLから画像を取得する", "File_description": "ファイルの説明", "Files": "ファイル", "Finish_recording": "録音停止", @@ -337,6 +339,7 @@ "Search_Messages": "メッセージを検索", "Search_messages": "メッセージを検索", "Select_Server": "サーバーを選択", + "Select_Uploaded_Image": "アップロードされた画像を選択します", "Select_Users": "ユーザーを選択", "Send": "送信", "Send_audio_message": "録音メッセージを送信", diff --git a/app/i18n/locales/nl.json b/app/i18n/locales/nl.json index 689dae2350..7a7c8eb46d 100644 --- a/app/i18n/locales/nl.json +++ b/app/i18n/locales/nl.json @@ -40,6 +40,7 @@ "Auto-join": "Automatisch deelnemen", "Automatic": "Automatisch", "Avatar_changed_successfully": "Avatar succesvol gewijzigd!", + "Avatar_Photo": "{{username}} Avatar", "Avatar_Url": "Avatar-URL", "Avatars": "Avatars", "Away": "Afwezig", @@ -210,6 +211,7 @@ "Expanded": "Uitgebreid", "Expiration_Days": "Vervaldatum (Dagen)", "Favorites": "Favorieten", + "Fetch_image_from_URL": "Afbeelding ophalen van URL", "File_description": "Bestandsbeschrijving", "Files": "Bestanden", "Finish_recording": "Opname beëindigen", @@ -509,6 +511,7 @@ "Select_Team": "Selecteer team", "Select_Team_Channels": "Selecteer de kanalen van het team die je wilt verlaten.", "Select_Team_Channels_To_Delete": "Selecteer de teamkanalen die je wilt verwijderen, de kanalen die u niet selecteert, worden naar de werkruimte verplaatst.\n\nMerk op dat openbare kanalen openbaar en voor iedereen zichtbaar zullen zijn.", + "Select_Uploaded_Image": "Selecteer geüpload afbeelding", "Select_Users": "Selecteer gebruikers", "Send": "Verzenden", "Send_audio_message": "Audiobericht verzenden", diff --git a/app/i18n/locales/pt-BR.json b/app/i18n/locales/pt-BR.json index aea3182d54..a0a1d8f9db 100644 --- a/app/i18n/locales/pt-BR.json +++ b/app/i18n/locales/pt-BR.json @@ -59,6 +59,7 @@ "Automatic": "Automático", "Avatar": "Avatar", "Avatar_changed_successfully": "Avatar alterado com sucesso!", + "Avatar_Photo": "Avatar de {{username}}", "Avatar_Url": "Avatar URL", "Avatars": "Avatars", "Away": "Ausente", @@ -295,6 +296,7 @@ "Expanded": "Estendido", "Expiration_Days": "Expira em (dias)", "Favorites": "Favoritos", + "Fetch_image_from_URL": "Obter imagem da URL", "File_description": "Descrição do arquivo", "Files": "Arquivos", "FileUpload_Error": "Erro de upload de arquivo", @@ -663,6 +665,7 @@ "Select_Team": "Selecionar time", "Select_Team_Channels": "Selecione os canais do time que você gostaria de deixar.", "Select_Team_Channels_To_Delete": "Selecione os canais do time que você gostaria de excluir. Aqueles que você não selecionar serão movidos para a workspace.\n\nNote que os canais públicos serão públicos e visíveis para todos.", + "Select_Uploaded_Image": "Selecionar imagem carregada", "Select_Users": "Selecionar usuários", "Selected": "Selecionado", "Send": "Enviar", diff --git a/app/i18n/locales/pt-PT.json b/app/i18n/locales/pt-PT.json index 3b2c695dc2..fc678dd4ec 100644 --- a/app/i18n/locales/pt-PT.json +++ b/app/i18n/locales/pt-PT.json @@ -34,6 +34,7 @@ "Auto_Translate": "Auto-Tradução", "Automatic": "Automático", "Avatar_changed_successfully": "Avatar alterado com sucesso!", + "Avatar_Photo": "Avatar de {{username}}", "Avatar_Url": "URL do Avatar", "Away": "Ausente", "Black": "Preto", @@ -153,6 +154,7 @@ "Everyone_can_access_this_team": "Todos podem aceder a esta equipa", "Expiration_Days": "Validade (Dias)", "Favorites": "Favoritos", + "Fetch_image_from_URL": "Pesquisar imagem do URL", "File_description": "Descrição do ficheiro", "Files": "Ficheiros", "Finish_recording": "Terminar a gravação", @@ -334,6 +336,7 @@ "saving_settings": "a guardar configurações", "Search": "Pesquisar", "Search_Messages": "Pesquisar Mensagens", + "Select_Uploaded_Image": "Selecione a Imagem Carregada", "Select_Users": "Seleccionar Utilizadores", "Send": "Enviar", "Send_audio_message": "Enviar mensagem de áudio", diff --git a/app/i18n/locales/ru.json b/app/i18n/locales/ru.json index a46dbb50cd..cbf943b4b0 100644 --- a/app/i18n/locales/ru.json +++ b/app/i18n/locales/ru.json @@ -47,6 +47,7 @@ "Auto-join": "Автодобавление", "Automatic": "Автоматически", "Avatar_changed_successfully": "Аватар успешно изменен!", + "Avatar_Photo": "{{username}} Аватар", "Avatar_Url": "URL аватара", "Avatars": "Аватары", "Away": "Отошел", @@ -235,6 +236,7 @@ "Expanded": "Расширенный", "Expiration_Days": "Срок действия (Дни)", "Favorites": "Избранное", + "Fetch_image_from_URL": "получить изображение по URL", "File_description": "Описание файла", "Files": "Файлы", "Finish_recording": "Завершить запись", @@ -544,6 +546,7 @@ "Select_Team": "Выберите Команду", "Select_Team_Channels": "Выберите каналы Команды, которые вы хотите покинуть.", "Select_Team_Channels_To_Delete": "Выберите каналы Команды, которые вы хотите удалить, те, которые вы не выбрали, будут перемещены в рабочую область \n\nОбратите внимание, что публичные каналы будут открытыми и видимыми для всех.", + "Select_Uploaded_Image": "Выберите загруженное изображение", "Select_Users": "Выбор пользователей", "Send": "Отправить", "Send_audio_message": "Отправить аудиосообщение", diff --git a/app/i18n/locales/sl-SI.json b/app/i18n/locales/sl-SI.json index 50b1a4b8e6..e1abfaf287 100644 --- a/app/i18n/locales/sl-SI.json +++ b/app/i18n/locales/sl-SI.json @@ -45,6 +45,7 @@ "Auto-join": "Samodejna pridružitev", "Automatic": "Avtomatično", "Avatar_changed_successfully": "Avatar uspešno spremenjen", + "Avatar_Photo": "{{username}} Avatar", "Avatar_Url": "Avatar URL", "Avatars": "Avatari", "Away": "Odsoten", @@ -221,6 +222,7 @@ "Expanded": "Razširjen", "Expiration_Days": "Iztek (dnevi)", "Favorites": "Priljubljeno", + "Fetch_image_from_URL": "Pridobi sliko iz URL", "File_description": "Opis datoteke", "Files": "Datoteke", "Finish_recording": "Zaključek snemanja", @@ -523,6 +525,7 @@ "Select_Team": "Izberite ekipo", "Select_Team_Channels": "Izberite kanale ekipe, ki jih želite zapustiti.", "Select_Team_Channels_To_Delete": "Izberite kanale ekipe, ki jih želite izbrisati, tisti, ki jih ne izberete, bodo premaknjeni v delovni prostor.\n\nPazite, da bodo javni kanali res javni in vidni vsem.", + "Select_Uploaded_Image": "Izberite naloženo sliko", "Select_Users": "Izberite uporabnike", "Send": "Pošlji", "Send_audio_message": "Pošljite zvočno sporočilo", diff --git a/app/i18n/locales/sv.json b/app/i18n/locales/sv.json index 5ea1b7f652..e6a2667023 100644 --- a/app/i18n/locales/sv.json +++ b/app/i18n/locales/sv.json @@ -49,6 +49,7 @@ "Auto-join": "Anslut automatiskt", "Automatic": "Automatiskt", "Avatar_changed_successfully": "Avataren har ändrats", + "Avatar_Photo": "{{username}} Avatar", "Avatar_Url": "URL till avatar", "Avatars": "Avatarer", "Away": "Borta", @@ -244,6 +245,7 @@ "Expanded": "Expanderade", "Expiration_Days": "Förfallotid (dagar)", "Favorites": "Favoriter", + "Fetch_image_from_URL": "Hämta bild från URL", "File_description": "Filbeskrivning", "Files": "Filer", "Finish_recording": "Avsluta inspelningen", @@ -566,6 +568,7 @@ "Select_Team": "Välj team", "Select_Team_Channels": "Välj de teamkanaler du vill lämna.", "Select_Team_Channels_To_Delete": "Välj den teamkanal du vill ta bort. De du inte väljer flyttas till arbetsytan. \n\nTänk på att offentliga kanaler är öppna och synliga för alla.", + "Select_Uploaded_Image": "Välj uppladdad bild", "Select_Users": "Välj användare", "Send": "Skicka", "Send_audio_message": "Skicka ljudmeddelande", diff --git a/app/i18n/locales/ta-IN.json b/app/i18n/locales/ta-IN.json index 48b25ac042..921eb3f05a 100644 --- a/app/i18n/locales/ta-IN.json +++ b/app/i18n/locales/ta-IN.json @@ -57,6 +57,7 @@ "Automatic": "தானாக", "Avatar": "அவதார்", "Avatar_changed_successfully": "அவதார் வேறுபடுத்தப்பட்டது!", + "Avatar_Photo": "{{username}} அவதார்", "Avatar_Url": "அவதார் URL", "Avatars": "அவதார்கள்", "Away": "விலகியிருக்கிறேன்", @@ -265,6 +266,7 @@ "Expanded": "பரப்பியது", "Expiration_Days": "காலாவதி (நாட்கள்)", "Favorites": "பிடித்தவை", + "Fetch_image_from_URL": "URL இலிருந்து படத்தைப் பெறவும்", "File_description": "கோப்பு விளக்கம்", "Files": "கோப்புகள்", "FileUpload_Error": "கோப்பு பதிவேற்று பிழை", @@ -606,6 +608,7 @@ "Select_Team": "குழுவைத் தேர்ந்தெடு", "Select_Team_Channels": "நீங்கள் விடுவிக்க விரும்பும் குழுவின் சேனல்களைத் தேர்ந்தெடுக.", "Select_Team_Channels_To_Delete": "நீங்கள் அழிக்க விரும்பும் குழுவின் சேனல்களைத் தேர்ந்தெடுக்கவும், நீங்கள் தேர்ந்தெடுத்தவை பணியிடக்கப்படும். \n\nபொது சேனல்கள் பொதுவாக பொருந்துவதும் எவருக்கும் காணத்தக்கதாகும் என்று குறிக்கவும்.", + "Select_Uploaded_Image": "பதிவு செய்யப்பட்டது என்பதனைத் தேர்ந்தெடுக்கவும்", "Select_Users": "பயனர்களை தேர்வு செய்", "Send": "அனுப்பு", "Send_audio_message": "ஒரு ஒலி செய்தியை அனுப்பு", diff --git a/app/i18n/locales/te-IN.json b/app/i18n/locales/te-IN.json index 9d04f5bd44..088f8eb54e 100644 --- a/app/i18n/locales/te-IN.json +++ b/app/i18n/locales/te-IN.json @@ -57,6 +57,7 @@ "Automatic": "స్వయంగా", "Avatar": "అవతార్", "Avatar_changed_successfully": "అవతార్ విజయవంతంగా మారింది!", + "Avatar_Photo": "{{username}} अवतार", "Avatar_Url": "అవతార్ URL", "Avatars": "అవతార్లు", "Away": "దూరంగా", @@ -264,6 +265,7 @@ "Expanded": "విస్తృతం", "Expiration_Days": "కాలాంతరం (రోజులు)", "Favorites": "ఇష్టాలు", + "Fetch_image_from_URL": "URL నుండి చిత్రాన్ని పొందండి", "File_description": "పిలుస్తూనే వివరణ", "Files": "పిలుస్తూనే", "FileUpload_Error": "ఫైల్ అప్లోడ్ లోపం", @@ -605,6 +607,7 @@ "Select_Team": "టీమ్ ఎంచుకోండి", "Select_Team_Channels": "మీరు విడిచిపోవచ్చే టీమ్ ఛానల్‌లను ఎంచుకోండి.", "Select_Team_Channels_To_Delete": "తొలగించాల్సిన టీమ్ ఛానల్‌లను ఎంచుకోండి, మీరు ఎంచుకోలేనివి వర్క్‌స్పేస్‌కు తరలబడతాయి. \n\nప్రజా ఛానల్‌లు ప్రజలకు ప్రజావాడుగా మరియు ప్రతివాడికి దరారుగా కనిపిస్తాయి.", + "Select_Uploaded_Image": "ఎంపడిన చిత్రాన్ని ఎంచుకోండి", "Select_Users": "వాడుకరులను ఎంచుకోండి", "Send": "పంపించండి", "Send_audio_message": "ఆడియో సందేశాన్ని పంపండి", diff --git a/app/i18n/locales/tr.json b/app/i18n/locales/tr.json index ab44062fdd..a58f38f91f 100644 --- a/app/i18n/locales/tr.json +++ b/app/i18n/locales/tr.json @@ -35,6 +35,7 @@ "Auto_Translate": "Otomatik Çevir", "Automatic": "Otomatik", "Avatar_changed_successfully": "Profil fotoğrafı başarıyla değiştirildi!", + "Avatar_Photo": "{{username}} Avatar", "Avatar_Url": "Profil fotoğrafı URL'si", "Away": "Uzakta", "Black": "Koyu", @@ -170,6 +171,7 @@ "Everyone_can_access_this_channel": "Bu kanala herkes erişebilir", "Expiration_Days": "Geçerlilik Süresi (Gün)", "Favorites": "Favoriler", + "Fetch_image_from_URL": "URL'den resim al", "File_description": "Dosya açıklaması", "Files": "Dosyalar", "Finish_recording": "Kaydı bitir", @@ -416,6 +418,7 @@ "Select_a_User": "Kullanıcı Seç", "Select_an_option": "Bir seçenek seçin", "Select_Server": "Sunucu seç", + "Select_Uploaded_Image": "Yüklenen resmi seçin", "Select_Users": "Kullanıcıları seç", "Send": "Yolla", "Send_audio_message": "Sesli ileti gönder", diff --git a/app/i18n/locales/zh-CN.json b/app/i18n/locales/zh-CN.json index 462ec04664..99fcf89b1c 100644 --- a/app/i18n/locales/zh-CN.json +++ b/app/i18n/locales/zh-CN.json @@ -35,6 +35,7 @@ "Auto_Translate": "自动翻译", "Automatic": "自动", "Avatar_changed_successfully": "头像更新成功!", + "Avatar_Photo": "{{username}} 头像", "Avatar_Url": "头像地址", "Away": "离开", "Black": "黑色", @@ -166,6 +167,7 @@ "Everyone_can_access_this_channel": "每个人都可以访问此频道", "Expiration_Days": "到期 (日)", "Favorites": "收藏", + "Fetch_image_from_URL": "从URL获取图片", "File_description": "文件描述", "Files": "文件", "Finish_recording": "完成录制", @@ -397,6 +399,7 @@ "Select_a_User": "选择一个用戶", "Select_an_option": "选择一个选项", "Select_Server": "选择服务器", + "Select_Uploaded_Image": "选择上传的图片", "Select_Users": "选择用户", "Send": "发送", "Send_audio_message": "发送音频信息", diff --git a/app/i18n/locales/zh-TW.json b/app/i18n/locales/zh-TW.json index 489eb00b37..4d6b0acd8c 100644 --- a/app/i18n/locales/zh-TW.json +++ b/app/i18n/locales/zh-TW.json @@ -35,6 +35,7 @@ "Auto_Translate": "自動翻譯", "Automatic": "自動", "Avatar_changed_successfully": "大頭貼更新成功!", + "Avatar_Photo": "{{username}} 頭像", "Avatar_Url": "大頭貼地址", "Away": "離開", "Black": "黑色", @@ -174,6 +175,7 @@ "Everyone_can_access_this_team": "所有人皆可存取此團隊", "Expiration_Days": "到期 (日)", "Favorites": "我的最愛", + "Fetch_image_from_URL": "從URL獲取圖片", "File_description": "檔案描述", "Files": "檔案", "Finish_recording": "完成錄製", @@ -415,6 +417,7 @@ "Select_a_User": "選擇一個使用者", "Select_an_option": "選擇一個選項", "Select_Server": "選擇伺服器", + "Select_Uploaded_Image": "選擇上傳的圖片", "Select_Users": "選擇使用者", "Send": "發送", "Send_audio_message": "發送語音訊息", diff --git a/app/views/ChangeAvatarView/AvatarSuggestionItem.tsx b/app/views/ChangeAvatarView/AvatarSuggestionItem.tsx index 1336eb5c44..9e9485b450 100644 --- a/app/views/ChangeAvatarView/AvatarSuggestionItem.tsx +++ b/app/views/ChangeAvatarView/AvatarSuggestionItem.tsx @@ -4,6 +4,7 @@ import { View, StyleSheet } from 'react-native'; import { IAvatar } from '../../definitions'; import Avatar from '../../containers/Avatar'; import { useTheme } from '../../theme'; +import i18n from '../../i18n'; const styles = StyleSheet.create({ container: { @@ -12,7 +13,7 @@ const styles = StyleSheet.create({ alignItems: 'center', justifyContent: 'center', marginRight: 20, - marginBottom: 12, + borderRadius: 4 } }); @@ -32,7 +33,13 @@ const AvatarSuggestionItem = ({ return ( - onPress(item)} /> + onPress(item)} + /> ); }; diff --git a/app/views/ChangeAvatarView/AvatarUrl.tsx b/app/views/ChangeAvatarView/AvatarUrl.tsx deleted file mode 100644 index dae1d34a66..0000000000 --- a/app/views/ChangeAvatarView/AvatarUrl.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import React from 'react'; - -import I18n from '../../i18n'; -import { FormTextInput } from '../../containers/TextInput'; -import { useDebounce, isImageURL } from '../../lib/methods/helpers'; - -const AvatarUrl = ({ submit }: { submit: (value: string) => void }) => { - const handleChangeText = useDebounce(async (value: string) => { - if (value) { - const result = await isImageURL(value); - if (result) { - return submit(value); - } - return submit(''); - } - }, 500); - - return ( - - ); -}; - -export default AvatarUrl; diff --git a/app/views/ChangeAvatarView/index.tsx b/app/views/ChangeAvatarView/index.tsx index 64ff03100f..cb7e6077e9 100644 --- a/app/views/ChangeAvatarView/index.tsx +++ b/app/views/ChangeAvatarView/index.tsx @@ -18,7 +18,6 @@ import { useAppSelector } from '../../lib/hooks'; import { getUserSelector } from '../../selectors/login'; import Avatar from '../../containers/Avatar'; import AvatarPresentational from '../../containers/Avatar/Avatar'; -import AvatarUrl from './AvatarUrl'; import Button from '../../containers/Button'; import I18n from '../../i18n'; import { ChatsStackParamList } from '../../stacks/types'; @@ -27,6 +26,8 @@ import AvatarSuggestion from './AvatarSuggestion'; import log from '../../lib/methods/helpers/log'; import { changeRoomsAvatar, changeUserAvatar, resetUserAvatar } from './submitServices'; import ImagePicker, { Image } from '../../lib/methods/helpers/ImagePicker/ImagePicker'; +import { isImageURL, useDebounce } from '../../lib/methods/helpers'; +import { FormTextInput } from '../../containers/TextInput'; enum AvatarStateActions { CHANGE_AVATAR = 'CHANGE_AVATAR', @@ -64,6 +65,7 @@ function reducer(state: IState, action: IReducerAction) { const ChangeAvatarView = () => { const [state, dispatch] = useReducer(reducer, initialState); + const [rawImageUrl, setRawImageUrl] = useState(''); const [saving, setSaving] = useState(false); const { colors } = useTheme(); const { userId, username, server } = useAppSelector( @@ -116,6 +118,29 @@ const ChangeAvatarView = () => { dispatch(action); }; + const onChangeText = useDebounce(async (value: string) => { + const result = await isImageURL(rawImageUrl); + + if (!result || !value) { + dispatchAvatar({ + type: AvatarStateActions.RESET_USER_AVATAR, + payload: { resetUserAvatar: `@${username}` } + }); + } + + setRawImageUrl(value); + }, 500); + + const fetchImageFromURL = async () => { + const result = await isImageURL(rawImageUrl); + if (result) { + dispatchAvatar({ + type: AvatarStateActions.CHANGE_AVATAR, + payload: { url: rawImageUrl, data: rawImageUrl, service: 'url' } + }); + } + }; + const submit = async () => { try { setSaving(true); @@ -172,7 +197,7 @@ const ChangeAvatarView = () => { @@ -197,15 +222,25 @@ const ChangeAvatarView = () => { )} {context === 'profile' ? ( - - dispatchAvatar({ - type: AvatarStateActions.CHANGE_AVATAR, - payload: { url: value, data: value, service: 'url' } - }) - } - /> + <> + +