From d571d911895b277e0807c2dd8141c17d193b3af6 Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Thu, 10 Jul 2025 15:13:50 -0300 Subject: [PATCH 01/13] feat: inline errors profileview --- app/i18n/locales/ar.json | 3 +++ app/i18n/locales/bn-IN.json | 3 +++ app/i18n/locales/cs.json | 3 +++ app/i18n/locales/de.json | 3 +++ app/i18n/locales/en.json | 3 +++ app/i18n/locales/es.json | 3 +++ app/i18n/locales/fi.json | 3 +++ app/i18n/locales/fr.json | 3 +++ app/i18n/locales/hi-IN.json | 3 +++ app/i18n/locales/hu.json | 3 +++ app/i18n/locales/it.json | 3 +++ app/i18n/locales/ja.json | 3 +++ app/i18n/locales/nl.json | 3 +++ app/i18n/locales/nn.json | 3 +++ app/i18n/locales/no.json | 3 +++ app/i18n/locales/pt-BR.json | 3 +++ app/i18n/locales/pt-PT.json | 3 +++ app/i18n/locales/ru.json | 3 +++ app/i18n/locales/sl-SI.json | 3 +++ app/i18n/locales/sv.json | 3 +++ app/i18n/locales/ta-IN.json | 3 +++ app/i18n/locales/te-IN.json | 3 +++ app/i18n/locales/tr.json | 3 +++ app/i18n/locales/zh-CN.json | 3 +++ app/i18n/locales/zh-TW.json | 3 +++ app/views/ProfileView/index.tsx | 11 +++++++---- 26 files changed, 82 insertions(+), 4 deletions(-) diff --git a/app/i18n/locales/ar.json b/app/i18n/locales/ar.json index 055b79730f1..a42a65887de 100644 --- a/app/i18n/locales/ar.json +++ b/app/i18n/locales/ar.json @@ -154,6 +154,7 @@ "Email": "بريد إلكتروني", "Email_Notification_Mode_All": "لكل إشارة أو رسالة مباشرة", "Email_Notification_Mode_Disabled": "معطل", + "Email_required": "البريد الإلكتروني مطلوب", "Emoji_selector": "محدد الرموز التعبيرية", "Enable_Auto_Translate": "تمكين الترجمة التلقائية", "Encrypted": "مشفر", @@ -320,6 +321,7 @@ "N_people_reacted": "{{n}} تفاعل الناس", "N_users": "{{n}} مستخدمين", "Name": "اسم", + "Name_required": "يتطلب الاسم", "Never": "أبداً", "New_Message": "رسالة جديدة", "New_Password": "كلمة مرور جديدة", @@ -555,6 +557,7 @@ "User_sent_an_attachment": "{{user}} أرسل مرفقًا", "Username": "اسم المستخدم", "Username_or_email": "اسم المستخدم أو البريد الالكتروني", + "Username_required": "اسم المستخدم مطلوب", "Users": "مستخدمين", "Uses_server_configuration": "يستخدم إعداد الخادم", "Verify_email_desc": "لقد أرسلنا إليك بريداً إلكترونياً لتأكيد تسجيلك. إذا لم تتلق البريد الإلكتروني قريباً، فيرجى العودة والمحاولة مرة أخرى", diff --git a/app/i18n/locales/bn-IN.json b/app/i18n/locales/bn-IN.json index 7fad5de73d4..49d9e36d2a9 100644 --- a/app/i18n/locales/bn-IN.json +++ b/app/i18n/locales/bn-IN.json @@ -252,6 +252,7 @@ "Email": "ইমেইল", "Email_Notification_Mode_All": "প্রতি উল্লেখ / ডিএম", "Email_Notification_Mode_Disabled": "অক্ষম", + "Email_required": "ইমেইল প্রয়োজন", "Emoji_selector": "ইমোজি নির্বাচনকারী", "Empty": "খালি", "Enable_Auto_Translate": "অটো-অনুবাদ সক্রিয় করুন", @@ -469,6 +470,7 @@ "N_Selected_members": "{{n}} জন নির্বাচিত", "N_users": "{{n}} ব্যবহারকারী", "Name": "নাম", + "Name_required": "নাম আবশ্যক", "Never": "কখনই নয়", "New_chat_transfer": "নতুন চ্যাট স্থানান্তর: {{agent}} চ্যাটটি কিউতে ফিরে এসেছে", "New_Message": "নতুন বার্তা", @@ -805,6 +807,7 @@ "User_sent_an_attachment": "{{user}} একটি সংযুক্তি পাঠিয়েছে", "Username": "ব্যবহারকারীর নাম", "Username_or_email": "ব্যবহারকারীর নাম বা ইমেল", + "Username_required": "ইউজারনেম প্রয়োজন", "Users": "ব্যবহারকারীগণ", "Uses_server_configuration": "ওয়ার্কস্পেস কনফিগারেশন ব্যবহার করে", "Verify_email_desc": "আমরা আপনার নিবন্ধন নিশ্চিত করতে একটি ইমেল পাঠিয়েছি। যদি আপনি শীঘ্রই একটি ইমেল পাননি, তবে দয়া করে ফিরে এসে আবার চেষ্টা করুন।", diff --git a/app/i18n/locales/cs.json b/app/i18n/locales/cs.json index 9da4eb826ed..4b48ddc3807 100644 --- a/app/i18n/locales/cs.json +++ b/app/i18n/locales/cs.json @@ -270,6 +270,7 @@ "Email": "E-mail", "Email_Notification_Mode_All": "Každá zmínka/DM", "Email_Notification_Mode_Disabled": "Zakázáno", + "Email_required": "Požadován e-mail.", "Emoji_selector": "Výběr emoji", "Empty": "Prázdný", "Enable_Auto_Translate": "Povolit automatický překlad", @@ -503,6 +504,7 @@ "N_Selected_members": "{{n}} vybráno", "N_users": "{{n}} uživatelů", "Name": "Název", + "Name_required": "Je vyžadováno jméno.", "Never": "Nikdy", "New_chat_transfer": "Nový přenos chatu: {{agent}} vrátil chat do fronty", "New_Message": "Nová zpráva", @@ -873,6 +875,7 @@ "User_sent_an_attachment": "{{user}} poslal přílohu", "Username": "Uživatelské jméno", "Username_or_email": "Uživatelské jméno nebo email", + "Username_required": "Je vyžadováno uživatelské jméno.", "Users": "Uživatelé", "Uses_server_configuration": "Používá konfiguraci pracovního prostoru", "Verify": "Ověřit", diff --git a/app/i18n/locales/de.json b/app/i18n/locales/de.json index 79a6507985a..92ce4a0a7bd 100644 --- a/app/i18n/locales/de.json +++ b/app/i18n/locales/de.json @@ -247,6 +247,7 @@ "Email": "E-Mail", "Email_Notification_Mode_All": "Jede Erwähnung/Direktnachricht", "Email_Notification_Mode_Disabled": "Deaktiviert", + "Email_required": "E-Mail erforderlich", "Emoji_selector": "Emoji-Auswahl", "Empty": "Leer", "Enable_Auto_Translate": "Automatische Übersetzung aktivieren", @@ -461,6 +462,7 @@ "N_Selected_members": "{{n}} ausgewählt", "N_users": "{{n}} Benutzer", "Name": "Name", + "Name_required": "Name erforderlich", "Never": "Niemals", "New_chat_transfer": "Neue Chat-Übertragung: {{agent}} hat den Chat an die Warteschlange zurückgegeben", "New_Message": "Neue Nachricht", @@ -799,6 +801,7 @@ "User_sent_an_attachment": "{{user}}: eine Datei gesendet", "Username": "Benutzername", "Username_or_email": "Benutzername oder E-Mail-Adresse", + "Username_required": "Benutzername erforderlich", "Users": "Benutzer", "Uses_server_configuration": "Nutzt Servereinstellungen", "Verify_email_desc": "Wir haben Ihnen eine Email geschickt um Ihre Anmeldung zu bestätigen. Wenn Sie keine Email erhalten, versuchen Sie es später noch einmal.", diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json index 27e13708111..1a4e4b49e4d 100644 --- a/app/i18n/locales/en.json +++ b/app/i18n/locales/en.json @@ -280,6 +280,7 @@ "Email": "Email", "Email_Notification_Mode_All": "Every mention/DM", "Email_Notification_Mode_Disabled": "Disabled", + "Email_required": "Email required", "Emoji_selector": "Emoji selector", "Empty": "Empty", "Enable": "Enable", @@ -526,6 +527,7 @@ "N_Selected_members": "{{n}} selected", "N_users": "{{n}} users", "Name": "Name", + "Name_required": "Name required", "Never": "Never", "New_chat_transfer": "New chat transfer: {{agent}} returned the chat to the queue", "New_Message": "New message", @@ -903,6 +905,7 @@ "User_sent_an_attachment": "{{user}} sent an attachment", "Username": "Username", "Username_or_email": "Username or email", + "Username_required": "Username required", "Users": "Users", "Uses_server_configuration": "Uses workspace configuration", "Verify": "Verify", diff --git a/app/i18n/locales/es.json b/app/i18n/locales/es.json index eb42790f5da..da1b89a1862 100644 --- a/app/i18n/locales/es.json +++ b/app/i18n/locales/es.json @@ -119,6 +119,7 @@ "Edit_Avatar": "Editar avatar", "Edit_Room_Photo": "Editar Foto de la sala", "Email": "E-mail", + "Email_required": "Correo electrónico obligatorio", "Emoji_selector": "Selector de emojis", "Enable_Auto_Translate": "Permitir Auto-Translate", "Encryption_error_desc": "No fue posible descifrar tu clave de cifrado.", @@ -217,6 +218,7 @@ "N_people_reacted": "Han reaccionado {{n}} personas", "N_users": "{{n}} usuarios", "Name": "Nombre", + "Name_required": "Nombre requerido", "New_Message": "Nuevo mensaje", "New_Password": "Nueva contraseña", "Next": "Siguiente", @@ -388,6 +390,7 @@ "User_sent_an_attachment": "{{user}} envío un adjunto", "Username": "Nombre de usuario", "Username_or_email": "Nombre de usuario o email", + "Username_required": "Nombre de usuario requerido", "Users": "Usuarios", "Version_no": "Versión de la aplicación: {{version}}", "View_Original": "Ver original", diff --git a/app/i18n/locales/fi.json b/app/i18n/locales/fi.json index 01faa118945..00aaf83122b 100644 --- a/app/i18n/locales/fi.json +++ b/app/i18n/locales/fi.json @@ -232,6 +232,7 @@ "Email": "Sähköposti", "Email_Notification_Mode_All": "Jokainen maininta/SV", "Email_Notification_Mode_Disabled": "Ei käytössä", + "Email_required": "Sähköposti vaaditaan", "Emoji_selector": "Emojin valitsin", "Empty": "Tyhjä", "Enable_Auto_Translate": "Ota käyttöön automaattikäännös", @@ -442,6 +443,7 @@ "N_Selected_members": "{{n}} valittu", "N_users": "{{n}} käyttäjää", "Name": "Nimi", + "Name_required": "Nimi vaaditaan", "Never": "Ei koskaan", "New_chat_transfer": "Uuden keskustelun siirto: {{agent}} palautti keskustelun jonoon", "New_Message": "Uusi viesti", @@ -773,6 +775,7 @@ "User_sent_an_attachment": "{{user}} lähetti liitteen", "Username": "Käyttäjätunnus", "Username_or_email": "Sähköpostiosoite tai käyttäjätunnus", + "Username_required": "Käyttäjänimi vaaditaan", "Users": "Käyttäjät", "Uses_server_configuration": "Käyttää palvelimen määrityksiä", "Verify_email_desc": "Lähetimme rekisteröitymisvahvistuksen sähköpostiisi. Jos et saa sähköpostia pian, yritä uudelleen.", diff --git a/app/i18n/locales/fr.json b/app/i18n/locales/fr.json index eec019bd798..ede48fe5ac7 100644 --- a/app/i18n/locales/fr.json +++ b/app/i18n/locales/fr.json @@ -200,6 +200,7 @@ "Email": "Courriel", "Email_Notification_Mode_All": "Chaque mention/MD", "Email_Notification_Mode_Disabled": "Désactivé", + "Email_required": "Adresse e-mail requise", "Emoji_selector": "Sélecteur d'émojis", "Empty": "Vide", "Enable_Auto_Translate": "Activer la traduction automatique", @@ -403,6 +404,7 @@ "N_people_reacted": "{{n}} personnes ont réagi", "N_users": "{{n}} utilisateurs", "Name": "Nom", + "Name_required": "Nom requis", "Never": "Jamais", "New_chat_transfer": "Nouveau transfert de chat : {{agent}} a renvoyé le chat dans la file d'attente", "New_Message": "Nouveau message", @@ -695,6 +697,7 @@ "User_sent_an_attachment": "{{user}} a envoyé une pièce jointe", "Username": "Nom d'utilisateur", "Username_or_email": "Nom d'utilisateur ou e-mail", + "Username_required": "Nom d'utilisateur requis", "Users": "Utilisateurs", "Uses_server_configuration": "Utilise la configuration du serveur", "Verify_email_desc": "Nous vous avons envoyé un e-mail pour confirmer votre inscription. Si vous ne recevez pas d'e-mail sous peu, veuillez revenir et réessayer.", diff --git a/app/i18n/locales/hi-IN.json b/app/i18n/locales/hi-IN.json index 210d1cc9e17..4572963d30b 100644 --- a/app/i18n/locales/hi-IN.json +++ b/app/i18n/locales/hi-IN.json @@ -252,6 +252,7 @@ "Email": "ईमेल", "Email_Notification_Mode_All": "हर मेंशन/डीएम", "Email_Notification_Mode_Disabled": "अक्षम", + "Email_required": "ईमेल आवश्यक है।", "Emoji_selector": "इमोजी चयनकर्ता", "Empty": "खाली", "Enable_Auto_Translate": "स्वच्छता से अनुवाद सक्षम करें", @@ -469,6 +470,7 @@ "N_Selected_members": "{{n}} चयनित सदस्य", "N_users": "{{n}} उपयोगकर्ता", "Name": "नाम", + "Name_required": "नाम आवश्यक है।", "Never": "कभी नहीं", "New_chat_transfer": "नई चैट ट्रांसफर: {{agent}} ने चैट को कतार में वापस लौटाया", "New_Message": "नया संदेश", @@ -805,6 +807,7 @@ "User_sent_an_attachment": "{{user}} ने एक अटैचमेंट भेजा", "Username": "उपयोगकर्ता नाम", "Username_or_email": "उपयोगकर्ता नाम या ईमेल", + "Username_required": "उपयोगकर्ता नाम आवश्यक है।", "Users": "उपयोगकर्ताएँ", "Uses_server_configuration": "कार्यस्थान समरूपण का उपयोग करता है", "Verify_email_desc": "हमने आपको आपके पंजीकरण की पुष्टि के लिए एक ईमेल भेजा है। यदि आपको शीघ्र एक ईमेल प्राप्त नहीं होता है, तो कृपया वापस आकर पुनः प्रयास करें।", diff --git a/app/i18n/locales/hu.json b/app/i18n/locales/hu.json index 8a2da545501..0b58dc21845 100644 --- a/app/i18n/locales/hu.json +++ b/app/i18n/locales/hu.json @@ -252,6 +252,7 @@ "Email": "E-mail", "Email_Notification_Mode_All": "Minden említés/DM ", "Email_Notification_Mode_Disabled": "Letiltva", + "Email_required": "E-mail szükséges", "Emoji_selector": "Emoji kiválasztó", "Empty": "Üres", "Enable_Auto_Translate": "Automatikus fordítás engedélyezése", @@ -470,6 +471,7 @@ "N_Selected_members": "{{n}} kiválasztva", "N_users": "{{n}} felhasználó", "Name": "Név", + "Name_required": "Név szükséges", "Never": "Soha", "New_chat_transfer": "Új csevegés átadása: {{agent}} visszaadta a csevegést a várólistának", "New_Message": "Új üzenet", @@ -807,6 +809,7 @@ "User_sent_an_attachment": "{{user}} mellékletet küldött", "Username": "Felhasználónév", "Username_or_email": "Felhasználónév vagy E-mail-cím ", + "Username_required": "Felhasználónév szükséges", "Users": "Felhasználók", "Uses_server_configuration": "Használja a munkaterület konfigurációját", "Verify_email_desc": "Küldtünk Önnek egy e-mailt a regisztrációja megerősítéséhez. Ha nem kap rövidesen e-mailt, akkor térjen vissza, és próbálja meg újra.", diff --git a/app/i18n/locales/it.json b/app/i18n/locales/it.json index 5324eaa68c7..72cc28d727d 100644 --- a/app/i18n/locales/it.json +++ b/app/i18n/locales/it.json @@ -178,6 +178,7 @@ "Email": "Email", "Email_Notification_Mode_All": "Ogni Menzione/Messaggio Privato", "Email_Notification_Mode_Disabled": "Disabilitato", + "Email_required": "Email obbligatorio", "Emoji_selector": "Selettore di emoji", "Enable_Auto_Translate": "Abilita traduzione automatica", "Encrypted": "Crittografato", @@ -351,6 +352,7 @@ "N_people_reacted": "{{n}} persone hanno reagito", "N_users": "{{n}} utenti", "Name": "Nome", + "Name_required": "Nome richiesto", "Never": "Mai", "New_Message": "Nuovo messaggio", "New_Password": "Nuova password", @@ -602,6 +604,7 @@ "User_sent_an_attachment": "{{user}} ha inviato un allegato", "Username": "Username", "Username_or_email": "Username o email", + "Username_required": "Nome utente richiesto", "Users": "Utenti", "Uses_server_configuration": "Usa la configurazione del server", "Verify_email_desc": "Ti abbiamo inviato una e-mail per confermare la tua registrazione. Se non la ricevi, ritorna qui e riprova", diff --git a/app/i18n/locales/ja.json b/app/i18n/locales/ja.json index 402869d7130..48449ba2a30 100644 --- a/app/i18n/locales/ja.json +++ b/app/i18n/locales/ja.json @@ -153,6 +153,7 @@ "Email": "メール", "Email_Notification_Mode_All": "すべてのメンション/DM", "Email_Notification_Mode_Disabled": "無効", + "Email_required": "メールアドレスが必要です。", "Emoji_selector": "絵文字セレクター", "Enable_Auto_Translate": "自動翻訳を有効にする", "Encrypted": "暗号化済み", @@ -300,6 +301,7 @@ "N_people_reacted": "{{n}}人がリアクションしました", "N_users": "{{n}}人", "Name": "名前", + "Name_required": "名前が必要です。", "Never": "ずっと受け取らない", "New_Message": "メッセージ", "New_Password": "新しいパスワード", @@ -486,6 +488,7 @@ "User_sent_an_attachment": "{{user}}は添付ファイルを送信しました", "Username": "ユーザー名", "Username_or_email": "ユーザー名かメールアドレス", + "Username_required": "ユーザー名が必要です", "Users": "ユーザー", "Uses_server_configuration": "サーバー構成を使用する", "Version_no": "アプリバージョン: {{version}}", diff --git a/app/i18n/locales/nl.json b/app/i18n/locales/nl.json index 9c13f75518a..f2eeea4d1ba 100644 --- a/app/i18n/locales/nl.json +++ b/app/i18n/locales/nl.json @@ -200,6 +200,7 @@ "Email": "E-mail", "Email_Notification_Mode_All": "Elke vermelding/DM", "Email_Notification_Mode_Disabled": "Uitgeschakeld", + "Email_required": "E-mail vereist", "Emoji_selector": "Emoji-selector", "Empty": "Leeg", "Enable_Auto_Translate": "Automatisch vertalen inschakelen", @@ -403,6 +404,7 @@ "N_people_reacted": "{{n}} mensen hebben gereageerd", "N_users": "{{n}} gebruikers", "Name": "Naam", + "Name_required": "Naam vereist", "Never": "Nooit", "New_chat_transfer": "Nieuwe chatoverdracht: {{agent}} heeft de chat terug in de wachtrij gezet", "New_Message": "Nieuw bericht", @@ -695,6 +697,7 @@ "User_sent_an_attachment": "{{user}} stuurde een bijlage", "Username": "Gebruikersnaam", "Username_or_email": "Gebruikersnaam of e-mail", + "Username_required": "Gebruikersnaam vereist", "Users": "Gebruikers", "Uses_server_configuration": "Gebruikt serverconfiguratie", "Verify_email_desc": "We hebben je een e-mail gestuurd om je inschrijving te bevestigen. Als je binnenkort geen e-mail ontvangt, gelieve terug te komen en het opnieuw te proberen.", diff --git a/app/i18n/locales/nn.json b/app/i18n/locales/nn.json index 9c28a6a9745..295c1c3c2b9 100644 --- a/app/i18n/locales/nn.json +++ b/app/i18n/locales/nn.json @@ -114,6 +114,7 @@ "email": "E-post", "Email": "E-post", "Email_Notification_Mode_Disabled": "Funksjonshemmet", + "Email_required": "E-post nødvendig", "Enable": "Aktiver", "Enable_encryption_description": "Sørg for at samtaler holdes private", "Enable_encryption_title": "Aktiver kryptering", @@ -209,6 +210,7 @@ "Mute_someone_in_room": "Stum på noen i rommet", "N_users": "{{value}} brukere", "Name": "Navn", + "Name_required": "Namn påkrevd", "Never": "Aldri", "Next": "Neste", "Nickname": "Kallenavn", @@ -348,6 +350,7 @@ "User_not_found_or": "Bruker ikke funnet eller feil passord", "User_sent_an_attachment": "{{user}} sendte et vedlegg", "Username": "Brukernavn", + "Username_required": "Brukarnamn påkrevd", "Users": "brukere", "Verify": "Bekreft", "Verify_email_desc": "Vi har sendt deg en e-post for å bekrefte din registrering. Hvis du ikke mottar en epost, vennligst kom tilbake og prøv igjen.", diff --git a/app/i18n/locales/no.json b/app/i18n/locales/no.json index 2659aaf074e..d26c712c785 100644 --- a/app/i18n/locales/no.json +++ b/app/i18n/locales/no.json @@ -269,6 +269,7 @@ "Email": "E-post", "Email_Notification_Mode_All": "Hver omtale/DM", "Email_Notification_Mode_Disabled": "deaktivert", + "Email_required": "E-postadresse påkrevd", "Empty": "Tømme", "Enable": "Aktiver", "Enable_Auto_Translate": "Aktiver automatisk oversettelse", @@ -498,6 +499,7 @@ "N_Selected_members": "{{n}} valgt", "N_users": "{{n}} brukere", "Name": "Navn", + "Name_required": "Navn påkrevd", "Never": "Aldri", "New_chat_transfer": "Ny chatoverføring: {{agent}} sendte chatten tilbake til køen", "New_Message": "Ny melding", @@ -855,6 +857,7 @@ "User_sent_an_attachment": "{{user}} sendte et vedlegg", "Username": "Brukernavn", "Username_or_email": "Brukernavn eller e-post", + "Username_required": "Brukernavn påkrevd", "Users": "Brukere", "Uses_server_configuration": "Bruker arbeidsområdekonfigurasjon", "Verify": "Verifisere", diff --git a/app/i18n/locales/pt-BR.json b/app/i18n/locales/pt-BR.json index 3b136e68668..f885ce2d39b 100644 --- a/app/i18n/locales/pt-BR.json +++ b/app/i18n/locales/pt-BR.json @@ -274,6 +274,7 @@ "Email": "E-mail", "Email_Notification_Mode_All": "Toda menção / mensagem direta", "Email_Notification_Mode_Disabled": "Desativado", + "Email_required": "E-mail obrigatório", "Emoji_selector": "Seletor de emojis", "Empty": "Vazio", "Enable": "Habilitar", @@ -514,6 +515,7 @@ "N_Selected_members": "{{n}} selecionados", "N_users": "{{n}} usuários", "Name": "Nome", + "Name_required": "Nome obrigatório", "Never": "Nunca", "New_chat_transfer": "Nova transferência de conversa: {{agent}} retornou conversa para a fila", "New_Message": "Nova mensagem", @@ -884,6 +886,7 @@ "User_sent_an_attachment": "{{user}} enviou um anexo", "Username": "Usuário", "Username_or_email": "Usuário ou email", + "Username_required": "Nome de usuário obrigatório", "Users": "Usuários", "Uses_server_configuration": "Usar configuração da workspace", "Verify": "Verificar", diff --git a/app/i18n/locales/pt-PT.json b/app/i18n/locales/pt-PT.json index 1e3fd47796b..37319539638 100644 --- a/app/i18n/locales/pt-PT.json +++ b/app/i18n/locales/pt-PT.json @@ -149,6 +149,7 @@ "Email": "Correio eletrónico", "Email_Notification_Mode_All": "Cada Menção/DM", "Email_Notification_Mode_Disabled": "Desactivado", + "Email_required": "Email obrigatório", "Emoji_selector": "Seletor de emojis", "Enable_Auto_Translate": "Activar Auto-Tradução", "Encrypted": "Encriptado", @@ -298,6 +299,7 @@ "N_people_reacted": "{{n}} pessoas reagiram", "N_users": "{{n}} utilizadores", "Name": "Nome", + "Name_required": "Nome obrigatório", "Never": "Nunca", "New_Message": "Nova Mensagem", "New_Password": "Nova Palavra-passe", @@ -462,6 +464,7 @@ "User_sent_an_attachment": "{{user}} enviou um ficheiro", "Username": "Nome de utilizador", "Username_or_email": "Nome de utilizador ou e-mail", + "Username_required": "Nome de utilizador necessário", "View_Thread": "Exibir thread", "Whats_the_password_for_your_certificate": "Qual é a senha para o seu certificado?", "Workspace_URL": "URL do espaço de trabalho", diff --git a/app/i18n/locales/ru.json b/app/i18n/locales/ru.json index c57b248da41..29a77d3d580 100644 --- a/app/i18n/locales/ru.json +++ b/app/i18n/locales/ru.json @@ -224,6 +224,7 @@ "Email": "электронная почта", "Email_Notification_Mode_All": "Каждое Упоминание/Личное сообщение", "Email_Notification_Mode_Disabled": "Отключено", + "Email_required": "Требуется электронная почта", "Emoji_selector": "Выбор emoji", "Empty": "Пусто", "Enable_Auto_Translate": "Включить автоперевод", @@ -432,6 +433,7 @@ "N_Selected_members": "{{n}} выбрано", "N_users": "{{n}} пользователи", "Name": "Имя", + "Name_required": "Требуется имя", "Never": "Никогда", "New_chat_transfer": "Пересылка нового чата: {{agent}} вернул чат в очередь", "New_Message": "Новое сообщение", @@ -741,6 +743,7 @@ "User_sent_an_attachment": "{{user}} отправил вложение", "Username": "Имя пользователя", "Username_or_email": "Имя пользователя или email", + "Username_required": "Требуется имя пользователя", "Users": "Пользователи", "Uses_server_configuration": "Используется конфигурация сервера", "Verify_email_desc": "Вам был отправлен email для подтверждения регистрации. Если вы не получили этого сообщения, пожалуйста, попробуйте еще раз.", diff --git a/app/i18n/locales/sl-SI.json b/app/i18n/locales/sl-SI.json index a165d907e40..80f12926f53 100644 --- a/app/i18n/locales/sl-SI.json +++ b/app/i18n/locales/sl-SI.json @@ -210,6 +210,7 @@ "Email": "E-pošta", "Email_Notification_Mode_All": "Vsaka omemba/neposredno sporočilo", "Email_Notification_Mode_Disabled": "Onemogočeno", + "Email_required": "E-pošta je obvezna", "Emoji_selector": "Izbirnik emojijev", "Empty": "Prazno", "Enable_Auto_Translate": "Omogoči samodejni prenos", @@ -415,6 +416,7 @@ "N_people_reacted": "{{n}} ljudi je reagiralo", "N_users": "{{n}} uporabniki", "Name": "Ime", + "Name_required": "Zahtevano ime.", "Never": "Nikoli", "New_chat_transfer": "Nov prenos klepeta: {{agent}} je klepet vrnil v čakalno vrsto", "New_Message": "Novo sporočilo", @@ -710,6 +712,7 @@ "User_sent_an_attachment": "{{user}} je poslal prilogo", "Username": "Uporabniško ime", "Username_or_email": "Uporabnisko ime ali e-posta", + "Username_required": "Zahtevano uporabniško ime", "Users": "Uporabniki", "Uses_server_configuration": "Uporablja konfiguracijo strežnika", "Verify_email_desc": "Poslali smo vam e -poštno sporočilo za potrditev vaše registracije. Če v kratkem ne prejmete e -pošte, se vrnite in poskusite znova.", diff --git a/app/i18n/locales/sv.json b/app/i18n/locales/sv.json index 25aa0533627..686df6e8a63 100644 --- a/app/i18n/locales/sv.json +++ b/app/i18n/locales/sv.json @@ -232,6 +232,7 @@ "Email": "E-post", "Email_Notification_Mode_All": "Varje omnämnande/direktmeddelande", "Email_Notification_Mode_Disabled": "Inaktiverat", + "Email_required": "E-post krävs", "Emoji_selector": "Emoji-väljare", "Empty": "Tom", "Enable_Auto_Translate": "Aktivera automatisk översättning", @@ -441,6 +442,7 @@ "N_Selected_members": "{{n}} har valts", "N_users": "{{n}} användare", "Name": "Namn", + "Name_required": "Namn krävs", "Never": "Aldrig", "New_chat_transfer": "Ny chattöverföring: {{agent}} återförde chatten till kön", "New_Message": "Nytt meddelande", @@ -771,6 +773,7 @@ "User_sent_an_attachment": "{{user}} skickade en bilaga", "Username": "Användarnamn", "Username_or_email": "Användarnamn eller e-postadress", + "Username_required": "Användarnamn krävs", "Users": "Användare", "Uses_server_configuration": "Använder serverkonfiguration", "Verify_email_desc": "Vi har skickat ett e-postmeddelande för att bekräfta din registrering. Om du inte får e-postmeddelandet försöker du igen.", diff --git a/app/i18n/locales/ta-IN.json b/app/i18n/locales/ta-IN.json index 7d6e146ca4a..c400af28de4 100644 --- a/app/i18n/locales/ta-IN.json +++ b/app/i18n/locales/ta-IN.json @@ -252,6 +252,7 @@ "Email": "மின்னஞ்சல்", "Email_Notification_Mode_All": "எல்லா குறிபாக / தனிப்பட்டது", "Email_Notification_Mode_Disabled": "முடக்கப்பட்டது", + "Email_required": "மின்னஞ்சல் தேவை", "Emoji_selector": "எமோஜி தேர்வாளர்", "Empty": "காலி", "Enable_Auto_Translate": "தானாக மொழிபெயர்க்க அனுமதிக்கவும்", @@ -469,6 +470,7 @@ "N_Selected_members": "{{n}} தேர்ந்தெடுக்கப்பட்டனர்", "N_users": "{{n}} பயனர்கள்", "Name": "பெயர்", + "Name_required": "பெயர் தேவையானது", "Never": "எப்போதும் இல்லை", "New_chat_transfer": "புதிய சந்திக்கை: {{agent}} சந்திக்கையை பின்னுக்கு செய்தார்", "New_Message": "புதிய செய்தி", @@ -805,6 +807,7 @@ "User_sent_an_attachment": "{{user}} ஒரு இணைப்பை அனுப்பினார்", "Username": "பயனர்பெயர்", "Username_or_email": "பயனர்பெயர் அல்லாத மின்னஞ்சல்", + "Username_required": "பயனர் பெயர் தேவை", "Users": "பயனர்கள்", "Uses_server_configuration": "பணியில் உள்ளேயே உபயோகிக்குகின்றது", "Verify_email_desc": "உங்களுக்கு உங்கள் பதிவுக்கு உறுதிப்படுத்த ஒரு மின்னஞ்சல் அனுப்பினோம். உங்களுக்கு விரைவில் ஒரு மின்னஞ்சல் பெறாதிருக்கின்றார்கள், தயவுசெய்து மீண்டும் வாருங்கள் மற்றும் முயற்சிக்கவும்.", diff --git a/app/i18n/locales/te-IN.json b/app/i18n/locales/te-IN.json index 35a103a65ed..af0e5c4d89f 100644 --- a/app/i18n/locales/te-IN.json +++ b/app/i18n/locales/te-IN.json @@ -251,6 +251,7 @@ "Email": "ईमेल", "Email_Notification_Mode_All": "ప్రతి ఉల్లేఖం / DM", "Email_Notification_Mode_Disabled": "అచ్చుకోవడం లేదు", + "Email_required": "ईमेल आवश्यक है।", "Emoji_selector": "इमोजी चयनकर्ता", "Empty": "ఖాళీ", "Enable_Auto_Translate": "స్వయం-అనువదించడం అనుమతించండి", @@ -468,6 +469,7 @@ "N_Selected_members": "{{n}} ఎంచుకోబడిన సభ్యులు", "N_users": "{{n}} వాడుకరు", "Name": "పేరు", + "Name_required": "नाम आवश्यक है।", "Never": "ఎప్పటికప్పుడు", "New_chat_transfer": "క్రొత్త చాట్ అంచనా: {{agent}} చాట్ను క్యూనుకు తిరిగి పంపించాడు", "New_Message": "కొత్త సందేశం", @@ -804,6 +806,7 @@ "User_sent_an_attachment": "{{user}} అనుకూలంగా పంపించింది", "Username": "వాడుకరి పేరు", "Username_or_email": "వాడుకరి పేరు లేదా ఇమెయిల్", + "Username_required": "यूज़रनेम आवश्यक है", "Users": "వాడుకరులు", "Uses_server_configuration": "పనితనం ఆకృతి ఉపయోగిస్తుంది", "Verify_email_desc": "మేము మీ నమోదుని ధ్యానంలోకి పెంపొందాం. మీరు తక్షణం ఒక ఇమెయిల్ పొందరాక, దయచేసి మళ్ళీ ప్రయత్నించండి.", diff --git a/app/i18n/locales/tr.json b/app/i18n/locales/tr.json index 60bd85bff1c..7d0b1b7df3e 100644 --- a/app/i18n/locales/tr.json +++ b/app/i18n/locales/tr.json @@ -167,6 +167,7 @@ "Email": "E-posta", "Email_Notification_Mode_All": "Tüm Bahsetmeler/Özel İletiler", "Email_Notification_Mode_Disabled": "Devre Dışı", + "Email_required": "E-posta gerekli", "Emoji_selector": "Emoji seçici", "Enable_Auto_Translate": "Otomatik Çeviriyi Etkinleştir", "Encrypted": "Şifreli", @@ -334,6 +335,7 @@ "N_people_reacted": "{{n}} kişi tepki verdi", "N_users": "{{n}} kullanıcı", "Name": "İsim", + "Name_required": "Ad gereklidir.", "Never": "Asla", "New_Message": "Yeni İleti", "New_Password": "Yeni Şifre", @@ -585,6 +587,7 @@ "User_sent_an_attachment": "{{user}} bir ek gönderdi", "Username": "Kullanıcı adı", "Username_or_email": "Kullanıcı adı ya da e-posta", + "Username_required": "Kullanıcı adı gerekli", "Users": "Kullanıcılar", "Uses_server_configuration": "Sunucu yapılandırmasını kullanır", "Verify_email_desc": "Kaydınızı onaylamak için size bir e-posta gönderdik. Kısa süre içinde bir e-posta almazsanız, lütfen geri gelin ve tekrar deneyin.", diff --git a/app/i18n/locales/zh-CN.json b/app/i18n/locales/zh-CN.json index 838d4a04cb9..b3706e304d0 100644 --- a/app/i18n/locales/zh-CN.json +++ b/app/i18n/locales/zh-CN.json @@ -163,6 +163,7 @@ "Email": "电子邮件", "Email_Notification_Mode_All": "每次被标记或私讯", "Email_Notification_Mode_Disabled": "禁用", + "Email_required": "需要电子邮件地址", "Emoji_selector": "表情符号选择器", "Enable_Auto_Translate": "开启自动翻译", "Encrypted": "已加密", @@ -317,6 +318,7 @@ "N_people_reacted": "{{n}} 人回复", "N_users": "{{n}} 位用户", "Name": "名称", + "Name_required": "名称必填", "Never": "从不", "New_Message": "新信息", "New_Password": "新密码", @@ -546,6 +548,7 @@ "User_sent_an_attachment": "{{user}} 寄送了一个附件", "Username": "用户名", "Username_or_email": "用户名或邮箱", + "Username_required": "需要用户名", "Users": "用戶", "Uses_server_configuration": "使用服务器设置", "Verify_email_desc": "我们已经送出一封电子邮件,以确认您的注册。如果您没有很快收到,请再试一次。", diff --git a/app/i18n/locales/zh-TW.json b/app/i18n/locales/zh-TW.json index 39e9909d138..5144bc52901 100644 --- a/app/i18n/locales/zh-TW.json +++ b/app/i18n/locales/zh-TW.json @@ -169,6 +169,7 @@ "Email": "電子郵件", "Email_Notification_Mode_All": "每次被標記或私訊", "Email_Notification_Mode_Disabled": "禁用", + "Email_required": "需要電子郵件地址", "Emoji_selector": "表情符號選擇器", "Enable_Auto_Translate": "開啟自動翻譯", "Encrypted": "已加密", @@ -334,6 +335,7 @@ "N_people_reacted": "{{n}} 人回复", "N_users": "{{n}} 位使用者", "Name": "名稱", + "Name_required": "名稱是必填項目", "Never": "從不", "New_Message": "新訊息", "New_Password": "新密碼", @@ -575,6 +577,7 @@ "User_sent_an_attachment": "{{user}} 寄送了一個附件", "Username": "使用者名稱", "Username_or_email": "使用者名稱或電子郵件", + "Username_required": "需要用戶名", "Users": "使用者", "Uses_server_configuration": "使用伺服器設定", "Verify_email_desc": "我們已經送出一封電子郵件,以確認您的註冊。如果您沒有很快收到,請再試一次。", diff --git a/app/views/ProfileView/index.tsx b/app/views/ProfileView/index.tsx index 4e34048dc6d..83a797787d9 100644 --- a/app/views/ProfileView/index.tsx +++ b/app/views/ProfileView/index.tsx @@ -46,9 +46,9 @@ import useVerifyPassword from '../../lib/hooks/useVerifyPassword'; const MAX_BIO_LENGTH = 260; const MAX_NICKNAME_LENGTH = 120; const validationSchema = yup.object().shape({ - name: yup.string().min(1).required(), - email: yup.string().email().required(), - username: yup.string().min(1).required() + name: yup.string().min(1).required(I18n.t('name_required')), + email: yup.string().email().required(I18n.t('email_required')), + username: yup.string().min(1).required(I18n.t('username_required')) }); interface IProfileViewProps { @@ -88,7 +88,7 @@ const ProfileView = ({ navigation }: IProfileViewProps): React.ReactElement => { getValues, setValue, watch, - formState: { isDirty, dirtyFields } + formState: { isDirty, dirtyFields, errors } } = useForm({ mode: 'onChange', defaultValues: { @@ -298,6 +298,7 @@ const ProfileView = ({ navigation }: IProfileViewProps): React.ReactElement => { }} containerStyle={styles.inputContainer} testID='profile-view-name' + error={errors.name?.message} /> { }} containerStyle={styles.inputContainer} testID='profile-view-username' + error={errors.username?.message} /> { autoComplete='email' textContentType='emailAddress' importantForAutofill={'yes'} + error={errors.email?.message} /> {compareServerVersion(serverVersion, 'greaterThanOrEqualTo', '3.5.0') ? ( Date: Thu, 10 Jul 2025 15:35:08 -0300 Subject: [PATCH 02/13] feat: a11y error announcement --- app/i18n/locales/ar.json | 2 ++ app/i18n/locales/bn-IN.json | 2 ++ app/i18n/locales/cs.json | 2 ++ app/i18n/locales/de.json | 2 ++ app/i18n/locales/en.json | 2 ++ app/i18n/locales/es.json | 2 ++ app/i18n/locales/fi.json | 2 ++ app/i18n/locales/fr.json | 2 ++ app/i18n/locales/hi-IN.json | 2 ++ app/i18n/locales/hu.json | 2 ++ app/i18n/locales/it.json | 2 ++ app/i18n/locales/ja.json | 2 ++ app/i18n/locales/nl.json | 2 ++ app/i18n/locales/nn.json | 2 ++ app/i18n/locales/no.json | 2 ++ app/i18n/locales/pt-BR.json | 2 ++ app/i18n/locales/pt-PT.json | 2 ++ app/i18n/locales/ru.json | 2 ++ app/i18n/locales/sl-SI.json | 2 ++ app/i18n/locales/sv.json | 2 ++ app/i18n/locales/ta-IN.json | 2 ++ app/i18n/locales/te-IN.json | 2 ++ app/i18n/locales/tr.json | 2 ++ app/i18n/locales/zh-CN.json | 2 ++ app/i18n/locales/zh-TW.json | 2 ++ app/lib/hooks/useA11yErrorAnnouncement.tsx | 31 ++++++++++++++++++++++ app/views/ProfileView/index.tsx | 14 ++++++++++ 27 files changed, 95 insertions(+) create mode 100644 app/lib/hooks/useA11yErrorAnnouncement.tsx diff --git a/app/i18n/locales/ar.json b/app/i18n/locales/ar.json index a42a65887de..dbea16bc1b3 100644 --- a/app/i18n/locales/ar.json +++ b/app/i18n/locales/ar.json @@ -152,6 +152,7 @@ "Edit_Room_Photo": "تحرير صورة غرفة", "Edit_Status": "تعديل الحالة", "Email": "بريد إلكتروني", + "Email_associated_with_another_user": "البريد الإلكتروني مرتبط بمستخدم آخر.", "Email_Notification_Mode_All": "لكل إشارة أو رسالة مباشرة", "Email_Notification_Mode_Disabled": "معطل", "Email_required": "البريد الإلكتروني مطلوب", @@ -556,6 +557,7 @@ "User_Info": "معلومات المستخدم", "User_sent_an_attachment": "{{user}} أرسل مرفقًا", "Username": "اسم المستخدم", + "Username_not_available": "اسم المستخدم غير متاح", "Username_or_email": "اسم المستخدم أو البريد الالكتروني", "Username_required": "اسم المستخدم مطلوب", "Users": "مستخدمين", diff --git a/app/i18n/locales/bn-IN.json b/app/i18n/locales/bn-IN.json index 49d9e36d2a9..cd5c2cd57e1 100644 --- a/app/i18n/locales/bn-IN.json +++ b/app/i18n/locales/bn-IN.json @@ -250,6 +250,7 @@ "Edit_Room_Photo": "ঘরের ছবি সম্পাদনা করুন", "Edit_Status": "স্থিতি সম্পাদনা করুন", "Email": "ইমেইল", + "Email_associated_with_another_user": "অন্য ব্যবহারকারীর সঙ্গে সংশ্লিষ্ট ইমেইল", "Email_Notification_Mode_All": "প্রতি উল্লেখ / ডিএম", "Email_Notification_Mode_Disabled": "অক্ষম", "Email_required": "ইমেইল প্রয়োজন", @@ -806,6 +807,7 @@ "User_left_this_channel": "চ্যানেল ছেড়ে দিয়েছে", "User_sent_an_attachment": "{{user}} একটি সংযুক্তি পাঠিয়েছে", "Username": "ব্যবহারকারীর নাম", + "Username_not_available": "ব্যবহারকারীর নাম পাওয়া যাচ্ছে না", "Username_or_email": "ব্যবহারকারীর নাম বা ইমেল", "Username_required": "ইউজারনেম প্রয়োজন", "Users": "ব্যবহারকারীগণ", diff --git a/app/i18n/locales/cs.json b/app/i18n/locales/cs.json index 4b48ddc3807..c353a84b18e 100644 --- a/app/i18n/locales/cs.json +++ b/app/i18n/locales/cs.json @@ -268,6 +268,7 @@ "Edit_Room_Photo": "Upravit fotografii místnosti", "Edit_Status": "Upravit stav", "Email": "E-mail", + "Email_associated_with_another_user": "E-mail je přiřazen k jinému uživateli.", "Email_Notification_Mode_All": "Každá zmínka/DM", "Email_Notification_Mode_Disabled": "Zakázáno", "Email_required": "Požadován e-mail.", @@ -874,6 +875,7 @@ "User_not_found_or": "Uživatel nenalezen nebo nesprávné heslo", "User_sent_an_attachment": "{{user}} poslal přílohu", "Username": "Uživatelské jméno", + "Username_not_available": "Uživatelské jméno není k dispozici.", "Username_or_email": "Uživatelské jméno nebo email", "Username_required": "Je vyžadováno uživatelské jméno.", "Users": "Uživatelé", diff --git a/app/i18n/locales/de.json b/app/i18n/locales/de.json index 92ce4a0a7bd..a4e7957829f 100644 --- a/app/i18n/locales/de.json +++ b/app/i18n/locales/de.json @@ -245,6 +245,7 @@ "Edit_Room_Photo": "Zimmerfoto bearbeiten", "Edit_Status": "Status ändern", "Email": "E-Mail", + "Email_associated_with_another_user": "E-Mail mit einem anderen Benutzer verknüpft.", "Email_Notification_Mode_All": "Jede Erwähnung/Direktnachricht", "Email_Notification_Mode_Disabled": "Deaktiviert", "Email_required": "E-Mail erforderlich", @@ -800,6 +801,7 @@ "User_left_this_channel": "hat den Kanal verlassen", "User_sent_an_attachment": "{{user}}: eine Datei gesendet", "Username": "Benutzername", + "Username_not_available": "Benutzername nicht verfügbar", "Username_or_email": "Benutzername oder E-Mail-Adresse", "Username_required": "Benutzername erforderlich", "Users": "Benutzer", diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json index 1a4e4b49e4d..90457f91f76 100644 --- a/app/i18n/locales/en.json +++ b/app/i18n/locales/en.json @@ -278,6 +278,7 @@ "Edit_Status": "Edit status", "email": "Email", "Email": "Email", + "Email_associated_with_another_user": "Email associated with another user", "Email_Notification_Mode_All": "Every mention/DM", "Email_Notification_Mode_Disabled": "Disabled", "Email_required": "Email required", @@ -904,6 +905,7 @@ "User_not_found_or": "User not found or incorrect password", "User_sent_an_attachment": "{{user}} sent an attachment", "Username": "Username", + "Username_not_available": "Username not available", "Username_or_email": "Username or email", "Username_required": "Username required", "Users": "Users", diff --git a/app/i18n/locales/es.json b/app/i18n/locales/es.json index da1b89a1862..56876ea7113 100644 --- a/app/i18n/locales/es.json +++ b/app/i18n/locales/es.json @@ -119,6 +119,7 @@ "Edit_Avatar": "Editar avatar", "Edit_Room_Photo": "Editar Foto de la sala", "Email": "E-mail", + "Email_associated_with_another_user": "Correo electrónico asociado con otro usuario.", "Email_required": "Correo electrónico obligatorio", "Emoji_selector": "Selector de emojis", "Enable_Auto_Translate": "Permitir Auto-Translate", @@ -389,6 +390,7 @@ "User_has_been_key": "El usuario ha sido {{key}}", "User_sent_an_attachment": "{{user}} envío un adjunto", "Username": "Nombre de usuario", + "Username_not_available": "Nombre de usuario no disponible", "Username_or_email": "Nombre de usuario o email", "Username_required": "Nombre de usuario requerido", "Users": "Usuarios", diff --git a/app/i18n/locales/fi.json b/app/i18n/locales/fi.json index 00aaf83122b..e6a7d9ef3e3 100644 --- a/app/i18n/locales/fi.json +++ b/app/i18n/locales/fi.json @@ -230,6 +230,7 @@ "Edit_Room_Photo": "Muokkaa huonekuvaa", "Edit_Status": "Muokkaa tilaa", "Email": "Sähköposti", + "Email_associated_with_another_user": "Sähköposti on liitetty toiseen käyttäjään.", "Email_Notification_Mode_All": "Jokainen maininta/SV", "Email_Notification_Mode_Disabled": "Ei käytössä", "Email_required": "Sähköposti vaaditaan", @@ -774,6 +775,7 @@ "User_left_this_channel": "poistui kanavalta", "User_sent_an_attachment": "{{user}} lähetti liitteen", "Username": "Käyttäjätunnus", + "Username_not_available": "Käyttäjänimi ei ole saatavilla", "Username_or_email": "Sähköpostiosoite tai käyttäjätunnus", "Username_required": "Käyttäjänimi vaaditaan", "Users": "Käyttäjät", diff --git a/app/i18n/locales/fr.json b/app/i18n/locales/fr.json index ede48fe5ac7..91a73180d9a 100644 --- a/app/i18n/locales/fr.json +++ b/app/i18n/locales/fr.json @@ -198,6 +198,7 @@ "Edit_Room_Photo": "Modifier la salle Photo", "Edit_Status": "Modifier le statut", "Email": "Courriel", + "Email_associated_with_another_user": "E-mail associé à un autre utilisateur", "Email_Notification_Mode_All": "Chaque mention/MD", "Email_Notification_Mode_Disabled": "Désactivé", "Email_required": "Adresse e-mail requise", @@ -696,6 +697,7 @@ "User_Info": "Info d'utilisateur", "User_sent_an_attachment": "{{user}} a envoyé une pièce jointe", "Username": "Nom d'utilisateur", + "Username_not_available": "Nom d'utilisateur non disponible", "Username_or_email": "Nom d'utilisateur ou e-mail", "Username_required": "Nom d'utilisateur requis", "Users": "Utilisateurs", diff --git a/app/i18n/locales/hi-IN.json b/app/i18n/locales/hi-IN.json index 4572963d30b..f1b699e7673 100644 --- a/app/i18n/locales/hi-IN.json +++ b/app/i18n/locales/hi-IN.json @@ -250,6 +250,7 @@ "Edit_Room_Photo": "कमरे की तस्वीर संपादित करें", "Edit_Status": "स्थिति संपादित करें", "Email": "ईमेल", + "Email_associated_with_another_user": "ईमेल किसी अन्य उपयोगकर्ता से जुड़ा हुआ है।", "Email_Notification_Mode_All": "हर मेंशन/डीएम", "Email_Notification_Mode_Disabled": "अक्षम", "Email_required": "ईमेल आवश्यक है।", @@ -806,6 +807,7 @@ "User_left_this_channel": "चैनल छोड़ गया", "User_sent_an_attachment": "{{user}} ने एक अटैचमेंट भेजा", "Username": "उपयोगकर्ता नाम", + "Username_not_available": "उपयोगकर्ता नाम उपलब्ध नहीं है।", "Username_or_email": "उपयोगकर्ता नाम या ईमेल", "Username_required": "उपयोगकर्ता नाम आवश्यक है।", "Users": "उपयोगकर्ताएँ", diff --git a/app/i18n/locales/hu.json b/app/i18n/locales/hu.json index 0b58dc21845..aba0005543c 100644 --- a/app/i18n/locales/hu.json +++ b/app/i18n/locales/hu.json @@ -250,6 +250,7 @@ "Edit_Room_Photo": "Szobás fotó szerkesztése", "Edit_Status": "Állapot szerkesztése", "Email": "E-mail", + "Email_associated_with_another_user": "Egy másik felhasználóhoz tartozó e-mail cím", "Email_Notification_Mode_All": "Minden említés/DM ", "Email_Notification_Mode_Disabled": "Letiltva", "Email_required": "E-mail szükséges", @@ -808,6 +809,7 @@ "User_left_this_channel": "elhagyta a csatornát", "User_sent_an_attachment": "{{user}} mellékletet küldött", "Username": "Felhasználónév", + "Username_not_available": "A felhasználónév nem elérhető", "Username_or_email": "Felhasználónév vagy E-mail-cím ", "Username_required": "Felhasználónév szükséges", "Users": "Felhasználók", diff --git a/app/i18n/locales/it.json b/app/i18n/locales/it.json index 72cc28d727d..c4052f9f1f2 100644 --- a/app/i18n/locales/it.json +++ b/app/i18n/locales/it.json @@ -176,6 +176,7 @@ "Edit_Room_Photo": "Modifica foto della stanza", "Edit_Status": "Modifica Stato", "Email": "Email", + "Email_associated_with_another_user": "Email associata a un altro utente.", "Email_Notification_Mode_All": "Ogni Menzione/Messaggio Privato", "Email_Notification_Mode_Disabled": "Disabilitato", "Email_required": "Email obbligatorio", @@ -603,6 +604,7 @@ "User_Info": "Informazioni utente", "User_sent_an_attachment": "{{user}} ha inviato un allegato", "Username": "Username", + "Username_not_available": "Nome utente non disponibile", "Username_or_email": "Username o email", "Username_required": "Nome utente richiesto", "Users": "Utenti", diff --git a/app/i18n/locales/ja.json b/app/i18n/locales/ja.json index 48449ba2a30..76fc97fe92d 100644 --- a/app/i18n/locales/ja.json +++ b/app/i18n/locales/ja.json @@ -151,6 +151,7 @@ "Edit_Room_Photo": "部屋の写真を編集します", "Edit_Status": "ステータスを編集する", "Email": "メール", + "Email_associated_with_another_user": "他のユーザーに関連付けられているメールアドレス", "Email_Notification_Mode_All": "すべてのメンション/DM", "Email_Notification_Mode_Disabled": "無効", "Email_required": "メールアドレスが必要です。", @@ -487,6 +488,7 @@ "User_Info": "ユーザー情報", "User_sent_an_attachment": "{{user}}は添付ファイルを送信しました", "Username": "ユーザー名", + "Username_not_available": "ユーザー名が利用できません", "Username_or_email": "ユーザー名かメールアドレス", "Username_required": "ユーザー名が必要です", "Users": "ユーザー", diff --git a/app/i18n/locales/nl.json b/app/i18n/locales/nl.json index f2eeea4d1ba..d73aab5f5e8 100644 --- a/app/i18n/locales/nl.json +++ b/app/i18n/locales/nl.json @@ -198,6 +198,7 @@ "Edit_Room_Photo": "Roomfoto bewerken", "Edit_Status": "Status bewerken", "Email": "E-mail", + "Email_associated_with_another_user": "E-mail gekoppeld aan een andere gebruiker", "Email_Notification_Mode_All": "Elke vermelding/DM", "Email_Notification_Mode_Disabled": "Uitgeschakeld", "Email_required": "E-mail vereist", @@ -696,6 +697,7 @@ "User_Info": "Gebruikers info", "User_sent_an_attachment": "{{user}} stuurde een bijlage", "Username": "Gebruikersnaam", + "Username_not_available": "Gebruikersnaam niet beschikbaar", "Username_or_email": "Gebruikersnaam of e-mail", "Username_required": "Gebruikersnaam vereist", "Users": "Gebruikers", diff --git a/app/i18n/locales/nn.json b/app/i18n/locales/nn.json index 295c1c3c2b9..0f167651e23 100644 --- a/app/i18n/locales/nn.json +++ b/app/i18n/locales/nn.json @@ -113,6 +113,7 @@ "Edit": "Rediger", "email": "E-post", "Email": "E-post", + "Email_associated_with_another_user": "E-post knytt til ein annan brukar", "Email_Notification_Mode_Disabled": "Funksjonshemmet", "Email_required": "E-post nødvendig", "Enable": "Aktiver", @@ -350,6 +351,7 @@ "User_not_found_or": "Bruker ikke funnet eller feil passord", "User_sent_an_attachment": "{{user}} sendte et vedlegg", "Username": "Brukernavn", + "Username_not_available": "Brukarnamn ikkje tilgjengeleg", "Username_required": "Brukarnamn påkrevd", "Users": "brukere", "Verify": "Bekreft", diff --git a/app/i18n/locales/no.json b/app/i18n/locales/no.json index d26c712c785..4c45d37b271 100644 --- a/app/i18n/locales/no.json +++ b/app/i18n/locales/no.json @@ -267,6 +267,7 @@ "Edit_Status": "Rediger status", "email": "E-post", "Email": "E-post", + "Email_associated_with_another_user": "E-post tilknyttet en annen bruker", "Email_Notification_Mode_All": "Hver omtale/DM", "Email_Notification_Mode_Disabled": "deaktivert", "Email_required": "E-postadresse påkrevd", @@ -856,6 +857,7 @@ "User_not_found_or": "Bruker ikke funnet eller feil passord", "User_sent_an_attachment": "{{user}} sendte et vedlegg", "Username": "Brukernavn", + "Username_not_available": "Brukernavn ikke tilgjengelig", "Username_or_email": "Brukernavn eller e-post", "Username_required": "Brukernavn påkrevd", "Users": "Brukere", diff --git a/app/i18n/locales/pt-BR.json b/app/i18n/locales/pt-BR.json index f885ce2d39b..accb510c8ab 100644 --- a/app/i18n/locales/pt-BR.json +++ b/app/i18n/locales/pt-BR.json @@ -272,6 +272,7 @@ "Edit_Room_Photo": "Editar foto da sala", "Edit_Status": "Editar status", "Email": "E-mail", + "Email_associated_with_another_user": "E-mail associado a outro usuário", "Email_Notification_Mode_All": "Toda menção / mensagem direta", "Email_Notification_Mode_Disabled": "Desativado", "Email_required": "E-mail obrigatório", @@ -885,6 +886,7 @@ "User_not_found_or": "Usuário não encontrado ou senha incorreta", "User_sent_an_attachment": "{{user}} enviou um anexo", "Username": "Usuário", + "Username_not_available": "Nome de usuário não disponível.", "Username_or_email": "Usuário ou email", "Username_required": "Nome de usuário obrigatório", "Users": "Usuários", diff --git a/app/i18n/locales/pt-PT.json b/app/i18n/locales/pt-PT.json index 37319539638..72a6142677b 100644 --- a/app/i18n/locales/pt-PT.json +++ b/app/i18n/locales/pt-PT.json @@ -147,6 +147,7 @@ "Edit_Room_Photo": "Editar foto da sala", "Edit_Status": "Editar Status", "Email": "Correio eletrónico", + "Email_associated_with_another_user": "Email associado a outro utilizador", "Email_Notification_Mode_All": "Cada Menção/DM", "Email_Notification_Mode_Disabled": "Desactivado", "Email_required": "Email obrigatório", @@ -463,6 +464,7 @@ "User_has_been_key": "Utilizador foi {{key}}", "User_sent_an_attachment": "{{user}} enviou um ficheiro", "Username": "Nome de utilizador", + "Username_not_available": "Nome de utilizador não disponível", "Username_or_email": "Nome de utilizador ou e-mail", "Username_required": "Nome de utilizador necessário", "View_Thread": "Exibir thread", diff --git a/app/i18n/locales/ru.json b/app/i18n/locales/ru.json index 29a77d3d580..32835178842 100644 --- a/app/i18n/locales/ru.json +++ b/app/i18n/locales/ru.json @@ -222,6 +222,7 @@ "Edit_Room_Photo": "Редактировать фото комнаты", "Edit_Status": "Изменить статус", "Email": "электронная почта", + "Email_associated_with_another_user": "Электронная почта связана с другим пользователем.", "Email_Notification_Mode_All": "Каждое Упоминание/Личное сообщение", "Email_Notification_Mode_Disabled": "Отключено", "Email_required": "Требуется электронная почта", @@ -742,6 +743,7 @@ "User_Info": "Информация о пользователе", "User_sent_an_attachment": "{{user}} отправил вложение", "Username": "Имя пользователя", + "Username_not_available": "Имя пользователя недоступно", "Username_or_email": "Имя пользователя или email", "Username_required": "Требуется имя пользователя", "Users": "Пользователи", diff --git a/app/i18n/locales/sl-SI.json b/app/i18n/locales/sl-SI.json index 80f12926f53..fae5cb32e42 100644 --- a/app/i18n/locales/sl-SI.json +++ b/app/i18n/locales/sl-SI.json @@ -208,6 +208,7 @@ "Edit_Room_Photo": "Uredi fotografijo sobe", "Edit_Status": "Uredi stanje", "Email": "E-pošta", + "Email_associated_with_another_user": "E-pošta povezana z drugim uporabnikom", "Email_Notification_Mode_All": "Vsaka omemba/neposredno sporočilo", "Email_Notification_Mode_Disabled": "Onemogočeno", "Email_required": "E-pošta je obvezna", @@ -711,6 +712,7 @@ "User_Info": "Uporabniške informacije", "User_sent_an_attachment": "{{user}} je poslal prilogo", "Username": "Uporabniško ime", + "Username_not_available": "Uporabniško ime ni na voljo", "Username_or_email": "Uporabnisko ime ali e-posta", "Username_required": "Zahtevano uporabniško ime", "Users": "Uporabniki", diff --git a/app/i18n/locales/sv.json b/app/i18n/locales/sv.json index 686df6e8a63..a38c4ba23a9 100644 --- a/app/i18n/locales/sv.json +++ b/app/i18n/locales/sv.json @@ -230,6 +230,7 @@ "Edit_Room_Photo": "Redigera rumsfoto", "Edit_Status": "Redigera status", "Email": "E-post", + "Email_associated_with_another_user": "E-post kopplad till en annan användare", "Email_Notification_Mode_All": "Varje omnämnande/direktmeddelande", "Email_Notification_Mode_Disabled": "Inaktiverat", "Email_required": "E-post krävs", @@ -772,6 +773,7 @@ "User_left_this_channel": "lämnade kanalen", "User_sent_an_attachment": "{{user}} skickade en bilaga", "Username": "Användarnamn", + "Username_not_available": "Användarnamn ej tillgängligt", "Username_or_email": "Användarnamn eller e-postadress", "Username_required": "Användarnamn krävs", "Users": "Användare", diff --git a/app/i18n/locales/ta-IN.json b/app/i18n/locales/ta-IN.json index c400af28de4..5e00acbf7fc 100644 --- a/app/i18n/locales/ta-IN.json +++ b/app/i18n/locales/ta-IN.json @@ -250,6 +250,7 @@ "Edit_Room_Photo": "அறை புகைப்படத்தைத் திருத்து", "Edit_Status": "நிலையை திருத்து", "Email": "மின்னஞ்சல்", + "Email_associated_with_another_user": "வேறொரு பயனருடன் தொடர்புடைய மின்னஞ்சல்.", "Email_Notification_Mode_All": "எல்லா குறிபாக / தனிப்பட்டது", "Email_Notification_Mode_Disabled": "முடக்கப்பட்டது", "Email_required": "மின்னஞ்சல் தேவை", @@ -806,6 +807,7 @@ "User_left_this_channel": "குழுவை விட்டார்", "User_sent_an_attachment": "{{user}} ஒரு இணைப்பை அனுப்பினார்", "Username": "பயனர்பெயர்", + "Username_not_available": "பயனர் பெயர் கிடைக்கவில்லை", "Username_or_email": "பயனர்பெயர் அல்லாத மின்னஞ்சல்", "Username_required": "பயனர் பெயர் தேவை", "Users": "பயனர்கள்", diff --git a/app/i18n/locales/te-IN.json b/app/i18n/locales/te-IN.json index af0e5c4d89f..e05f4ba4b97 100644 --- a/app/i18n/locales/te-IN.json +++ b/app/i18n/locales/te-IN.json @@ -249,6 +249,7 @@ "Edit_Room_Photo": "గది ఫోటోను సవరించండి", "Edit_Status": "స్థితిని సవరించు", "Email": "ईमेल", + "Email_associated_with_another_user": "अन्य उपयोगकर्ता के साथ संबद्ध ईमेल", "Email_Notification_Mode_All": "ప్రతి ఉల్లేఖం / DM", "Email_Notification_Mode_Disabled": "అచ్చుకోవడం లేదు", "Email_required": "ईमेल आवश्यक है।", @@ -805,6 +806,7 @@ "User_left_this_channel": "ఛానల్‌ను వదిలిపోయారు", "User_sent_an_attachment": "{{user}} అనుకూలంగా పంపించింది", "Username": "వాడుకరి పేరు", + "Username_not_available": "उपयोगकर्ता नाम उपलब्ध नहीं है।", "Username_or_email": "వాడుకరి పేరు లేదా ఇమెయిల్", "Username_required": "यूज़रनेम आवश्यक है", "Users": "వాడుకరులు", diff --git a/app/i18n/locales/tr.json b/app/i18n/locales/tr.json index 7d0b1b7df3e..16140743022 100644 --- a/app/i18n/locales/tr.json +++ b/app/i18n/locales/tr.json @@ -165,6 +165,7 @@ "Edit_Room_Photo": "Oda fotoğrafını düzenle", "Edit_Status": "Durumu Düzenle", "Email": "E-posta", + "Email_associated_with_another_user": "Başka bir kullanıcıyla ilişkilendirilmiş e-posta.", "Email_Notification_Mode_All": "Tüm Bahsetmeler/Özel İletiler", "Email_Notification_Mode_Disabled": "Devre Dışı", "Email_required": "E-posta gerekli", @@ -586,6 +587,7 @@ "User_Info": "Kullanıcı bilgisi", "User_sent_an_attachment": "{{user}} bir ek gönderdi", "Username": "Kullanıcı adı", + "Username_not_available": "Kullanıcı adı mevcut değil", "Username_or_email": "Kullanıcı adı ya da e-posta", "Username_required": "Kullanıcı adı gerekli", "Users": "Kullanıcılar", diff --git a/app/i18n/locales/zh-CN.json b/app/i18n/locales/zh-CN.json index b3706e304d0..2c603729570 100644 --- a/app/i18n/locales/zh-CN.json +++ b/app/i18n/locales/zh-CN.json @@ -161,6 +161,7 @@ "Edit_Room_Photo": "编辑房间照片", "Edit_Status": "编辑状态", "Email": "电子邮件", + "Email_associated_with_another_user": "该电子邮件与另一位用户关联", "Email_Notification_Mode_All": "每次被标记或私讯", "Email_Notification_Mode_Disabled": "禁用", "Email_required": "需要电子邮件地址", @@ -547,6 +548,7 @@ "User_Info": "用戶资讯", "User_sent_an_attachment": "{{user}} 寄送了一个附件", "Username": "用户名", + "Username_not_available": "用户名不可用", "Username_or_email": "用户名或邮箱", "Username_required": "需要用户名", "Users": "用戶", diff --git a/app/i18n/locales/zh-TW.json b/app/i18n/locales/zh-TW.json index 5144bc52901..e9e97939607 100644 --- a/app/i18n/locales/zh-TW.json +++ b/app/i18n/locales/zh-TW.json @@ -167,6 +167,7 @@ "Edit_Room_Photo": "編輯房間照片", "Edit_Status": "編輯狀態", "Email": "電子郵件", + "Email_associated_with_another_user": "電子郵件已與其他使用者關聯", "Email_Notification_Mode_All": "每次被標記或私訊", "Email_Notification_Mode_Disabled": "禁用", "Email_required": "需要電子郵件地址", @@ -576,6 +577,7 @@ "User_Info": "使用者資訊", "User_sent_an_attachment": "{{user}} 寄送了一個附件", "Username": "使用者名稱", + "Username_not_available": "用戶名不可用", "Username_or_email": "使用者名稱或電子郵件", "Username_required": "需要用戶名", "Users": "使用者", diff --git a/app/lib/hooks/useA11yErrorAnnouncement.tsx b/app/lib/hooks/useA11yErrorAnnouncement.tsx new file mode 100644 index 00000000000..bb50685ec63 --- /dev/null +++ b/app/lib/hooks/useA11yErrorAnnouncement.tsx @@ -0,0 +1,31 @@ +import { useRef } from 'react'; +import { AccessibilityInfo } from 'react-native'; + +import { useDebounce } from '../methods/helpers'; +import { textInputDebounceTime } from '../constants'; + +interface IUseA11yErrorAnnouncement { + error: string | undefined; +} + +const useA11yErrorAnnouncement = ({ error }: IUseA11yErrorAnnouncement) => { + const previousMessage = useRef(error); + const announced = useRef(false); + const shouldAnnounce = error && error !== previousMessage.current && !announced.current; + + const handleA11yAnnouncement = useDebounce(() => { + if (shouldAnnounce) { + const message = (error || '').trim(); + if (message) { + AccessibilityInfo.announceForAccessibility(message); + announced.current = true; + } + } else if (!error) { + announced.current = false; + } + }, textInputDebounceTime); + + handleA11yAnnouncement(); +}; + +export default useA11yErrorAnnouncement; diff --git a/app/views/ProfileView/index.tsx b/app/views/ProfileView/index.tsx index 83a797787d9..c60739fea6a 100644 --- a/app/views/ProfileView/index.tsx +++ b/app/views/ProfileView/index.tsx @@ -7,6 +7,7 @@ import * as yup from 'yup'; import { yupResolver } from '@hookform/resolvers/yup'; import { useForm } from 'react-hook-form'; +import useA11yErrorAnnouncement from '../../lib/hooks/useA11yErrorAnnouncement'; import { setUser } from '../../actions/login'; import { useActionSheet } from '../../containers/ActionSheet'; import ActionSheetContentWithInputAndSubmit from '../../containers/ActionSheet/ActionSheetContentWithInputAndSubmit'; @@ -87,6 +88,7 @@ const ProfileView = ({ navigation }: IProfileViewProps): React.ReactElement => { setFocus, getValues, setValue, + setError, watch, formState: { isDirty, dirtyFields, errors } } = useForm({ @@ -225,6 +227,14 @@ const ProfileView = ({ navigation }: IProfileViewProps): React.ReactElement => { setValue('currentPassword', null); setTwoFactorCode(null); } catch (e: any) { + if (e?.error === 'error-could-not-save-identity') { + setError('username', { message: I18n.t('Username_not_available'), type: 'validate' }); + } + + if (e?.message.startsWith(email) && e?.error === 'error-field-unavailable') { + setError('email', { message: I18n.t('Email_associated_with_another_user'), type: 'validate' }); + } + if (e?.error === 'totp-invalid' && e?.details.method !== TwoFactorMethods.PASSWORD) { try { const code = await twoFactor({ method: e.details.method, invalid: e?.error === 'totp-invalid' && !!twoFactorCode }); @@ -242,6 +252,10 @@ const ProfileView = ({ navigation }: IProfileViewProps): React.ReactElement => { } }; + useA11yErrorAnnouncement({ error: errors.name?.message }); + useA11yErrorAnnouncement({ error: errors.username?.message }); + useA11yErrorAnnouncement({ error: errors.email?.message }); + useLayoutEffect(() => { const options: NativeStackNavigationOptions = { title: I18n.t('Profile') From a694ef57507a20f275bc01ead48617de5e9ca547 Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Thu, 10 Jul 2025 17:49:29 -0300 Subject: [PATCH 03/13] fix: required announcement --- app/views/ProfileView/index.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/ProfileView/index.tsx b/app/views/ProfileView/index.tsx index c60739fea6a..4db39cd55cd 100644 --- a/app/views/ProfileView/index.tsx +++ b/app/views/ProfileView/index.tsx @@ -47,9 +47,9 @@ import useVerifyPassword from '../../lib/hooks/useVerifyPassword'; const MAX_BIO_LENGTH = 260; const MAX_NICKNAME_LENGTH = 120; const validationSchema = yup.object().shape({ - name: yup.string().min(1).required(I18n.t('name_required')), - email: yup.string().email().required(I18n.t('email_required')), - username: yup.string().min(1).required(I18n.t('username_required')) + name: yup.string().required(I18n.t('Name_required')), + email: yup.string().email().required(I18n.t('Email_required')), + username: yup.string().min(1).required(I18n.t('Username_required')) }); interface IProfileViewProps { From bb4d091f2cad648ace6272e568a66989a71735e8 Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Mon, 14 Jul 2025 19:07:18 -0300 Subject: [PATCH 04/13] fix: error message --- app/i18n/locales/ar.json | 1 + app/i18n/locales/bn-IN.json | 1 + app/i18n/locales/cs.json | 1 + app/i18n/locales/de.json | 1 + app/i18n/locales/en.json | 1 + app/i18n/locales/es.json | 1 + app/i18n/locales/fi.json | 1 + app/i18n/locales/fr.json | 1 + app/i18n/locales/hi-IN.json | 1 + app/i18n/locales/hu.json | 1 + app/i18n/locales/it.json | 1 + app/i18n/locales/ja.json | 1 + app/i18n/locales/nl.json | 1 + app/i18n/locales/nn.json | 1 + app/i18n/locales/no.json | 1 + app/i18n/locales/pt-BR.json | 1 + app/i18n/locales/pt-PT.json | 1 + app/i18n/locales/ru.json | 1 + app/i18n/locales/sl-SI.json | 1 + app/i18n/locales/sv.json | 1 + app/i18n/locales/ta-IN.json | 1 + app/i18n/locales/te-IN.json | 1 + app/i18n/locales/tr.json | 1 + app/i18n/locales/zh-CN.json | 1 + app/i18n/locales/zh-TW.json | 1 + app/views/ProfileView/index.tsx | 4 ++-- 26 files changed, 27 insertions(+), 2 deletions(-) diff --git a/app/i18n/locales/ar.json b/app/i18n/locales/ar.json index dbea16bc1b3..e6f997ad30f 100644 --- a/app/i18n/locales/ar.json +++ b/app/i18n/locales/ar.json @@ -153,6 +153,7 @@ "Edit_Status": "تعديل الحالة", "Email": "بريد إلكتروني", "Email_associated_with_another_user": "البريد الإلكتروني مرتبط بمستخدم آخر.", + "Email_must_be_a_valid_email": "يجب أن يكون البريد الإلكتروني بريدًا إلكترونيًا صالحًا", "Email_Notification_Mode_All": "لكل إشارة أو رسالة مباشرة", "Email_Notification_Mode_Disabled": "معطل", "Email_required": "البريد الإلكتروني مطلوب", diff --git a/app/i18n/locales/bn-IN.json b/app/i18n/locales/bn-IN.json index cd5c2cd57e1..db1b89ac6b2 100644 --- a/app/i18n/locales/bn-IN.json +++ b/app/i18n/locales/bn-IN.json @@ -251,6 +251,7 @@ "Edit_Status": "স্থিতি সম্পাদনা করুন", "Email": "ইমেইল", "Email_associated_with_another_user": "অন্য ব্যবহারকারীর সঙ্গে সংশ্লিষ্ট ইমেইল", + "Email_must_be_a_valid_email": "ইমেইলটি একটি বৈধ ইমেইল হতে হবে।", "Email_Notification_Mode_All": "প্রতি উল্লেখ / ডিএম", "Email_Notification_Mode_Disabled": "অক্ষম", "Email_required": "ইমেইল প্রয়োজন", diff --git a/app/i18n/locales/cs.json b/app/i18n/locales/cs.json index c353a84b18e..e4d25130f55 100644 --- a/app/i18n/locales/cs.json +++ b/app/i18n/locales/cs.json @@ -269,6 +269,7 @@ "Edit_Status": "Upravit stav", "Email": "E-mail", "Email_associated_with_another_user": "E-mail je přiřazen k jinému uživateli.", + "Email_must_be_a_valid_email": "E-mail musí být platný e-mail.", "Email_Notification_Mode_All": "Každá zmínka/DM", "Email_Notification_Mode_Disabled": "Zakázáno", "Email_required": "Požadován e-mail.", diff --git a/app/i18n/locales/de.json b/app/i18n/locales/de.json index a4e7957829f..dd3a3925791 100644 --- a/app/i18n/locales/de.json +++ b/app/i18n/locales/de.json @@ -246,6 +246,7 @@ "Edit_Status": "Status ändern", "Email": "E-Mail", "Email_associated_with_another_user": "E-Mail mit einem anderen Benutzer verknüpft.", + "Email_must_be_a_valid_email": "E-Mail muss eine gültige E-Mail sein.", "Email_Notification_Mode_All": "Jede Erwähnung/Direktnachricht", "Email_Notification_Mode_Disabled": "Deaktiviert", "Email_required": "E-Mail erforderlich", diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json index 90457f91f76..76ff6d5d05c 100644 --- a/app/i18n/locales/en.json +++ b/app/i18n/locales/en.json @@ -279,6 +279,7 @@ "email": "Email", "Email": "Email", "Email_associated_with_another_user": "Email associated with another user", + "Email_must_be_a_valid_email": "Email must be a valid email", "Email_Notification_Mode_All": "Every mention/DM", "Email_Notification_Mode_Disabled": "Disabled", "Email_required": "Email required", diff --git a/app/i18n/locales/es.json b/app/i18n/locales/es.json index 56876ea7113..18cf1a5f0bf 100644 --- a/app/i18n/locales/es.json +++ b/app/i18n/locales/es.json @@ -120,6 +120,7 @@ "Edit_Room_Photo": "Editar Foto de la sala", "Email": "E-mail", "Email_associated_with_another_user": "Correo electrónico asociado con otro usuario.", + "Email_must_be_a_valid_email": "El correo electrónico debe ser un correo electrónico válido.", "Email_required": "Correo electrónico obligatorio", "Emoji_selector": "Selector de emojis", "Enable_Auto_Translate": "Permitir Auto-Translate", diff --git a/app/i18n/locales/fi.json b/app/i18n/locales/fi.json index e6a7d9ef3e3..8ef696a92fa 100644 --- a/app/i18n/locales/fi.json +++ b/app/i18n/locales/fi.json @@ -231,6 +231,7 @@ "Edit_Status": "Muokkaa tilaa", "Email": "Sähköposti", "Email_associated_with_another_user": "Sähköposti on liitetty toiseen käyttäjään.", + "Email_must_be_a_valid_email": "Sähköpostin on oltava kelvollinen sähköpostiosoite.", "Email_Notification_Mode_All": "Jokainen maininta/SV", "Email_Notification_Mode_Disabled": "Ei käytössä", "Email_required": "Sähköposti vaaditaan", diff --git a/app/i18n/locales/fr.json b/app/i18n/locales/fr.json index 91a73180d9a..081d7f8eeec 100644 --- a/app/i18n/locales/fr.json +++ b/app/i18n/locales/fr.json @@ -199,6 +199,7 @@ "Edit_Status": "Modifier le statut", "Email": "Courriel", "Email_associated_with_another_user": "E-mail associé à un autre utilisateur", + "Email_must_be_a_valid_email": "L'adresse e-mail doit être valide.", "Email_Notification_Mode_All": "Chaque mention/MD", "Email_Notification_Mode_Disabled": "Désactivé", "Email_required": "Adresse e-mail requise", diff --git a/app/i18n/locales/hi-IN.json b/app/i18n/locales/hi-IN.json index f1b699e7673..37c2a405f86 100644 --- a/app/i18n/locales/hi-IN.json +++ b/app/i18n/locales/hi-IN.json @@ -251,6 +251,7 @@ "Edit_Status": "स्थिति संपादित करें", "Email": "ईमेल", "Email_associated_with_another_user": "ईमेल किसी अन्य उपयोगकर्ता से जुड़ा हुआ है।", + "Email_must_be_a_valid_email": "ईमेल एक मान्य ईमेल होना चाहिए।", "Email_Notification_Mode_All": "हर मेंशन/डीएम", "Email_Notification_Mode_Disabled": "अक्षम", "Email_required": "ईमेल आवश्यक है।", diff --git a/app/i18n/locales/hu.json b/app/i18n/locales/hu.json index aba0005543c..0150cd99e6c 100644 --- a/app/i18n/locales/hu.json +++ b/app/i18n/locales/hu.json @@ -251,6 +251,7 @@ "Edit_Status": "Állapot szerkesztése", "Email": "E-mail", "Email_associated_with_another_user": "Egy másik felhasználóhoz tartozó e-mail cím", + "Email_must_be_a_valid_email": "Az emailnek érvényesnek kell lennie.", "Email_Notification_Mode_All": "Minden említés/DM ", "Email_Notification_Mode_Disabled": "Letiltva", "Email_required": "E-mail szükséges", diff --git a/app/i18n/locales/it.json b/app/i18n/locales/it.json index c4052f9f1f2..ed804524257 100644 --- a/app/i18n/locales/it.json +++ b/app/i18n/locales/it.json @@ -177,6 +177,7 @@ "Edit_Status": "Modifica Stato", "Email": "Email", "Email_associated_with_another_user": "Email associata a un altro utente.", + "Email_must_be_a_valid_email": "L'email deve essere un'email valida.", "Email_Notification_Mode_All": "Ogni Menzione/Messaggio Privato", "Email_Notification_Mode_Disabled": "Disabilitato", "Email_required": "Email obbligatorio", diff --git a/app/i18n/locales/ja.json b/app/i18n/locales/ja.json index 76fc97fe92d..05508e734d1 100644 --- a/app/i18n/locales/ja.json +++ b/app/i18n/locales/ja.json @@ -152,6 +152,7 @@ "Edit_Status": "ステータスを編集する", "Email": "メール", "Email_associated_with_another_user": "他のユーザーに関連付けられているメールアドレス", + "Email_must_be_a_valid_email": "メールは有効なメールである必要があります。", "Email_Notification_Mode_All": "すべてのメンション/DM", "Email_Notification_Mode_Disabled": "無効", "Email_required": "メールアドレスが必要です。", diff --git a/app/i18n/locales/nl.json b/app/i18n/locales/nl.json index d73aab5f5e8..595a607ce13 100644 --- a/app/i18n/locales/nl.json +++ b/app/i18n/locales/nl.json @@ -199,6 +199,7 @@ "Edit_Status": "Status bewerken", "Email": "E-mail", "Email_associated_with_another_user": "E-mail gekoppeld aan een andere gebruiker", + "Email_must_be_a_valid_email": "E-mail moet een geldig e-mailadres zijn", "Email_Notification_Mode_All": "Elke vermelding/DM", "Email_Notification_Mode_Disabled": "Uitgeschakeld", "Email_required": "E-mail vereist", diff --git a/app/i18n/locales/nn.json b/app/i18n/locales/nn.json index 0f167651e23..a43e9bbdde2 100644 --- a/app/i18n/locales/nn.json +++ b/app/i18n/locales/nn.json @@ -114,6 +114,7 @@ "email": "E-post", "Email": "E-post", "Email_associated_with_another_user": "E-post knytt til ein annan brukar", + "Email_must_be_a_valid_email": "E-post må være ei gyldig e-postadresse", "Email_Notification_Mode_Disabled": "Funksjonshemmet", "Email_required": "E-post nødvendig", "Enable": "Aktiver", diff --git a/app/i18n/locales/no.json b/app/i18n/locales/no.json index 4c45d37b271..e12f80bd3f8 100644 --- a/app/i18n/locales/no.json +++ b/app/i18n/locales/no.json @@ -268,6 +268,7 @@ "email": "E-post", "Email": "E-post", "Email_associated_with_another_user": "E-post tilknyttet en annen bruker", + "Email_must_be_a_valid_email": "E-posten må være en gyldig e-postadresse", "Email_Notification_Mode_All": "Hver omtale/DM", "Email_Notification_Mode_Disabled": "deaktivert", "Email_required": "E-postadresse påkrevd", diff --git a/app/i18n/locales/pt-BR.json b/app/i18n/locales/pt-BR.json index accb510c8ab..3e0c3d4e556 100644 --- a/app/i18n/locales/pt-BR.json +++ b/app/i18n/locales/pt-BR.json @@ -273,6 +273,7 @@ "Edit_Status": "Editar status", "Email": "E-mail", "Email_associated_with_another_user": "E-mail associado a outro usuário", + "Email_must_be_a_valid_email": "O e-mail deve ser um e-mail válido.", "Email_Notification_Mode_All": "Toda menção / mensagem direta", "Email_Notification_Mode_Disabled": "Desativado", "Email_required": "E-mail obrigatório", diff --git a/app/i18n/locales/pt-PT.json b/app/i18n/locales/pt-PT.json index 72a6142677b..93429e53f8e 100644 --- a/app/i18n/locales/pt-PT.json +++ b/app/i18n/locales/pt-PT.json @@ -148,6 +148,7 @@ "Edit_Status": "Editar Status", "Email": "Correio eletrónico", "Email_associated_with_another_user": "Email associado a outro utilizador", + "Email_must_be_a_valid_email": "O email deve ser um email válido.", "Email_Notification_Mode_All": "Cada Menção/DM", "Email_Notification_Mode_Disabled": "Desactivado", "Email_required": "Email obrigatório", diff --git a/app/i18n/locales/ru.json b/app/i18n/locales/ru.json index 32835178842..aa9c42b2ea4 100644 --- a/app/i18n/locales/ru.json +++ b/app/i18n/locales/ru.json @@ -223,6 +223,7 @@ "Edit_Status": "Изменить статус", "Email": "электронная почта", "Email_associated_with_another_user": "Электронная почта связана с другим пользователем.", + "Email_must_be_a_valid_email": "Электронная почта должна быть действительной.", "Email_Notification_Mode_All": "Каждое Упоминание/Личное сообщение", "Email_Notification_Mode_Disabled": "Отключено", "Email_required": "Требуется электронная почта", diff --git a/app/i18n/locales/sl-SI.json b/app/i18n/locales/sl-SI.json index fae5cb32e42..dc2bf423d08 100644 --- a/app/i18n/locales/sl-SI.json +++ b/app/i18n/locales/sl-SI.json @@ -209,6 +209,7 @@ "Edit_Status": "Uredi stanje", "Email": "E-pošta", "Email_associated_with_another_user": "E-pošta povezana z drugim uporabnikom", + "Email_must_be_a_valid_email": "E-poštni naslov mora biti veljaven e-poštni naslov.", "Email_Notification_Mode_All": "Vsaka omemba/neposredno sporočilo", "Email_Notification_Mode_Disabled": "Onemogočeno", "Email_required": "E-pošta je obvezna", diff --git a/app/i18n/locales/sv.json b/app/i18n/locales/sv.json index a38c4ba23a9..574f647da84 100644 --- a/app/i18n/locales/sv.json +++ b/app/i18n/locales/sv.json @@ -231,6 +231,7 @@ "Edit_Status": "Redigera status", "Email": "E-post", "Email_associated_with_another_user": "E-post kopplad till en annan användare", + "Email_must_be_a_valid_email": "E-post måste vara en giltig e-postadress", "Email_Notification_Mode_All": "Varje omnämnande/direktmeddelande", "Email_Notification_Mode_Disabled": "Inaktiverat", "Email_required": "E-post krävs", diff --git a/app/i18n/locales/ta-IN.json b/app/i18n/locales/ta-IN.json index 5e00acbf7fc..e768d4f63e8 100644 --- a/app/i18n/locales/ta-IN.json +++ b/app/i18n/locales/ta-IN.json @@ -251,6 +251,7 @@ "Edit_Status": "நிலையை திருத்து", "Email": "மின்னஞ்சல்", "Email_associated_with_another_user": "வேறொரு பயனருடன் தொடர்புடைய மின்னஞ்சல்.", + "Email_must_be_a_valid_email": "மின்னஞ்சல் செல்லுபடியாகும் மின்னஞ்சலாக இருத்தல் வேண்டும்", "Email_Notification_Mode_All": "எல்லா குறிபாக / தனிப்பட்டது", "Email_Notification_Mode_Disabled": "முடக்கப்பட்டது", "Email_required": "மின்னஞ்சல் தேவை", diff --git a/app/i18n/locales/te-IN.json b/app/i18n/locales/te-IN.json index e05f4ba4b97..883a3f1244d 100644 --- a/app/i18n/locales/te-IN.json +++ b/app/i18n/locales/te-IN.json @@ -250,6 +250,7 @@ "Edit_Status": "స్థితిని సవరించు", "Email": "ईमेल", "Email_associated_with_another_user": "अन्य उपयोगकर्ता के साथ संबद्ध ईमेल", + "Email_must_be_a_valid_email": "ईमेल एक मान्य ईमेल होना चाहिए।", "Email_Notification_Mode_All": "ప్రతి ఉల్లేఖం / DM", "Email_Notification_Mode_Disabled": "అచ్చుకోవడం లేదు", "Email_required": "ईमेल आवश्यक है।", diff --git a/app/i18n/locales/tr.json b/app/i18n/locales/tr.json index 16140743022..b639116546c 100644 --- a/app/i18n/locales/tr.json +++ b/app/i18n/locales/tr.json @@ -166,6 +166,7 @@ "Edit_Status": "Durumu Düzenle", "Email": "E-posta", "Email_associated_with_another_user": "Başka bir kullanıcıyla ilişkilendirilmiş e-posta.", + "Email_must_be_a_valid_email": "E-posta geçerli bir e-posta olmalıdır.", "Email_Notification_Mode_All": "Tüm Bahsetmeler/Özel İletiler", "Email_Notification_Mode_Disabled": "Devre Dışı", "Email_required": "E-posta gerekli", diff --git a/app/i18n/locales/zh-CN.json b/app/i18n/locales/zh-CN.json index 2c603729570..1e969b83f2a 100644 --- a/app/i18n/locales/zh-CN.json +++ b/app/i18n/locales/zh-CN.json @@ -162,6 +162,7 @@ "Edit_Status": "编辑状态", "Email": "电子邮件", "Email_associated_with_another_user": "该电子邮件与另一位用户关联", + "Email_must_be_a_valid_email": "电子邮件必须是有效的电子邮件。", "Email_Notification_Mode_All": "每次被标记或私讯", "Email_Notification_Mode_Disabled": "禁用", "Email_required": "需要电子邮件地址", diff --git a/app/i18n/locales/zh-TW.json b/app/i18n/locales/zh-TW.json index e9e97939607..638403a67c1 100644 --- a/app/i18n/locales/zh-TW.json +++ b/app/i18n/locales/zh-TW.json @@ -168,6 +168,7 @@ "Edit_Status": "編輯狀態", "Email": "電子郵件", "Email_associated_with_another_user": "電子郵件已與其他使用者關聯", + "Email_must_be_a_valid_email": "電子郵件必須是有效的電子郵件地址。", "Email_Notification_Mode_All": "每次被標記或私訊", "Email_Notification_Mode_Disabled": "禁用", "Email_required": "需要電子郵件地址", diff --git a/app/views/ProfileView/index.tsx b/app/views/ProfileView/index.tsx index 4db39cd55cd..e6c506a2fbd 100644 --- a/app/views/ProfileView/index.tsx +++ b/app/views/ProfileView/index.tsx @@ -48,8 +48,8 @@ const MAX_BIO_LENGTH = 260; const MAX_NICKNAME_LENGTH = 120; const validationSchema = yup.object().shape({ name: yup.string().required(I18n.t('Name_required')), - email: yup.string().email().required(I18n.t('Email_required')), - username: yup.string().min(1).required(I18n.t('Username_required')) + email: yup.string().email(I18n.t('Email_must_be_a_valid_email')).required(I18n.t('Email_required')), + username: yup.string().required(I18n.t('Username_required')) }); interface IProfileViewProps { From a863aa9a49b54228aceaa52424beeb50c2058198 Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Tue, 22 Jul 2025 19:24:09 -0300 Subject: [PATCH 05/13] fix: clean form on navigate --- app/views/ProfileView/index.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app/views/ProfileView/index.tsx b/app/views/ProfileView/index.tsx index e6c506a2fbd..c8800a7eb31 100644 --- a/app/views/ProfileView/index.tsx +++ b/app/views/ProfileView/index.tsx @@ -1,11 +1,12 @@ import { NativeStackNavigationOptions, NativeStackNavigationProp } from '@react-navigation/native-stack'; import { sha256 } from 'js-sha256'; -import React, { useLayoutEffect, useRef, useState } from 'react'; +import React, { useCallback, useLayoutEffect, useRef, useState } from 'react'; import { Keyboard, ScrollView, View, TextInput } from 'react-native'; import { useDispatch } from 'react-redux'; import * as yup from 'yup'; import { yupResolver } from '@hookform/resolvers/yup'; import { useForm } from 'react-hook-form'; +import { useFocusEffect } from '@react-navigation/native'; import useA11yErrorAnnouncement from '../../lib/hooks/useA11yErrorAnnouncement'; import { setUser } from '../../actions/login'; @@ -88,6 +89,7 @@ const ProfileView = ({ navigation }: IProfileViewProps): React.ReactElement => { setFocus, getValues, setValue, + reset, setError, watch, formState: { isDirty, dirtyFields, errors } @@ -280,6 +282,12 @@ const ProfileView = ({ navigation }: IProfileViewProps): React.ReactElement => { navigation.setOptions(options); }, []); + useFocusEffect( + useCallback(() => { + reset(); + }, []) + ); + return ( From f304aa77d0e997776ff6112d2410544d77fbaf6a Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Thu, 24 Jul 2025 21:17:28 +0000 Subject: [PATCH 06/13] action: organized translations --- app/i18n/locales/ar.json | 2 +- app/i18n/locales/bn-IN.json | 2 +- app/i18n/locales/cs.json | 2 +- app/i18n/locales/de.json | 2 +- app/i18n/locales/en.json | 2 +- app/i18n/locales/es.json | 2 +- app/i18n/locales/fi.json | 2 +- app/i18n/locales/fr.json | 2 +- app/i18n/locales/hi-IN.json | 2 +- app/i18n/locales/hu.json | 2 +- app/i18n/locales/it.json | 2 +- app/i18n/locales/ja.json | 2 +- app/i18n/locales/nl.json | 2 +- app/i18n/locales/pt-BR.json | 2 +- app/i18n/locales/pt-PT.json | 2 +- app/i18n/locales/ru.json | 2 +- app/i18n/locales/sl-SI.json | 2 +- app/i18n/locales/sv.json | 2 +- app/i18n/locales/ta-IN.json | 2 +- app/i18n/locales/te-IN.json | 2 +- app/i18n/locales/tr.json | 2 +- app/i18n/locales/zh-CN.json | 2 +- app/i18n/locales/zh-TW.json | 2 +- 23 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/i18n/locales/ar.json b/app/i18n/locales/ar.json index ffdbdb9e0da..2c02d75ecd8 100644 --- a/app/i18n/locales/ar.json +++ b/app/i18n/locales/ar.json @@ -407,7 +407,6 @@ "Read_Only": "قراءة فقط", "Read_only_hint": "يمكن لمالكي القنوات فقط إرسال رسائل جديدة", "Read_Receipt": "قراءة المستلم", - "Report_reason_required": "السبب مطلوب", "Receive_Group_Mentions": "تلقي إشارات المجموعة", "Receive_Group_Mentions_Info": "تلقي @all و @here للإشعارات", "Receive_Notification": "استلام الإشعار", @@ -425,6 +424,7 @@ "reply": "رد", "Reply_in_Thread": "الرد في موضوع", "Report": "بلاغ", + "Report_reason_required": "السبب مطلوب", "Required": "مطلوب", "Resend": "أعد الإرسال", "RESET": "إعادة", diff --git a/app/i18n/locales/bn-IN.json b/app/i18n/locales/bn-IN.json index fd00e1e21dc..535b148d7e6 100644 --- a/app/i18n/locales/bn-IN.json +++ b/app/i18n/locales/bn-IN.json @@ -582,7 +582,6 @@ "Read_Only": "শুধুমাত্র পড়া", "Read_only_hint": "কেবল চ্যানেল মালিকরা নতুন বার্তা প্রেরণ করতে পারেন", "Read_Receipt": "পড়া স্বীকৃতি", - "Report_reason_required": "কারণ প্রয়োজন", "Receive_Group_Mentions": "গ্রুপ উল্লেখ প্রাপ্ত করুন", "Receive_Group_Mentions_Info": "@all এবং @here উল্লেখ প্রাপ্ত করুন", "Receive_Notification": "বিজ্ঞপ্তি প্রাপ্ত করুন", @@ -610,6 +609,7 @@ "Reply_in_direct_message": "সরাসরি বার্তা দিন", "Reply_in_Thread": "থ্রেডে উত্তর দিন", "Report": "রিপোর্ট", + "Report_reason_required": "কারণ প্রয়োজন", "Required": "প্রয়োজনীয়", "Resend": "পুনরায় পাঠান", "RESET": "রিসেট", diff --git a/app/i18n/locales/cs.json b/app/i18n/locales/cs.json index a2067379983..eca4109944c 100644 --- a/app/i18n/locales/cs.json +++ b/app/i18n/locales/cs.json @@ -624,7 +624,6 @@ "Read_Only": "Pouze ke čtení", "Read_only_hint": "Pouze majitelé kanálů mohou odesílat nové zprávy", "Read_Receipt": "Potvrzení o přečtení", - "Report_reason_required": "Vyžadován důvod.", "Receive_Group_Mentions": "Přijímat zmínky o skupině", "Receive_Group_Mentions_Info": "Přijímat @všechny a @zde zmínky", "Receive_Notification": "Přijmout oznámení", @@ -655,6 +654,7 @@ "Reply_in_direct_message": "Odpovědět v přímé zprávě", "Reply_in_Thread": "Odpověď ve vláknu", "Report": "Zpráva", + "Report_reason_required": "Vyžadován důvod.", "Report_sent_successfully": "Hlášení bylo úspěšně odesláno", "Report_user": "Nahlásit uživatele", "Required": "Požadováno", diff --git a/app/i18n/locales/de.json b/app/i18n/locales/de.json index cddf4cb8079..1fffc30fc82 100644 --- a/app/i18n/locales/de.json +++ b/app/i18n/locales/de.json @@ -569,7 +569,6 @@ "Read_Only": "Schreibgeschützt", "Read_only_hint": "Nur Kanalbesitzer können neue Nachrichten senden", "Read_Receipt": "Lesebestätigung", - "Report_reason_required": "Grund erforderlich", "Receive_Group_Mentions": "Gruppen-Benachrichtigungen erhalten", "Receive_Group_Mentions_Info": "@all- und @here-Erwähnungen empfangen", "Receive_Notification": "Benachrichtigungen erhalten", @@ -598,6 +597,7 @@ "Reply_in_direct_message": "Mit einer Direktnachricht antworten", "Reply_in_Thread": "Im Thread antworten", "Report": "Melden", + "Report_reason_required": "Grund erforderlich", "Required": "Erforderlich", "Resend": "Erneut senden", "RESET": "Zurücksetzen", diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json index 581b500e417..9336b18b6a0 100644 --- a/app/i18n/locales/en.json +++ b/app/i18n/locales/en.json @@ -648,7 +648,6 @@ "Read_Only": "Read only", "Read_only_hint": "Only channel owners can send new messages", "Read_Receipt": "Read receipt", - "Report_reason_required": "Reason required", "Receive_Group_Mentions": "Receive group mentions", "Receive_Group_Mentions_Info": "Receive @all and @here mentions", "Receive_Notification": "Receive notification", @@ -679,6 +678,7 @@ "Reply_in_direct_message": "Reply in direct message", "Reply_in_Thread": "Reply in thread", "Report": "Report", + "Report_reason_required": "Reason required", "Report_sent_successfully": "Report sent successfully", "Report_user": "Report user", "Required": "Required", diff --git a/app/i18n/locales/es.json b/app/i18n/locales/es.json index 7813644b1f2..698a0cba75a 100644 --- a/app/i18n/locales/es.json +++ b/app/i18n/locales/es.json @@ -276,7 +276,6 @@ "Read_Only": "Sólo lectura ", "Read_only_hint": "Solo los propietarios de canales pueden enviar nuevos mensajes", "Read_Receipt": "Comprobante de lectura", - "Report_reason_required": "Motivo requerido", "Receive_Group_Mentions": "Recibir menciones de grupo", "Receive_Group_Mentions_Info": "Recibir menciones @all y @here", "Receive_Notification": "Recibir notificación", @@ -290,6 +289,7 @@ "Reply": "Respuesta", "reply": "respuesta", "Report": "Informe", + "Report_reason_required": "Motivo requerido", "Required": "Requerido", "Resend": "Reenviar", "RESET": "Reset", diff --git a/app/i18n/locales/fi.json b/app/i18n/locales/fi.json index 786288dc05c..98e8a1aab72 100644 --- a/app/i18n/locales/fi.json +++ b/app/i18n/locales/fi.json @@ -544,7 +544,6 @@ "Read_Only": "Vain luku", "Read_only_hint": "Vain kanavanomistajat voivat lähettää uusia viestejä", "Read_Receipt": "Lukukuittaus", - "Report_reason_required": "Vaaditaan syy", "Receive_Group_Mentions": "Vastaanota ryhmämainintoja", "Receive_Group_Mentions_Info": "Vastaanota @all- ja @here-maininnat", "Receive_Notification": "Vastaanota ilmoitus", @@ -573,6 +572,7 @@ "Reply_in_direct_message": "Vastaa suoralla viestillä", "Reply_in_Thread": "Vastaa viestiketjussa", "Report": "Ilmoita", + "Report_reason_required": "Vaaditaan syy", "Required": "Vaadittu", "Resend": "Lähetä uudelleen", "RESET": "Nollaa", diff --git a/app/i18n/locales/fr.json b/app/i18n/locales/fr.json index 74d588ac4d4..4879409969f 100644 --- a/app/i18n/locales/fr.json +++ b/app/i18n/locales/fr.json @@ -504,7 +504,6 @@ "Read_Only": "Lecture seule", "Read_only_hint": "Seuls les propriétaires de canaux peuvent envoyer de nouveaux messages", "Read_Receipt": "Accusé de réception", - "Report_reason_required": "Raison requise", "Receive_Group_Mentions": "Recevoir des mentions de groupe", "Receive_Group_Mentions_Info": "Recevoir des mentions @all et @here", "Receive_Notification": "Recevoir une notification", @@ -529,6 +528,7 @@ "reply": "répondre", "Reply_in_Thread": "Répondre dans le fil", "Report": "Signaler", + "Report_reason_required": "Raison requise", "Required": "Requis", "Resend": "Renvoyer", "RESET": "Réinitialiser", diff --git a/app/i18n/locales/hi-IN.json b/app/i18n/locales/hi-IN.json index 33d84187290..b850996c622 100644 --- a/app/i18n/locales/hi-IN.json +++ b/app/i18n/locales/hi-IN.json @@ -582,7 +582,6 @@ "Read_Only": "केवल पठन", "Read_only_hint": "केवल चैनल के मालिक केवल नए संदेश भेज सकते हैं", "Read_Receipt": "पठन प्राप्ति", - "Report_reason_required": "कारण आवश्यक है।", "Receive_Group_Mentions": "समूह उल्लेख प्राप्त करें", "Receive_Group_Mentions_Info": "@all और @here उल्लेख प्राप्त करें", "Receive_Notification": "सूचना प्राप्त करें", @@ -610,6 +609,7 @@ "Reply_in_direct_message": "सीधे संदेश में जवाब दें", "Reply_in_Thread": "थ्रेड में जवाब दें", "Report": "रिपोर्ट", + "Report_reason_required": "कारण आवश्यक है।", "Required": "आवश्यक", "Resend": "पुनः भेजें", "RESET": "रीसेट", diff --git a/app/i18n/locales/hu.json b/app/i18n/locales/hu.json index 4afda80c68e..3ac9d2f8283 100644 --- a/app/i18n/locales/hu.json +++ b/app/i18n/locales/hu.json @@ -583,7 +583,6 @@ "Read_Only": "Csak olvasható", "Read_only_hint": "Csak a csatornatulajdonosok küldhetnek új üzeneteket", "Read_Receipt": "Olvassa el a nyugtát", - "Report_reason_required": "Indoklás szükséges", "Receive_Group_Mentions": "Csoportos említések fogadása", "Receive_Group_Mentions_Info": "Az @all és @here említések fogadása", "Receive_Notification": "Értesítés fogadása", @@ -611,6 +610,7 @@ "Reply_in_direct_message": "Válasz közvetlen üzenetben", "Reply_in_Thread": "Válasz a témában", "Report": "Jelentés", + "Report_reason_required": "Indoklás szükséges", "Required": "Kötelező", "Resend": "Újraküldés", "RESET": "Visszaállítás", diff --git a/app/i18n/locales/it.json b/app/i18n/locales/it.json index fb120dda0bd..4e26d9f1c14 100644 --- a/app/i18n/locales/it.json +++ b/app/i18n/locales/it.json @@ -442,7 +442,6 @@ "Read_Only": "Sola lettura", "Read_only_hint": "Solo i proprietari di canali possono inviare nuovi messaggi", "Read_Receipt": "Conferma di lettura", - "Report_reason_required": "Motivo richiesto", "Receive_Group_Mentions": "Ricevi menzioni di gruppo", "Receive_Group_Mentions_Info": "Ricevi menzioni @all e @here", "Receive_Notification": "Ricevi notifiche", @@ -460,6 +459,7 @@ "reply": "risposta", "Reply_in_Thread": "Rispondi nella discussione", "Report": "Segnala", + "Report_reason_required": "Motivo richiesto", "Required": "Richiesto", "Resend": "Invia di nuovo", "RESET": "Ripristina", diff --git a/app/i18n/locales/ja.json b/app/i18n/locales/ja.json index 8c4671682b8..9d9c0696bf2 100644 --- a/app/i18n/locales/ja.json +++ b/app/i18n/locales/ja.json @@ -361,7 +361,6 @@ "Read_Only": "読み取り専用", "Read_only_hint": "チャネル所有者のみが新しいメッセージを送信できます", "Read_Receipt": "レシートを見る", - "Report_reason_required": "理由が必要です", "Receive_Group_Mentions": "グループの通知を受け取る", "Receive_Group_Mentions_Info": "@all と @here の通知を受け取る", "Receive_Notification": "通知を受け取る", @@ -376,6 +375,7 @@ "Reply": "返信", "reply": "返信", "Report": "報告", + "Report_reason_required": "理由が必要です", "Required": "必須", "Resend": "再送信", "RESET": "リセット", diff --git a/app/i18n/locales/nl.json b/app/i18n/locales/nl.json index dd594fdaf43..f3d28251a26 100644 --- a/app/i18n/locales/nl.json +++ b/app/i18n/locales/nl.json @@ -504,7 +504,6 @@ "Read_Only": "Alleen lezen", "Read_only_hint": "Alleen kanaaleigenaren kunnen nieuwe berichten verzenden", "Read_Receipt": "Leesbevestiging", - "Report_reason_required": "Reden vereist", "Receive_Group_Mentions": "Groepsvermeldingen ontvangen", "Receive_Group_Mentions_Info": "Ontvang @all en @here vermeldingen", "Receive_Notification": "Notificatie ontvangen", @@ -529,6 +528,7 @@ "reply": "antwoord", "Reply_in_Thread": "Reageer in draad", "Report": "Rapporteren", + "Report_reason_required": "Reden vereist", "Required": "Vereist", "Resend": "Opnieuw verzenden", "RESET": "Reset", diff --git a/app/i18n/locales/pt-BR.json b/app/i18n/locales/pt-BR.json index 2a9f75c4f75..47320132eab 100644 --- a/app/i18n/locales/pt-BR.json +++ b/app/i18n/locales/pt-BR.json @@ -635,7 +635,6 @@ "Read_Only": "Somente leitura", "Read_only_hint": "Somente os proprietários do canal podem enviar novas mensagens", "Read_Receipt": "Lida por", - "Report_reason_required": "Motivo necessário", "Receive_Group_Mentions": "Receber menções de grupo", "Receive_Group_Mentions_Info": "Receber menções @all e @here", "Receive_Notification": "Receber notificação", @@ -664,6 +663,7 @@ "Reply_in_direct_message": "Responder por mensagem direta", "Reply_in_Thread": "Responder no tópico", "Report": "Reportar", + "Report_reason_required": "Motivo necessário", "Report_sent_successfully": "Reporte enviado com sucesso", "Report_user": "Reportar usuário", "Required": "Obrigatório", diff --git a/app/i18n/locales/pt-PT.json b/app/i18n/locales/pt-PT.json index 79a4a03166f..bdf404acff8 100644 --- a/app/i18n/locales/pt-PT.json +++ b/app/i18n/locales/pt-PT.json @@ -379,13 +379,13 @@ "Read_Only": "Só de Leitura", "Read_only_hint": "Somente os proprietários do canal podem enviar novas mensagens", "Read_Receipt": "Recibos de leitura", - "Report_reason_required": "Motivo obrigatório", "Recently_used": "Recentemente usado", "Record_audio_message": "Gravar mensagem de áudio", "Register": "Registar", "Remove_from_workspace_history": "Remover do histórico do espaço de trabalho", "Remove_someone_from_room": "Remover alguém da sala", "Reply": "Responder", + "Report_reason_required": "Motivo obrigatório", "Required": "Obrigatório", "Resend": "Reenviar", "RESET": "Repor", diff --git a/app/i18n/locales/ru.json b/app/i18n/locales/ru.json index ef69ca6dfa7..c9b5255cdb8 100644 --- a/app/i18n/locales/ru.json +++ b/app/i18n/locales/ru.json @@ -534,7 +534,6 @@ "Read_Only": "Только для чтения", "Read_only_hint": "Только владельцы каналов могут отправлять новые сообщения", "Read_Receipt": "Уведомление о прочтении", - "Report_reason_required": "Требуется причина", "Receive_Group_Mentions": "Получать групповые уведомления", "Receive_Group_Mentions_Info": "Получать @all и @here уведомления", "Receive_Notification": "Получать уведомления", @@ -560,6 +559,7 @@ "Reply_in_direct_message": "Ответить в личном сообщении", "Reply_in_Thread": "Ответить в Треде", "Report": "Жалоба", + "Report_reason_required": "Требуется причина", "Required": "Обязательно", "Resend": "Отправить повторно", "RESET": "Сброс", diff --git a/app/i18n/locales/sl-SI.json b/app/i18n/locales/sl-SI.json index 6787120bc13..9ebd8953a9f 100644 --- a/app/i18n/locales/sl-SI.json +++ b/app/i18n/locales/sl-SI.json @@ -516,7 +516,6 @@ "Read_Only": "Le branje", "Read_only_hint": "Samo lastniki kanalov lahko pošljejo nova sporočila", "Read_Receipt": "Preberite potrdilo", - "Report_reason_required": "Zahtevan razlog", "Receive_Group_Mentions": "Prejemajte omembe skupine", "Receive_Group_Mentions_Info": "Prejemate @all in @Here omembe", "Receive_Notification": "Prejemanje obvestila", @@ -541,6 +540,7 @@ "reply": "odgovor", "Reply_in_Thread": "Odgovor v nit", "Report": "Poročilo", + "Report_reason_required": "Zahtevan razlog", "Required": "Obvezno", "Resend": "Ponovno poslati", "RESET": "Ponastaviti", diff --git a/app/i18n/locales/sv.json b/app/i18n/locales/sv.json index c86cfb7bb9a..8c1f8375314 100644 --- a/app/i18n/locales/sv.json +++ b/app/i18n/locales/sv.json @@ -543,7 +543,6 @@ "Read_Only": "Skrivskyddat", "Read_only_hint": "Endast kanalägare kan skicka nya meddelanden", "Read_Receipt": "Läskvitto", - "Report_reason_required": "Anledning krävs", "Receive_Group_Mentions": "Ta emot gruppomnämnanden", "Receive_Group_Mentions_Info": "Ta emot omnämnanden av typen @all och @here", "Receive_Notification": "Ta emot meddelanden", @@ -572,6 +571,7 @@ "Reply_in_direct_message": "Svara med direktmeddelande", "Reply_in_Thread": "Svara i tråden", "Report": "Anmäl", + "Report_reason_required": "Anledning krävs", "Required": "Obligatorisk", "Resend": "Skicka igen", "RESET": "Återställ", diff --git a/app/i18n/locales/ta-IN.json b/app/i18n/locales/ta-IN.json index d42392cb386..b56608e2b49 100644 --- a/app/i18n/locales/ta-IN.json +++ b/app/i18n/locales/ta-IN.json @@ -582,7 +582,6 @@ "Read_Only": "மட்டுமே படிக்க முடியும்", "Read_only_hint": "சேனல் உரிமையாளர்கள் மட்டுமே புதிய செய்திகளை அனுப்ப முடியும்", "Read_Receipt": "படித்த ரசீது", - "Report_reason_required": "காரணம் தேவை.", "Receive_Group_Mentions": "குழு குறிப்புகளைப் பெறு", "Receive_Group_Mentions_Info": "@all மற்றும் @here குறிப்புகளைப் பெறு", "Receive_Notification": "அறிவிப்பு பெறு", @@ -610,6 +609,7 @@ "Reply_in_direct_message": "நேரடியாக பதிலளிக்க", "Reply_in_Thread": "தொடரில் பதில்", "Report": "அறிவித்தல்", + "Report_reason_required": "காரணம் தேவை.", "Required": "தேவையானது", "Resend": "மீண்டும் அனுப்பு", "RESET": "மீளமை", diff --git a/app/i18n/locales/te-IN.json b/app/i18n/locales/te-IN.json index 88b189992e3..feca20ef27b 100644 --- a/app/i18n/locales/te-IN.json +++ b/app/i18n/locales/te-IN.json @@ -581,7 +581,6 @@ "Read_Only": "కేవలం చదవడానికి", "Read_only_hint": "ఛానెల్ యజమానులు మాత్రమే క్రొత్త సందేశాలను పంపగలరు", "Read_Receipt": "చదవడానికి సాక్షాత్కారం", - "Report_reason_required": "कारण आवश्यक है।", "Receive_Group_Mentions": "గ్రూప్ స్మరణలు స్వీకరించు", "Receive_Group_Mentions_Info": "@all మరియు @here స్మరణలు స్వీకరించు", "Receive_Notification": "నోటిఫికేషన్ స్వీకరించండి", @@ -609,6 +608,7 @@ "Reply_in_direct_message": "నిర్దేశ సందేశంలో ప్రతిస్థానించండి", "Reply_in_Thread": "థ్రెడ్లో సమాధానం", "Report": "నివేదించండి", + "Report_reason_required": "कारण आवश्यक है।", "Required": "అవసరమైనది", "Resend": "మళ్ళీ పంపించు", "RESET": "రీసెట్", diff --git a/app/i18n/locales/tr.json b/app/i18n/locales/tr.json index 79320071b35..9b80085877c 100644 --- a/app/i18n/locales/tr.json +++ b/app/i18n/locales/tr.json @@ -425,7 +425,6 @@ "Read_Only": "Yazma Kısıtlı", "Read_only_hint": "Yalnızca kanal sahipleri yeni mesajlar gönderebilir", "Read_Receipt": "Okundu Bilgisi", - "Report_reason_required": "Gerekçesi gerekiyor", "Receive_Group_Mentions": "Grup Bahsetmelerini Al", "Receive_Group_Mentions_Info": "Grup bahsetmelerini al", "Receive_Notification": "Bildirim Al", @@ -443,6 +442,7 @@ "reply": "yanıtla", "Reply_in_Thread": "Konu içinde cevapla", "Report": "Bildir", + "Report_reason_required": "Gerekçesi gerekiyor", "Required": "Gerekli", "Resend": "Yeniden yolla", "RESET": "Sifirla", diff --git a/app/i18n/locales/zh-CN.json b/app/i18n/locales/zh-CN.json index b59c2237506..14cc11e34f3 100644 --- a/app/i18n/locales/zh-CN.json +++ b/app/i18n/locales/zh-CN.json @@ -408,7 +408,6 @@ "Read_Only": "只读", "Read_only_hint": "只有频道所有者可以发送新消息", "Read_Receipt": "查看已读人员", - "Report_reason_required": "原因必填", "Receive_Group_Mentions": "接收群组提及", "Receive_Group_Mentions_Info": "接收@all和@here提及", "Receive_Notification": "接收通知", @@ -424,6 +423,7 @@ "reply": "回复", "Reply_in_Thread": "讨论串回覆", "Report": "举报", + "Report_reason_required": "原因必填", "Required": "必填", "Resend": "重新发送", "RESET": "重置", diff --git a/app/i18n/locales/zh-TW.json b/app/i18n/locales/zh-TW.json index 9263fa4bc90..98540ca2d74 100644 --- a/app/i18n/locales/zh-TW.json +++ b/app/i18n/locales/zh-TW.json @@ -425,7 +425,6 @@ "Read_Only": "唯讀", "Read_only_hint": "只有頻道所有者可以發送新消息", "Read_Receipt": "查看已讀人員", - "Report_reason_required": "需要原因", "Receive_Group_Mentions": "接收群組提及", "Receive_Group_Mentions_Info": "接收@all和@here提及", "Receive_Notification": "接收通知", @@ -442,6 +441,7 @@ "reply": "回覆", "Reply_in_Thread": "討論串回覆", "Report": "檢舉", + "Report_reason_required": "需要原因", "Required": "必填", "Resend": "重新發送", "RESET": "重置", From 2ed6574984ac0d7ebe2f55d0690913110dbb328b Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Thu, 24 Jul 2025 18:38:52 -0300 Subject: [PATCH 07/13] chore: useA11yErrorAnnouncement support multiple errors --- app/lib/hooks/useA11yErrorAnnouncement.tsx | 28 ++++++++++++---------- app/views/ProfileView/index.tsx | 4 +--- app/views/ReportUserView/index.tsx | 2 +- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/app/lib/hooks/useA11yErrorAnnouncement.tsx b/app/lib/hooks/useA11yErrorAnnouncement.tsx index bb50685ec63..5240c7d90b1 100644 --- a/app/lib/hooks/useA11yErrorAnnouncement.tsx +++ b/app/lib/hooks/useA11yErrorAnnouncement.tsx @@ -1,28 +1,32 @@ import { useRef } from 'react'; import { AccessibilityInfo } from 'react-native'; +import { FieldErrorsImpl } from 'react-hook-form'; import { useDebounce } from '../methods/helpers'; import { textInputDebounceTime } from '../constants'; interface IUseA11yErrorAnnouncement { - error: string | undefined; + errors: FieldErrorsImpl; } -const useA11yErrorAnnouncement = ({ error }: IUseA11yErrorAnnouncement) => { - const previousMessage = useRef(error); - const announced = useRef(false); - const shouldAnnounce = error && error !== previousMessage.current && !announced.current; +const useA11yErrorAnnouncement = ({ errors }: IUseA11yErrorAnnouncement) => { + const previousMessages = useRef>(errors); + const announced = useRef>({}); const handleA11yAnnouncement = useDebounce(() => { - if (shouldAnnounce) { - const message = (error || '').trim(); - if (message) { + Object.entries(errors).forEach(([fieldName, error]: [string, any]) => { + const message = error?.message?.trim(); + + if (message && message !== previousMessages.current[fieldName] && !announced.current[fieldName]) { AccessibilityInfo.announceForAccessibility(message); - announced.current = true; + announced.current[fieldName] = true; + previousMessages.current[fieldName] = message; + } + if (!message) { + announced.current[fieldName] = false; + delete previousMessages.current[fieldName]; } - } else if (!error) { - announced.current = false; - } + }); }, textInputDebounceTime); handleA11yAnnouncement(); diff --git a/app/views/ProfileView/index.tsx b/app/views/ProfileView/index.tsx index c8800a7eb31..7c4118b363c 100644 --- a/app/views/ProfileView/index.tsx +++ b/app/views/ProfileView/index.tsx @@ -254,9 +254,7 @@ const ProfileView = ({ navigation }: IProfileViewProps): React.ReactElement => { } }; - useA11yErrorAnnouncement({ error: errors.name?.message }); - useA11yErrorAnnouncement({ error: errors.username?.message }); - useA11yErrorAnnouncement({ error: errors.email?.message }); + useA11yErrorAnnouncement({ errors }); useLayoutEffect(() => { const options: NativeStackNavigationOptions = { diff --git a/app/views/ReportUserView/index.tsx b/app/views/ReportUserView/index.tsx index d1def5ae0ad..d34bfce93e8 100644 --- a/app/views/ReportUserView/index.tsx +++ b/app/views/ReportUserView/index.tsx @@ -56,7 +56,7 @@ const ReportUserView = () => { defaultValues: { description: '' } }); - useA11yErrorAnnouncement({ error: errors.description?.message }); + useA11yErrorAnnouncement({ errors }); useLayoutEffect(() => { navigation?.setOptions({ From 8b35d129218e28f7f2db6b673b9b5930d3a1244f Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Tue, 29 Jul 2025 17:41:20 -0300 Subject: [PATCH 08/13] fix: clean errors --- app/lib/hooks/useA11yErrorAnnouncement.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/lib/hooks/useA11yErrorAnnouncement.tsx b/app/lib/hooks/useA11yErrorAnnouncement.tsx index 5240c7d90b1..e3aa274f4a5 100644 --- a/app/lib/hooks/useA11yErrorAnnouncement.tsx +++ b/app/lib/hooks/useA11yErrorAnnouncement.tsx @@ -12,8 +12,14 @@ interface IUseA11yErrorAnnouncement { const useA11yErrorAnnouncement = ({ errors }: IUseA11yErrorAnnouncement) => { const previousMessages = useRef>(errors); const announced = useRef>({}); - const handleA11yAnnouncement = useDebounce(() => { + const hasError = Object.keys(errors).length; + if (!hasError) { + announced.current = {}; + previousMessages.current = {}; + return; + } + Object.entries(errors).forEach(([fieldName, error]: [string, any]) => { const message = error?.message?.trim(); From 3a130240a5dd333d459a42791425b9f10f16caa8 Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Wed, 30 Jul 2025 18:26:30 -0300 Subject: [PATCH 09/13] fix: translate inside of Component --- app/views/ProfileView/index.tsx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/views/ProfileView/index.tsx b/app/views/ProfileView/index.tsx index 7c4118b363c..09f24ed4e98 100644 --- a/app/views/ProfileView/index.tsx +++ b/app/views/ProfileView/index.tsx @@ -47,16 +47,17 @@ import useVerifyPassword from '../../lib/hooks/useVerifyPassword'; // https://github.com/RocketChat/Rocket.Chat/blob/174c28d40b3d5a52023ee2dca2e81dd77ff33fa5/apps/meteor/app/lib/server/functions/saveUser.js#L24-L25 const MAX_BIO_LENGTH = 260; const MAX_NICKNAME_LENGTH = 120; -const validationSchema = yup.object().shape({ - name: yup.string().required(I18n.t('Name_required')), - email: yup.string().email(I18n.t('Email_must_be_a_valid_email')).required(I18n.t('Email_required')), - username: yup.string().required(I18n.t('Username_required')) -}); interface IProfileViewProps { navigation: NativeStackNavigationProp; } const ProfileView = ({ navigation }: IProfileViewProps): React.ReactElement => { + const validationSchema = yup.object().shape({ + name: yup.string().required(I18n.t('Name_required')), + email: yup.string().email(I18n.t('Email_must_be_a_valid_email')).required(I18n.t('Email_required')), + username: yup.string().required(I18n.t('Username_required')) + }); + const { showActionSheet, hideActionSheet } = useActionSheet(); const { colors } = useTheme(); const dispatch = useDispatch(); From 1d7ff791a5e52541c770390c24048d6d9f226a19 Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Wed, 30 Jul 2025 18:35:09 -0300 Subject: [PATCH 10/13] fix: increase a11y announcement debounce time --- app/lib/constants/debounceConfig.ts | 1 + app/lib/hooks/useA11yErrorAnnouncement.tsx | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/lib/constants/debounceConfig.ts b/app/lib/constants/debounceConfig.ts index 0ccc51d4bde..9611896f428 100644 --- a/app/lib/constants/debounceConfig.ts +++ b/app/lib/constants/debounceConfig.ts @@ -1 +1,2 @@ export const textInputDebounceTime = 500; +export const accessibilityErrorAnnouncementDebounceTime = 1000; diff --git a/app/lib/hooks/useA11yErrorAnnouncement.tsx b/app/lib/hooks/useA11yErrorAnnouncement.tsx index e3aa274f4a5..f54a782218f 100644 --- a/app/lib/hooks/useA11yErrorAnnouncement.tsx +++ b/app/lib/hooks/useA11yErrorAnnouncement.tsx @@ -3,7 +3,7 @@ import { AccessibilityInfo } from 'react-native'; import { FieldErrorsImpl } from 'react-hook-form'; import { useDebounce } from '../methods/helpers'; -import { textInputDebounceTime } from '../constants'; +import { accessibilityErrorAnnouncementDebounceTime } from '../constants'; interface IUseA11yErrorAnnouncement { errors: FieldErrorsImpl; @@ -33,7 +33,7 @@ const useA11yErrorAnnouncement = ({ errors }: IUseA11yErrorAnnouncement) => { delete previousMessages.current[fieldName]; } }); - }, textInputDebounceTime); + }, accessibilityErrorAnnouncementDebounceTime); handleA11yAnnouncement(); }; From 6ed1f57309e23b77f8203d8db0b8499cd141741d Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Wed, 30 Jul 2025 19:08:31 -0300 Subject: [PATCH 11/13] chore: improve useA11yErrorAnnouncement --- app/lib/hooks/useA11yErrorAnnouncement.tsx | 26 +++++++++++----------- app/views/ProfileView/index.tsx | 5 +++-- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/app/lib/hooks/useA11yErrorAnnouncement.tsx b/app/lib/hooks/useA11yErrorAnnouncement.tsx index f54a782218f..6de61e307e3 100644 --- a/app/lib/hooks/useA11yErrorAnnouncement.tsx +++ b/app/lib/hooks/useA11yErrorAnnouncement.tsx @@ -5,34 +5,34 @@ import { FieldErrorsImpl } from 'react-hook-form'; import { useDebounce } from '../methods/helpers'; import { accessibilityErrorAnnouncementDebounceTime } from '../constants'; +type TFormValues = { + [key: string]: any; +}; + interface IUseA11yErrorAnnouncement { errors: FieldErrorsImpl; + inputValues: TFormValues; } -const useA11yErrorAnnouncement = ({ errors }: IUseA11yErrorAnnouncement) => { - const previousMessages = useRef>(errors); - const announced = useRef>({}); +const useA11yErrorAnnouncement = ({ errors, inputValues }: IUseA11yErrorAnnouncement) => { + const previousInputValues = useRef(inputValues); + const handleA11yAnnouncement = useDebounce(() => { const hasError = Object.keys(errors).length; + if (!hasError) { - announced.current = {}; - previousMessages.current = {}; + previousInputValues.current = inputValues; return; } Object.entries(errors).forEach(([fieldName, error]: [string, any]) => { const message = error?.message?.trim(); - - if (message && message !== previousMessages.current[fieldName] && !announced.current[fieldName]) { + if (message && inputValues[fieldName] !== previousInputValues.current[fieldName]) { AccessibilityInfo.announceForAccessibility(message); - announced.current[fieldName] = true; - previousMessages.current[fieldName] = message; - } - if (!message) { - announced.current[fieldName] = false; - delete previousMessages.current[fieldName]; } }); + + previousInputValues.current = inputValues; }, accessibilityErrorAnnouncementDebounceTime); handleA11yAnnouncement(); diff --git a/app/views/ProfileView/index.tsx b/app/views/ProfileView/index.tsx index 09f24ed4e98..3b32a8a8653 100644 --- a/app/views/ProfileView/index.tsx +++ b/app/views/ProfileView/index.tsx @@ -108,7 +108,8 @@ const ProfileView = ({ navigation }: IProfileViewProps): React.ReactElement => { }, resolver: yupResolver(validationSchema) }); - const newPassword = watch('newPassword') ?? ''; + const inputValues = watch(); + const newPassword = inputValues.newPassword || ''; const { isPasswordValid, passwordPolicies } = useVerifyPassword(newPassword, newPassword); const { parsedCustomFields } = useParsedCustomFields(Accounts_CustomFields); const [customFields, setCustomFields] = useState(user?.customFields ?? {}); @@ -255,7 +256,7 @@ const ProfileView = ({ navigation }: IProfileViewProps): React.ReactElement => { } }; - useA11yErrorAnnouncement({ errors }); + useA11yErrorAnnouncement({ errors, inputValues }); useLayoutEffect(() => { const options: NativeStackNavigationOptions = { From 3ec909b7cdb6727978bdfcbe0315631bddf60739 Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Wed, 30 Jul 2025 19:11:15 -0300 Subject: [PATCH 12/13] chore: code improvements --- app/lib/hooks/useA11yErrorAnnouncement.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/lib/hooks/useA11yErrorAnnouncement.tsx b/app/lib/hooks/useA11yErrorAnnouncement.tsx index 6de61e307e3..1962c3c760f 100644 --- a/app/lib/hooks/useA11yErrorAnnouncement.tsx +++ b/app/lib/hooks/useA11yErrorAnnouncement.tsx @@ -5,17 +5,17 @@ import { FieldErrorsImpl } from 'react-hook-form'; import { useDebounce } from '../methods/helpers'; import { accessibilityErrorAnnouncementDebounceTime } from '../constants'; -type TFormValues = { +type TInputValues = { [key: string]: any; }; interface IUseA11yErrorAnnouncement { errors: FieldErrorsImpl; - inputValues: TFormValues; + inputValues: TInputValues; } const useA11yErrorAnnouncement = ({ errors, inputValues }: IUseA11yErrorAnnouncement) => { - const previousInputValues = useRef(inputValues); + const previousInputValues = useRef(inputValues); const handleA11yAnnouncement = useDebounce(() => { const hasError = Object.keys(errors).length; From 39547597eb88c514c3634df1957483d4601d759c Mon Sep 17 00:00:00 2001 From: OtavioStasiak Date: Wed, 30 Jul 2025 19:15:04 -0300 Subject: [PATCH 13/13] chore: adjust report user view hook usage --- app/views/ReportUserView/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/ReportUserView/index.tsx b/app/views/ReportUserView/index.tsx index d34bfce93e8..e57a97b4edf 100644 --- a/app/views/ReportUserView/index.tsx +++ b/app/views/ReportUserView/index.tsx @@ -49,6 +49,7 @@ const ReportUserView = () => { const { control, handleSubmit, + watch, formState: { errors } } = useForm({ mode: 'onChange', @@ -56,7 +57,9 @@ const ReportUserView = () => { defaultValues: { description: '' } }); - useA11yErrorAnnouncement({ errors }); + const inputValues = watch(); + + useA11yErrorAnnouncement({ errors, inputValues }); useLayoutEffect(() => { navigation?.setOptions({