mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-05 13:37:36 +01:00
extracting hardcoded error message to the resources
This commit is contained in:
parent
801fb90f7b
commit
13fb4e52af
@ -125,7 +125,7 @@ class LoginFragment @Inject constructor() : AbstractSSOLoginFragment<FragmentLog
|
||||
error++
|
||||
}
|
||||
if (isSignupMode && isNumericOnlyUserIdForbidden && login.isDigitsOnly()) {
|
||||
views.loginFieldTil.error = "The homeserver does not accept username with only digits."
|
||||
views.loginFieldTil.error = getString(R.string.error_forbidden_digits_only_username)
|
||||
error++
|
||||
}
|
||||
if (password.isEmpty()) {
|
||||
|
@ -107,7 +107,7 @@ class FtueAuthCombinedRegisterFragment @Inject constructor() : AbstractSSOFtueAu
|
||||
error++
|
||||
}
|
||||
if (state.isNumericOnlyUserIdForbidden() && login.isDigitsOnly()) {
|
||||
views.createAccountInput.error = "The homeserver does not accept username with only digits."
|
||||
views.createAccountInput.error = getString(R.string.error_forbidden_digits_only_username)
|
||||
error++
|
||||
}
|
||||
if (password.isEmpty()) {
|
||||
|
@ -135,7 +135,7 @@ class FtueAuthLoginFragment @Inject constructor() : AbstractSSOFtueAuthFragment<
|
||||
error++
|
||||
}
|
||||
if (isSignupMode && isNumericOnlyUserIdForbidden && login.isDigitsOnly()) {
|
||||
views.loginFieldTil.error = "The homeserver does not accept username with only digits."
|
||||
views.loginFieldTil.error = getString(R.string.error_forbidden_digits_only_username)
|
||||
error++
|
||||
}
|
||||
if (password.isEmpty()) {
|
||||
|
@ -2470,6 +2470,7 @@
|
||||
|
||||
<string name="error_empty_field_choose_user_name">Please choose a username.</string>
|
||||
<string name="error_empty_field_choose_password">Please choose a password.</string>
|
||||
<string name="error_forbidden_digits_only_username">"The homeserver does not accept username with only digits."</string>
|
||||
<string name="external_link_confirmation_title">Double-check this link</string>
|
||||
<string name="external_link_confirmation_message">The link %1$s is taking you to another site: %2$s.\n\nAre you sure you want to continue?</string>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user