Move string to :feature:account:common
This commit is contained in:
parent
a691508bb6
commit
7a6f06b9c2
3 changed files with 5 additions and 3 deletions
|
@ -3,4 +3,6 @@
|
|||
<string name="account_common_title">K-9 Mail</string>
|
||||
<string name="account_common_button_next">Next</string>
|
||||
<string name="account_common_button_back">Back</string>
|
||||
|
||||
<string name="account_common_error_server_message">The server returned the following message:\n%s</string>
|
||||
</resources>
|
||||
|
|
|
@ -4,6 +4,7 @@ import android.content.res.Resources
|
|||
import androidx.annotation.StringRes
|
||||
import app.k9mail.feature.account.server.validation.R
|
||||
import app.k9mail.feature.account.server.validation.ui.ServerValidationContract.Error
|
||||
import app.k9mail.feature.account.common.R as CommonR
|
||||
|
||||
internal fun Error.toResourceString(resources: Resources): String {
|
||||
return when (this) {
|
||||
|
@ -12,7 +13,7 @@ internal fun Error.toResourceString(resources: Resources): String {
|
|||
is Error.AuthenticationError -> {
|
||||
resources.buildErrorString(
|
||||
titleResId = R.string.account_server_validation_error_authentication,
|
||||
detailsResId = R.string.account_server_validation_error_server_message,
|
||||
detailsResId = CommonR.string.account_common_error_server_message,
|
||||
detailsMessage = serverMessage,
|
||||
)
|
||||
}
|
||||
|
@ -28,7 +29,7 @@ internal fun Error.toResourceString(resources: Resources): String {
|
|||
is Error.ServerError -> {
|
||||
resources.buildErrorString(
|
||||
titleResId = R.string.account_server_validation_error_server,
|
||||
detailsResId = R.string.account_server_validation_error_server_message,
|
||||
detailsResId = CommonR.string.account_common_error_server_message,
|
||||
detailsMessage = serverMessage,
|
||||
)
|
||||
}
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
<string name="account_server_validation_error_client_certificate_expired">The client certificate is no longer valid</string>
|
||||
<string name="account_server_validation_error_client_certificate_retrieval_failure">"The client certificate couldn't be accessed"</string>
|
||||
<string name="account_server_validation_error_missing_server_capability">Missing server capability</string>
|
||||
<string name="account_server_validation_error_server_message">The server returned the following message:\n%s</string>
|
||||
<string name="account_server_validation_error_details">Details:\n%s</string>
|
||||
<string name="account_server_validation_error_missing_server_capability_details">The server is missing this capability:\n%s</string>
|
||||
<string name="account_server_validation_incoming_loading_message">Checking incoming server settings…</string>
|
||||
|
|
Loading…
Reference in a new issue