Disallow non-digits when entering username discriminator.

This commit is contained in:
Greyson Parrelli
2026-09-09 16:44:24 -04:00
committed by Cody Henthorne
parent faa7c4b8bb
commit 0db0e56c30
74 changed files with 60 additions and 149 deletions
@@ -437,7 +437,6 @@ private fun AddUsernameState.ValidationError.message(): String = when (this) {
AddUsernameState.ValidationError.NOT_AVAILABLE -> stringResource(R.string.AddUsernameScreen__this_username_is_not_available)
AddUsernameState.ValidationError.DISCRIMINATOR_TOO_SHORT -> stringResource(R.string.AddUsernameScreen__enter_a_minimum_of_d_digits, UsernameUtil.MIN_DISCRIMINATOR_LENGTH)
AddUsernameState.ValidationError.DISCRIMINATOR_TOO_LONG -> stringResource(R.string.AddUsernameScreen__enter_a_maximum_of_d_digits, UsernameUtil.MAX_DISCRIMINATOR_LENGTH)
AddUsernameState.ValidationError.DISCRIMINATOR_INVALID_CHARACTERS -> stringResource(R.string.AddUsernameScreen__numbers_can_only_contain_digits)
AddUsernameState.ValidationError.DISCRIMINATOR_CANNOT_BE_00 -> stringResource(R.string.AddUsernameScreen__this_number_cant_be_00)
AddUsernameState.ValidationError.DISCRIMINATOR_CANNOT_START_WITH_ZERO -> stringResource(R.string.AddUsernameScreen__this_number_cant_start_with_0)
AddUsernameState.ValidationError.DISCRIMINATOR_NOT_AVAILABLE -> stringResource(R.string.AddUsernameScreen__this_username_is_not_available_try_another_number)
@@ -50,7 +50,6 @@ data class AddUsernameState(
DISCRIMINATOR_TOO_SHORT,
DISCRIMINATOR_TOO_LONG,
DISCRIMINATOR_INVALID_CHARACTERS,
DISCRIMINATOR_CANNOT_BE_00,
DISCRIMINATOR_CANNOT_START_WITH_ZERO,
@@ -119,19 +119,22 @@ class AddUsernameViewModel(
}
/**
* A blank discriminator hands control back to the service, matching the behavior of clearing the field in the app's
* username editor.
* Non-digits are dropped as they're typed, since a discriminator can only ever be digits. A blank discriminator hands
* control back to the service, matching the behavior of clearing the field in the app's username editor.
*/
private fun applyDiscriminatorChanged(state: AddUsernameState, discriminator: String, stateEmitter: (AddUsernameState) -> Unit) {
if (discriminator == state.discriminator) {
val digitsOnly = discriminator.filter { it in '0'..'9' }
val isUserSet = digitsOnly.isNotEmpty()
if (digitsOnly == state.discriminator || (discriminator.isNotEmpty() && digitsOnly.isEmpty())) {
return
}
reserveJob?.cancel()
val updated = state.copy(
discriminator = discriminator,
isDiscriminatorUserSet = discriminator.isNotBlank(),
discriminator = digitsOnly,
isDiscriminatorUserSet = isUserSet,
validationError = null,
reservation = null,
isReserving = false
@@ -308,13 +311,16 @@ class AddUsernameViewModel(
}
private fun checkDiscriminator(discriminator: String): AddUsernameState.ValidationError? {
return when (UsernameUtil.checkDiscriminator(discriminator)) {
return when (val reason = UsernameUtil.checkDiscriminator(discriminator)) {
null -> null
UsernameUtil.InvalidReason.TOO_SHORT -> AddUsernameState.ValidationError.DISCRIMINATOR_TOO_SHORT
UsernameUtil.InvalidReason.TOO_LONG -> AddUsernameState.ValidationError.DISCRIMINATOR_TOO_LONG
UsernameUtil.InvalidReason.INVALID_NUMBER_00 -> AddUsernameState.ValidationError.DISCRIMINATOR_CANNOT_BE_00
UsernameUtil.InvalidReason.INVALID_NUMBER_PREFIX_0 -> AddUsernameState.ValidationError.DISCRIMINATOR_CANNOT_START_WITH_ZERO
else -> AddUsernameState.ValidationError.DISCRIMINATOR_INVALID_CHARACTERS
else -> {
Log.w(TAG, "Unexpected discriminator validation failure: $reason")
AddUsernameState.ValidationError.DISCRIMINATOR_NOT_AVAILABLE
}
}
}
}
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Ongeldige gebruikernaam, voer \'n minimum van %1$d syfers in.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Ongeldige gebruikersnaam, voer \'n maksimum van %1$d syfers in.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Ongeldige gebruikersnaam, nommers mag slegs syfers bevat.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Hierdie nommer kan nie 00 wees nie. Voer \'n syfer tussen 1 en 9 in</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -733,8 +733,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">اسم مُستخدِم غير صحيح. أدخِل %1$d رمز (رموز) كحد أدنى.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">اسم مُستخدِم غير صحيح. أدخِل %1$d رمز (رموز) كحد أقصى.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">اسم المُستخدِم غير صالح، يجب أن تحتوي الأرقام على خانات رقمية فقط.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">لا يُمكن لهذا الرقم أن يكون 00. أدخِل رقمًا بين 1 –9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Səhv istifadəçi adı, minimum %1$d rəqəm daxil edin.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Səhv istifadəçi adı, maksimum %1$d rəqəm daxil edin.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Etibarsız istifadəçi adı, yalnız rəqəmlərdən ibarət ola bilər.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Bu nömrə 00 şəklində ola bilməz. 19 arası bir rəqəm daxil edin</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -729,8 +729,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Несапраўднае імя карыстальніка, трэба ўвесці мінімум %1$d лічбаў.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Несапраўднае імя карыстальніка, трэба ўвесці максімум %1$d лічбаў.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Несапраўднае імя карыстальніка, лікі могуць змяшчаць толькі лічбы.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Гэты лік не можа быць 00. Увядзіце лічбу ад 1 да 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Невалидно потребителско име, въведете най-малко %1$d цифри.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Невалидно потребителско име, въведете най-много %1$d цифри.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Невалидно потребителско име, числата могат да съдържат само цифри.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Този номер не може да бъде 00. Въведете цифра между 1–9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">অকার্যকর ব্যবহারকারীর নাম, অন্তত %1$d-টি সংখ্যা লিখুন।</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">অকার্যকর ব্যবহারকারীর নাম, অন্তত %1$d-টি সংখ্যা লিখুন।</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">অকার্যকর ব্যবহারকারীর নাম, সংখ্যায় শুধুমাত্র ডিজিট থাকতে পারে।</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">এই সংখ্যাটি 00 হতে পারবে না। 1–9-এর মধ্যে একটি সংখ্যা লিখুন</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -729,8 +729,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Nevažeće korisničko ime, unesite najmanje %1$d cifre.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Nevažeće korisničko ime, unesite najviše %1$d cifri.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Nevažeće korisničko ime, brojevi mogu sadržavati samo cifre.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Ovaj broj ne može biti 00. Unesite brojku između 1-9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Àlies no vàlid, introdueix %1$d dígits com a mínim.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Àlies no vàlid, introdueix %1$d dígits com a màxim.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Àlies no vàlid, els números només poden contenir dígits.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">El número no pot ser 00. Introdueix un dígit entre 1 i 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -729,8 +729,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Neplatné uživatelské jméno  zadejte alespoň %1$d číslic.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Neplatné uživatelské jméno  zadejte nejvýše %1$d číslic.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Neplatné uživatelské jméno, čísla musí obsahovat pouze číslice.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Toto číslo nesmí být 00. Zadejte číslici od 1 do 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Ugyldigt brugernavn, angiv min. %1$d cifre.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Ugyldigt brugernavn, angiv maks. %1$d cifre.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Ugyldigt brugernavn, numre kan kun indeholde cifre.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Dette nummer må ikke være 00. Angiv et tal mellem 1-9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Ungültiger Nutzername, bitte gib mindestens %1$d Ziffern ein.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Ungültiger Nutzername, bitte gib maximal %1$d Ziffern ein.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Ungültiger Nutzername, Nummern dürfen nur Ziffern enthalten.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Diese Nummer darf nicht 00 sein. Verwende eine andere Zahl von 1 bis 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Μη έγκυρο όνομα χρήστη, γράψε τουλάχιστον %1$d ψηφία.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Μη έγκυρο όνομα χρήστη, γράψε έως %1$d ψηφία.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Το όνομα χρήστη δεν είναι έγκυρο, οι αριθμοί μπορούν να περιέχουν μόνο ψηφία.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Αυτός ο αριθμός δεν μπορεί να είναι 00. Γράψε ένα ψηφίο μεταξύ 1–9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Alias no válido. Ingresa un mínimo de %1$d dígitos.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Alias no válido. Ingresa un máximo de %1$d dígitos.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Alias no válido. Los números solo pueden contener dígitos.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Este número no puede ser 00. Introduce un dígito del 1 al 9.</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Kehtetu kasutajanimi, sisesta vähemalt %1$d tähemärki.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Kehtetu kasutajanimi, sisesta maksimaalselt %1$d tähemärki.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Vale kasutajanimi, lubatud on vaid numbrid.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">See number ei saa olla 00. Sisesta number vahemikus 19</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Erabiltzaile-izenak ez du balio; idatzi gutxienez %1$d digitu.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Erabiltzaile-izenak ez du balio; idatzi gehienez %1$d digitu.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Erabiltzaile-izen okerra; zenbakiek digituak bakarrik izan ditzakete.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Zenbaki hau ezin da 00 izan. Idatzi 1 eta 9 arteko digitu bat</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">نام کاربری نامعتبر است، حداقل %1$d رقم وارد کنید.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">نام کاربری نامعتبر است، حداکثر %1$d رقم وارد کنید.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">نام کاربری نامعتبر است، اعداد فقط می‌توانند شامل ارقام باشند.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">این عدد نمی‌تواند ۰۰ باشد. رقمی بین ۱ تا ۹ انتخاب کنید</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Virheellinen käyttäjänimi, anna vähintään %1$d numeroa.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Virheellinen käyttäjänimi, anna vähintään %1$d numeroa.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Virheellinen käyttäjänimi. Merkkijono voi sisältää vain numeroita.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Numero ei voi olla 00. Anna numero väliltä 19</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Nom d\'utilisateur incorrect. Veuillez saisir au moins %1$d chiffres.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Nom d\'utilisateur incorrect. Veuillez saisir %1$d chiffres maximum.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Nom d\'utilisateur non valide. Vous ne pouvez saisir que des chiffres.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Ce chiffre ne peut pas être 00. Il doit être compris entre 1 et 9.</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -731,8 +731,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Ainm úsáideora neamhbhailí, cuir isteach íoslíon digití %1$d.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Ainm úsáideora neamhbhailí, cuir isteach uaslíon digití %1$d.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Ainm úsáideora neamhbhailí, ní féidir ach digití a bheith in uimhreacha.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Ní féidir 00 a úsáid mar uimhir. Cuir isteach digit idir 1 agus 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Nome de usuario non válido, insire un mínimo de %1$d díxitos.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Nome de usuario non válido, insire un máximo de %1$d díxitos.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Nome de usuario non válido, os números deben conter só díxitos.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Este número non pode ser 00. Insire un número entre 1 e 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">અમાન્ય યુઝરનેમ, ઓછામાં ઓછા %1$d અંકો દાખલ કરો.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">અમાન્ય યુઝરનેમ, વધુમાં વધુ %1$d અંકો દાખલ કરો.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">અમાન્ય યુઝરનેમ, સંખ્યામાં ફક્ત અંક જ હોવા જોઈએ.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">આ નંબર 00 ન હોઈ શકે. 1-9ની વચ્ચેનો અંક દાખલ કરો</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">यूज़रनेम सही नहीं है, कम से कम %1$d डिजिट होने चाहिए।</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">यूज़रनेम सही नहीं है, ज़्यादा से ज़्यादा %1$d डिजिट होने चाहिए।</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">यूज़रनेम गलत है, नंबर में सिर्फ़ अंक होने चाहिए।</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">यह संख्या 00 नहीं हो सकती। 1-9 के बीच का कोई डिजिट डालें</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -729,8 +729,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Korisničko ime nije valjano, unesite najmanje %1$d znamenke.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Korisničko ime nije valjano, unesite najmanje %1$d znamenki.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Nevažeće korisničko ime, brojčani niz ne može sadržavati nijednu drugu vrstu znakova.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Broj ne može biti 00. Unesite znamenku od 1 do 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Érvénytelen felhasználónév, adj meg legalább %1$d számjegyet.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Érvénytelen felhasználónév, legfeljebb %1$d számjegyet adj meg.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Érvénytelen felhasználónév, a számok csak számjegyeket tartalmazhatnak.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Ez a szám nem lehet 00. Írj be egy számjegyet 1 és 9 között</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Nama pengguna tidak valid, masukkan minimal %1$d digit.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Nama pengguna tidak valid, masukkan maksimal %1$d digit.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Nama pengguna tidak valid. Bagian nomor hanya boleh berisi angka.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Nomor tidak boleh 00. Masukkan angka antara 19</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Nome utente non valido, inserisci almeno %1$d caratteri.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Nome utente non valido, inserisci al massimo %1$d caratteri.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Nome utente non valido: i numeri possono includere solo cifre.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Questo numero non può essere 00. Inserisci una cifra tra 1-9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -729,8 +729,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">שם משתמש לא חוקי, יש להזין לפחות %1$d ספרות.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">שם משתמש לא חוקי, יש להזין עד %1$d ספרות.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">שם משתמש לא חוקי, מספרים יכולים להכיל ספרות בלבד.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">המספר הזה לא יכול להיות 00. יש להזין ספרה בין 9–1</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">ユーザーネームが無効です。数字は%1$d以上入力してください。</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">ユーザーネームが無効です。入力できる数字は、最大で%1$d桁までです。</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">ユーザーネームが無効です。数字のみ入力できます。</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">この数字を00にすることはできません。1–9の数字を入力してください</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">მომხმარებლის სახელი არასწორია, შეიყვანე მინიმუმ %1$d ციფრი.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">მომხმარებლის სახელი არასწორია, შეიყვანე მინიმუმ %1$d ციფრი.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">არასწორი მომხმარებლის სახელი, რიცხვები მხოლოდ ციფრებს შეიძლება შეიცავდნენ.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">ეს რიცხვი ვერ იქნება 00. შეიყვანე ციფრი 1–9-მდე</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Пайдаланушы аты дұрыс емес, кемінде %1$d сан енгізіңіз.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Пайдаланушы аты дұрыс емес, ең көбі %1$d сан енгізіңіз.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Пайдаланушы аты дұрыс емес, нөмірлерде тек цифрлар болуы керек.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Бұл нөмір 00 болмауы керек. 1 және 9 аралығындағы санды енгізіңіз</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">ឈ្មោះអ្នកប្រើមិនត្រឹមត្រូវ។ សូមបញ្ចូលលេខយ៉ាងតិចបំផុត %1$d ខ្ទង់។</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">ឈ្មោះអ្នកប្រើមិនត្រឹមត្រូវ។ សូមបញ្ចូលលេខយ៉ាងច្រើនបំផុត %1$d ខ្ទង់។</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">ឈ្មោះអ្នកប្រើមិនត្រឹមត្រូវ សម្រាប់លេខអាចវាយបញ្ចូលបានតែលេខប៉ុណ្ណោះ។</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">លេខនេះមិនអាចជា 00 ទេ។ បញ្ចូលលេខមួយខ្ទង់ចន្លោះពី 1–9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">ಅಮಾನ್ಯ ಯೂಸರ್‌ನೇಮ್, ಕನಿಷ್ಠ %1$d ಅಂಕಿಗಳನ್ನು ನಮೂದಿಸಿ.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">ಅಮಾನ್ಯ ಯೂಸರ್‌ನೇಮ್, ಗರಿಷ್ಠ %1$d ಅಂಕಿಗಳನ್ನು ನಮೂದಿಸಿ.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">ಅಮಾನ್ಯ ಯೂಸರ್‌ನೇಮ್‌, ಸಂಖ್ಯೆಗಳು ಅಂಕಿಗಳನ್ನು ಮಾತ್ರ ಒಳಗೊಂಡಿರಬೇಕು.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">ಈ ಸಂಖ್ಯೆ 00 ಆಗಿರುವಂತಿಲ್ಲ. 1-9 ರ ನಡುವಿನ ಅಂಕಿಯನ್ನು ನಮೂದಿಸಿ</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">잘못된 사용자 이름입니다. %1$d자 이상으로 입력해 주세요.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">잘못된 사용자 이름입니다. %1$d자 이하로 입력해 주세요.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">잘못된 사용자 이름입니다. 숫자는 숫자(0-9)로만 입력해 주세요.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">00은 일련번호로 사용할 수 없습니다. 1~9 중 하나를 입력하세요.</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Колдонуучунун аты жарабайт, кеминде %1$d сан киргизиңиз.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Колдонуучунун аты жарабайт, сандар %1$d ашпашы керек.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Колдонуучунун аты туура эмес, сандар сандардан гана турушу керек.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Бул номер 00 болбошу керек. 1-9 чейин сан киргизиңиз</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -729,8 +729,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Netinkamas naudotojo vardas, įveskite bent %1$d skaitmenis.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Netinkamas naudotojo vardas, įveskite daugiausia %1$d skaitmenų.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Negaliojantis naudotojo vardas, numerius gali sudaryti tik skaičiai.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Šis skaičius negali būti 00. Įvesk skaitmenį nuo 1 iki 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -727,8 +727,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Nederīgs lietotājvārds. Ievadiet vismaz %1$d skaitļus.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Nederīgs lietotājvārds. Ievadiet ne vairāk kā %1$d skaitļus.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Nederīgs lietotājvārds, skaitliskajā daļā drīkst būt tikai cipari.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Šis numurs nedrīkst būt 00. Ievadiet ciparu no 1 līdz 9.</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Неважечко корисничко име, внесете најмалку %1$d знаци.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Неважечко корисничко име, внесете најмногу %1$d знаци.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Неважечко корисничко име, бројките можат да бидат само цифри.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Овој број не може да биде 00. Внесете цифра од 1 до 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">ഉപയോക്തൃനാമം അസാധുവാണ്, കുറഞ്ഞത് %1$d അക്കങ്ങൾ നൽകുക.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">ഉപയോക്തൃനാമം അസാധുവാണ്, പരമാവധി %1$d അക്കങ്ങൾ നൽകുക.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">അസാധുവായ ഉപയോക്തൃനാമം, നമ്പറുകളിൽ അക്കങ്ങൾ മാത്രമേ ഉണ്ടാകാവൂ.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">ഈ സംഖ്യ 00 ആകാൻ പാടില്ല. 1-നും 9-നും ഇടയിലുള്ള ഒരു അക്കം നൽകുക</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">अवैध वापरकर्ता नाव, कमीत कमी %1$d अंक प्रविष्ट करा.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">अवैध वापरकर्ता नाव, कमाल %1$d अंक प्रविष्ट करा.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">अवैध वापरकर्ता नाव, संख्यांमध्ये फक्त अंक असू शकतात.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">हा क्रमांक 00 असू शकत नाही. 1–9 मधील अंक प्रविष्ट करा</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Nama pengguna tidak sah, masukkan sekurang-kurangnya %1$d digit.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Nama pengguna tidak sah, masukkan maksimum %1$d digit.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Nama pengguna tidak sah, nombor hanya boleh mengandungi digit.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Nombor ini tidak boleh 00. Masukkan digit antara 19</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">သုံးစွဲသူအမည် မမှန်ကန်ပါ၊ အနည်းဆုံး ဂဏန်း %1$d လုံး ရိုက်ထည့်ပါ။</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">သုံးစွဲသူအမည် မမှန်ကန်ပါ၊ အများဆုံး ဂဏန်း %1$d လုံး ရိုက်ထည့်ပါ။</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">အသုံးပြုသူအမည် မမှန်ကန်ပါ၊ နံပါတ်များတွင် ဂဏန်းများသာ ထည့်နိုင်ပါသည်။</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">ဤနံပါတ်သည် 00 ဖြစ်၍မရပါ။ 1–9 ကြား ကိန်းဂဏန်းတစ်ခု ရိုက်ထည့်ပါ</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Ugyldig brukernavn. Angi minst %1$d tegn.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Ugyldig brukernavn. Angi maks. %1$d tegn.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Ugyldig brukernavn, nummer kan kun bestå av tall.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Dette tallet kan ikke være 00. Angi et tall mellom 1 og 9.</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Ongeldige gebruikersnaam, voer minimaal %1$d cijfers in.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Ongeldige gebruikersnaam, voer maximaal %1$d cijfers in.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Ongeldige gebruikersnaam. De cijfercombinatie kan alleen uit cijfers bestaan.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Dit nummer kan niet 00 zijn. Voer een cijfer tussen 1-9 in</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">ਵਰਤੋਂਕਾਰ ਨਾਂ ਅਵੈਧ ਹੈ, ਘੱਟ ਤੋਂ ਘੱਟ %1$d ਅੰਕ ਦਰਜ ਕਰੋ।</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">ਵਰਤੋਂਕਾਰ ਨਾਂ ਅਵੈਧ ਹੈ, ਵੱਧ ਤੋਂ ਵੱਧ %1$d ਅੰਕ ਦਰਜ ਕਰੋ।</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">ਵਰਤੋਂਕਾਰ ਨਾਂ ਅਵੈਧ ਹੈ, ਨੰਬਰਾਂ ਵਿੱਚ ਸਿਰਫ਼ ਅੰਕ ਹੀ ਹੋ ਸਕਦੇ ਹਨ।</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">ਇਹ ਨੰਬਰ 00 ਨਹੀਂ ਹੋ ਸਕਦਾ। 1–9 ਵਿਚਕਾਰ ਕੋਈ ਅੰਕ ਦਰਜ ਕਰੋ</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -729,8 +729,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Nieprawidłowa nazwa użytkownika. Podaj co najmniej %1$d cyfry.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Nieprawidłowa nazwa użytkownika. Podaj maksymalnie %1$d cyfr.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Nieprawidłowa nazwa użytkownika. Numery mogą zawierać tylko cyfry.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Nie możesz wybrać cyfr 00. Podaj cyfrę od 1 do 9.</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Nome de usuário inválido, insira no mínimo %1$d dígitos.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Nome de usuário inválido, insira no mínimo %1$d dígitos.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Nome de usuário inválido. Os números podem conter apenas dígitos.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Este número não pode ser 00. Insira um dígito entre 1-9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Nome de utilizador inválido, insira um mínimo de %1$d dígitos.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Nome de utilizador inválido, insira um máximo de %1$d dígitos.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Nome de utilizador inválido, os números só podem conter dígitos.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Este número não pode ser 00. Introduza um algarismo entre 1 e 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -727,8 +727,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Nume de utilizator nevalid, introdu minimum %1$d cifre.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Nume de utilizator nevalid, introdu maximum %1$d cifre.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Nume de utilizator invalid, numerele pot conține doar cifre.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Acest număr nu poate fi 00. Introdu o cifră între 19</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -729,8 +729,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Неверное имя пользователя, введите минимум %1$d цифры.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Неверное имя пользователя, введите максимум %1$d цифр.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Неверное имя пользователя, числа могут содержать только цифры.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Этот номер не может быть 00. Введите цифру от 1 до 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -729,8 +729,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Neplatné používateľské meno, zadajte minimálne %1$d číslice.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Neplatné používateľské meno, zadajte maximálne %1$d číslic.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Neplatné používateľské meno, čísla môžu obsahovať iba číslice.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Toto číslo nemôže byť 00. Zadajte číslicu medzi 19</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -729,8 +729,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Neveljavno uporabniško ime, vnesite najmanj %1$d števk.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Neveljavno uporabniško ime, vnesite največ %1$d števk.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Neveljavno uporabniško ime, številke lahko vsebujejo samo števke.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Ta številka ne sme biti 00. Vnesite številko med 1 in 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Emri i pavlefshëm përdoruesi, vendos minimumi %1$d shifra.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Emri i pavlefshëm përdoruesi, vendos miksimumi %1$d shifra.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Emri i përdoruesit është i pavlefshëm; numrat mund të përmbajnë vetëm shifra.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Numri nuk mund të jetë 00. Vendos një shifër nga 1-9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Неважеће корисничко име – унесите најмање %1$d цифре.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Неважеће корисничко име – унесите највише %1$d цифара.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Неважеће корисничко име, бројеви се могу састојати само од цифара.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Овај број не може бити 00. Унесите цифру од 1 до 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Ogiltigt användarnamn. Ange minst %1$d siffror.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Ogiltigt användarnamn. Ange högst %1$d siffror.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Ogiltigt användarnamn siffervärdet får bara innehålla siffror.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Det här numret kan inte vara 00. Ange en siffra mellan 19</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Jina la mtumiaji lisilo sahihi, weka tarakimu zisizopungua %1$d.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Jina la mtumiaji lisilo sahihi, weka tarakimu zisizozidi %1$d.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Jina la Mtumiaji si sahihi, namba zinapaswa kuwa na tarakimu tu.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Nambari hii haiwezi kuwa 00. Ingiza tarakimu kati ya 19</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">தவறான பயனர் பெயர், குறைந்தபட்சம் %1$d இலக்கங்களை உள்ளிடவும்.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">தவறான பயனர் பெயர், அதிகபட்சம் %1$d இலக்கங்களை உள்ளிடவும்.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">தவறான பயனர் பெயர், எண்களில் இலக்கங்கள் மட்டுமே இருக்க வேண்டும்.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">இந்த எண் 00 ஆக இருக்கக் கூடாது. 1–9 க்கு இடையேயுள்ள ஒரு எண்ணை உள்ளிடவும்</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">యూజర్‌నేమ్ చెల్లుబాటు కాదు, కనీసం %1$d అంకెలను ఎంటర్ చేయండి.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">యూజర్‌నేమ్ చెల్లుబాటు కాదు, గరిష్టంగా %1$d అంకెలను ఎంటర్ చేయండి.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">చెల్లని యూజర్‌నేమ్, సంఖ్యల్లో అంకెలు మాత్రమే ఉండాలి.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">ఈ నంబర్ 00 గా ఉండకూడదు. 1–9 మధ్య అంకెను ఎంటర్ చేయండి</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">ชื่อผู้ใช้ไม่ถูกต้อง ต้องกรอกตัวเลขอย่างน้อย %1$d หลัก</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">ชื่อผู้ใช้ไม่ถูกต้อง ต้องกรอกตัวเลขไม่เกิน %1$d หลัก</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">รูปแบบชื่อผู้ใช้ไม่ถูกต้อง ตัวเลขต้องเป็น 0-9 เท่านั้น</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">ไม่สามารถใช้ตัวเลข 00 ได้ โปรดกรอกตัวเลข 1–9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Invalid username, maglagay ng minimum na %1$d digits.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Invalid username, maglagay ng maximum na %1$d digits.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Hindi valid ang username, ang numbers ay maaari lamang maglaman ng digits.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Hindi pwedeng 00 ang number na ito. Maglagay ng number mula 19</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Geçersiz kullanıcı adı, minimum %1$d hane gir.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Geçersiz kullanıcı adı, maksimum %1$d hane gir.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Geçersiz kullanıcı adı; sayılar yalnızca rakamlardan oluşabilir.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Bu sayı 00 olamaz. 1-9 arasında bir rakam gir</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">ئىشلەتكۈچى نامى ئىناۋەتسىز، ئاز دېگەندە %1$d خانە كىرگۈزۈڭ.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">ئىشلەتكۈچى نامى ئىناۋەتسىز، كۆپ دېگەندە %1$d خانە كىرگۈزۈڭ.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">ئىناۋەتسىز ئىشلەتكۈچى نامى، رەقەملەر پەقەت سانلاردىن تەركىب تېپىشى كېرەك.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">بۇ نومۇر 00 بولسا بولمايدۇ. 1-9 ئارىسىدىكى نومۇر كىرگۈزۈڭ</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -729,8 +729,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Неналежне ім\'я користувача, введіть мінімум %1$d цифри.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Неналежне ім\'я користувача, введіть максимум %1$d цифр.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Недійсне ім\'я користувача: частина з цифрами має містити лише цифри.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Ви не можете обрати цифри 00. Введіть цифру від 1 до 9</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -725,8 +725,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">غلط یوزر نیم، کم از کم %1$d ہندسے درج کریں۔</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">غلط یوزر نیم، زیادہ سے زیادہ %1$d ہندسے درج کریں۔</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">یوزر نیم غلط ہے، نمبرز میں صرف ہندسے شامل ہو سکتے ہیں۔</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">یہ نمبر 00 نہیں ہو سکتا۔ 1–9 کے درمیان کا کوئی ہندسہ درج کریں</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Tên người dùng không hợp lệ, nhập tối thiểu %1$d số.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Tên người dùng không hợp lệ, nhập tối đa %1$d số.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Tên người dùng không hợp lệ, số chỉ có thể chứa chữ số.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">Số này không thể là 00. Nhập một ký tự trong khoảng 19</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">用戶名稱無效,請輸入至少 %1$d 位數字。</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">用戶名稱無效,請輸入最多 %1$d 位數字。</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">無效嘅用戶名稱,數字部分只可以係數字字元。</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">呢個數字唔可以係 00。請輸入 1–9 之間嘅數字</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">用户名无效,请至少输入 %1$d 位数。</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">用户名无效,请至多输入 %1$d 位数。</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">用户名无效,数字部分只能包含数字。</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">该数字不能为 00。请输入 1 – 9 之间的数字</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">無效的用戶名稱,輸入至少 %1$d 位數。</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">無效的用戶名稱,輸入最多 %1$d 位數。</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">無效的用戶名稱,數字部分只可包含數字字元。</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">此數字不能為 00。請輸入 1–9 之間的數字</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -723,8 +723,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">無效的用戶名稱,輸入至少 %1$d 位數。</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">無效的用戶名稱,輸入最多 %1$d 位數。</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">無效的用戶名稱,數字部分只可包含數字字元。</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">此數字不能為 00。請輸入 1–9 之間的數字</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -735,8 +735,6 @@
<string name="AddUsernameScreen__enter_a_minimum_of_d_digits">Invalid username, enter a minimum of %1$d digits.</string>
<!-- Validation error shown when the number the user entered after their username has too many digits. -->
<string name="AddUsernameScreen__enter_a_maximum_of_d_digits">Invalid username, enter a maximum of %1$d digits.</string>
<!-- Validation error shown when the number the user entered after their username contains something other than digits. -->
<string name="AddUsernameScreen__numbers_can_only_contain_digits">Invalid username, numbers can only contain digits.</string>
<!-- Validation error shown when the number the user entered after their username is 00. -->
<string name="AddUsernameScreen__this_number_cant_be_00">This number can\'t be 00. Enter a digit between 19</string>
<!-- Validation error shown when the number the user entered after their username has a leading zero. -->
@@ -764,7 +762,7 @@
<!-- Title of the two-factor authentication code entry screen -->
<string name="TotpEntryScreen__two_factor_authentication">Two-factor authentication</string>
<!-- Subtitle explaining where to find the code -->
<string name="TotpEntryScreen__to_continue_enter_the_code">To continue enter the 6-digit code from your authenticator app.</string>
<string name="TotpEntryScreen__to_continue_enter_the_code">To continue, enter the 6-digit code from your authenticator app.</string>
<!-- Button text to cancel entering a code -->
<string name="TotpEntryScreen__cancel">Cancel</string>
@@ -145,6 +145,51 @@ class AddUsernameViewModelTest {
assertThat(viewModel.state.value.reservation).isEqualTo(Username("maya.45"))
}
@Test
fun `non-digits typed into the discriminator are dropped`() = runTest(testDispatcher) {
coEvery { mockRepository.reserveUsername("maya") } returns RequestResult.Success(Username("maya.45"))
coEvery { mockRepository.reserveUsername("maya", "77") } returns RequestResult.Success(Username("maya.77"))
viewModel.onEvent(AddUsernameScreenEvents.UsernameChanged("maya"))
advanceUntilIdle()
viewModel.onEvent(AddUsernameScreenEvents.DiscriminatorChanged("7a7!"))
advanceUntilIdle()
assertThat(viewModel.state.value.discriminator).isEqualTo("77")
assertThat(viewModel.state.value.validationError).isNull()
assertThat(viewModel.state.value.reservation).isEqualTo(Username("maya.77"))
}
@Test
fun `typing only non-digits leaves the service-assigned discriminator alone`() = runTest(testDispatcher) {
coEvery { mockRepository.reserveUsername("maya") } returns RequestResult.Success(Username("maya.45"))
viewModel.onEvent(AddUsernameScreenEvents.UsernameChanged("maya"))
advanceUntilIdle()
viewModel.onEvent(AddUsernameScreenEvents.DiscriminatorChanged("abc"))
advanceUntilIdle()
assertThat(viewModel.state.value.discriminator).isEqualTo("45")
assertThat(viewModel.state.value.isDiscriminatorUserSet).isFalse()
assertThat(viewModel.state.value.validationError).isNull()
assertThat(viewModel.state.value.reservation).isEqualTo(Username("maya.45"))
}
@Test
fun `clearing a service-assigned discriminator empties the field`() = runTest(testDispatcher) {
coEvery { mockRepository.reserveUsername("maya") } returns RequestResult.Success(Username("maya.45"))
viewModel.onEvent(AddUsernameScreenEvents.UsernameChanged("maya"))
advanceUntilIdle()
viewModel.onEvent(AddUsernameScreenEvents.DiscriminatorChanged(""))
advanceUntilIdle()
assertThat(viewModel.state.value.discriminator).isEmpty()
assertThat(viewModel.state.value.isDiscriminatorUserSet).isFalse()
assertThat(viewModel.state.value.requestedDiscriminator).isNull()
assertThat(viewModel.state.value.validationError).isNull()
}
@Test
fun `a too-short discriminator produces a validation error`() = runTest(testDispatcher) {
coEvery { mockRepository.reserveUsername("maya") } returns RequestResult.Success(Username("maya.45"))
@@ -42,7 +42,7 @@ class TotpEntryScreenTest {
setContent(TotpEntryState())
composeTestRule.onNodeWithText("Two-factor authentication").assertIsDisplayed()
composeTestRule.onNodeWithText("To continue enter the 6-digit code from your authenticator app.").assertIsDisplayed()
composeTestRule.onNodeWithText("To continue, enter the 6-digit code from your authenticator app.").assertIsDisplayed()
}
@Test