From ecf07ff64ab49d298834a5bd4e8ee97c11f8e915 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 17 Feb 2020 10:30:54 +0100 Subject: [PATCH] Account creation: wrongly hints that an email can be used to create an account (#941) --- CHANGES.md | 2 +- .../java/im/vector/riotx/features/login/LoginFragment.kt | 8 +++++++- vector/src/main/res/layout/fragment_login.xml | 4 ++-- vector/src/main/res/values-bg/strings.xml | 2 +- vector/src/main/res/values-de/strings.xml | 2 +- vector/src/main/res/values-eu/strings.xml | 2 +- vector/src/main/res/values-fi/strings.xml | 2 +- vector/src/main/res/values-fr/strings.xml | 2 +- vector/src/main/res/values-hu/strings.xml | 2 +- vector/src/main/res/values-it/strings.xml | 2 +- vector/src/main/res/values-sq/strings.xml | 2 +- vector/src/main/res/values-zh-rTW/strings.xml | 2 +- vector/src/main/res/values/strings.xml | 2 +- vector/src/main/res/values/strings_riotX.xml | 4 +--- 14 files changed, 21 insertions(+), 17 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3e771a79d4..aa353fe633 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,7 +9,7 @@ Improvements 🙌: - Bugfix 🐛: - - + - Account creation: wrongly hints that an email can be used to create an account (#941) Translations 🗣: - diff --git a/vector/src/main/java/im/vector/riotx/features/login/LoginFragment.kt b/vector/src/main/java/im/vector/riotx/features/login/LoginFragment.kt index 93b1b1b525..3e45eeb406 100644 --- a/vector/src/main/java/im/vector/riotx/features/login/LoginFragment.kt +++ b/vector/src/main/java/im/vector/riotx/features/login/LoginFragment.kt @@ -40,7 +40,7 @@ import javax.inject.Inject /** * In this screen, in signin mode: - * - the user is asked for login and password to sign in to a homeserver. + * - the user is asked for login (or email) and password to sign in to a homeserver. * - He also can reset his password * In signup mode: * - the user is asked for login and password @@ -97,6 +97,12 @@ class LoginFragment @Inject constructor() : AbstractLoginFragment() { SignMode.SignIn -> R.string.login_connect_to } + loginFieldTil.hint = getString(when (state.signMode) { + SignMode.Unknown -> error("developer error") + SignMode.SignUp -> R.string.login_signup_username_hint + SignMode.SignIn -> R.string.login_signin_username_hint + }) + when (state.serverType) { ServerType.MatrixOrg -> { loginServerIcon.isVisible = true diff --git a/vector/src/main/res/layout/fragment_login.xml b/vector/src/main/res/layout/fragment_login.xml index fb445dfb89..3f2443440e 100644 --- a/vector/src/main/res/layout/fragment_login.xml +++ b/vector/src/main/res/layout/fragment_login.xml @@ -50,8 +50,8 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="32dp" - android:hint="@string/login_signup_username_hint" - app:errorEnabled="true"> + app:errorEnabled="true" + tools:hint="@string/login_signin_username_hint"> Телефонния номер изглежда невалиден. Моля проверете го Регистрация в %1$s - Потребителско име или имейл + Потребителско име или имейл Парола Напред Това потребителско име е заето diff --git a/vector/src/main/res/values-de/strings.xml b/vector/src/main/res/values-de/strings.xml index fe059320d3..6c3ad4e84e 100644 --- a/vector/src/main/res/values-de/strings.xml +++ b/vector/src/main/res/values-de/strings.xml @@ -1941,7 +1941,7 @@ Wenn du diese neue Wiederherstellungsmethode nicht eingerichtet hast, kann ein A Wir haben einen Code an %1$s gesendet. Gib diesen unten ein um dich zu verifizieren. Code eingeben Erneut senden - Benutzername oder E-Mail-Adresse + Benutzername oder E-Mail-Adresse Passwort Dieser Benutzername ist bereits belegt Dein Benutzerkonto ist noch nicht erstellt. diff --git a/vector/src/main/res/values-eu/strings.xml b/vector/src/main/res/values-eu/strings.xml index 91432ac66e..86fb1e0e12 100644 --- a/vector/src/main/res/values-eu/strings.xml +++ b/vector/src/main/res/values-eu/strings.xml @@ -1909,7 +1909,7 @@ Abisua: Fitxategi hau ezabatu daiteke aplikazioa desinstalatzen bada. Telefono zenbakia baliogabea dirudi. Egiaztatu ezazu Erregistratu %1$s zerbitzarian - Erabiltzaile-izena edo e-maila + Erabiltzaile-izena edo e-maila Pasahitza Hurrengoa Erabiltzaile-izen hori hartuta dago diff --git a/vector/src/main/res/values-fi/strings.xml b/vector/src/main/res/values-fi/strings.xml index 4966a5ea6a..fef747d546 100644 --- a/vector/src/main/res/values-fi/strings.xml +++ b/vector/src/main/res/values-fi/strings.xml @@ -1962,7 +1962,7 @@ Jotta et menetä mitään, automaattiset päivitykset kannattaa pitää käytös Puhelinnumero vaikuttaa epäkelvolta. Tarkista numero Rekisteröidy palvelimelle %1$s - Käyttäjätunnus tai sähköpostiosoite + Käyttäjätunnus tai sähköpostiosoite Salasana Seuraava Käyttäjätunnus on varattu diff --git a/vector/src/main/res/values-fr/strings.xml b/vector/src/main/res/values-fr/strings.xml index 86547b02fd..959266b9b7 100644 --- a/vector/src/main/res/values-fr/strings.xml +++ b/vector/src/main/res/values-fr/strings.xml @@ -1918,7 +1918,7 @@ Si vous n’avez pas configuré de nouvelle méthode de récupération, un attaq Le numéro de téléphone n’a pas l’air d’être valide. Veuillez le vérifier S’inscrire sur %1$s - Nom d’utilisateur ou e-mail + Nom d’utilisateur ou e-mail Mot de passe Suivant Ce nom d’utilisateur est déjà pris diff --git a/vector/src/main/res/values-hu/strings.xml b/vector/src/main/res/values-hu/strings.xml index 4598e445fa..64eee79075 100644 --- a/vector/src/main/res/values-hu/strings.xml +++ b/vector/src/main/res/values-hu/strings.xml @@ -1913,7 +1913,7 @@ Ha nem te állítottad be a visszaállítási metódust, akkor egy támadó pró A telefonszám érvénytelennek látszik. Kérlek ellenőrizd Bejelentkezés ide: %1$s - Felhasználónév vagy e-mail + Felhasználónév vagy e-mail Jelszó Következő A felhasználónév már használatban van diff --git a/vector/src/main/res/values-it/strings.xml b/vector/src/main/res/values-it/strings.xml index 6c10f7b04f..4d1ac8edaf 100644 --- a/vector/src/main/res/values-it/strings.xml +++ b/vector/src/main/res/values-it/strings.xml @@ -1963,7 +1963,7 @@ Il numero di telefono non sembra valido. Ricontrollalo Registrati su %1$s - Nome utente o email + Nome utente o email Password Avanti Quel nome utente esiste già diff --git a/vector/src/main/res/values-sq/strings.xml b/vector/src/main/res/values-sq/strings.xml index 397a245289..a8af77d59b 100644 --- a/vector/src/main/res/values-sq/strings.xml +++ b/vector/src/main/res/values-sq/strings.xml @@ -1871,7 +1871,7 @@ Që të garantoni se s’ju shpëton gjë, thjesht mbajeni të aktivizuar mekani Numri i telefonit duket se është i vlefshëm. Ju lutemi, kontrollojeni Regjistrohuni te %1$s - Emër përdoruesi ose email + Emër përdoruesi ose email Fjalëkalim Pasuesi Ai emër përdoruesi është i zënë diff --git a/vector/src/main/res/values-zh-rTW/strings.xml b/vector/src/main/res/values-zh-rTW/strings.xml index 9e36a2ec3a..d285c364b2 100644 --- a/vector/src/main/res/values-zh-rTW/strings.xml +++ b/vector/src/main/res/values-zh-rTW/strings.xml @@ -1866,7 +1866,7 @@ Matrix 中的消息可見度類似于電子郵件。我們忘記您的郵件意 電話號碼似乎無效。請檢查 註冊至 %1$s - 使用者名稱或電子郵件 + 使用者名稱或電子郵件 密碼 下一個 使用者名稱已被使用 diff --git a/vector/src/main/res/values/strings.xml b/vector/src/main/res/values/strings.xml index 7693bc8cee..29fff11230 100644 --- a/vector/src/main/res/values/strings.xml +++ b/vector/src/main/res/values/strings.xml @@ -1912,7 +1912,7 @@ Not all features in Riot are implemented in RiotX yet. Main missing (and coming Sign up to %1$s - Username or email + Username or email Password Next That username is taken diff --git a/vector/src/main/res/values/strings_riotX.xml b/vector/src/main/res/values/strings_riotX.xml index 15fd002e89..6f2af1e7ac 100644 --- a/vector/src/main/res/values/strings_riotX.xml +++ b/vector/src/main/res/values/strings_riotX.xml @@ -23,9 +23,7 @@ Remove… - - - + Username