Fix some string mappings for link new device errors (#6958)

* Fix some string mappings for link new device errors (#6675)

* Fix some string mappings for link new device errors

* Update snapshots

* Add appName

* Iterate

---------

Co-authored-by: Jorge Martin Espinosa <jorgem@element.io>
Co-authored-by: Benoit Marty <benoitm@element.io>

* Update screenshots

---------

Co-authored-by: Hugh Nimmo-Smith <hughns@users.noreply.github.com>
Co-authored-by: Jorge Martin Espinosa <jorgem@element.io>
Co-authored-by: ElementBot <android@element.io>
This commit is contained in:
Benoit Marty
2026-06-05 11:17:44 +02:00
committed by GitHub
3 changed files with 10 additions and 10 deletions
@@ -73,10 +73,10 @@ fun ErrorView(
@Composable
private fun titleText(errorScreenType: ErrorScreenType, appName: String) = when (errorScreenType) {
ErrorScreenType.Cancelled -> stringResource(R.string.screen_qr_code_login_error_cancelled_title)
ErrorScreenType.Cancelled -> stringResource(R.string.screen_link_new_device_error_request_cancelled_title)
ErrorScreenType.Declined -> stringResource(R.string.screen_qr_code_login_error_declined_title)
ErrorScreenType.Expired -> stringResource(R.string.screen_qr_code_login_error_expired_title)
ErrorScreenType.ProtocolNotSupported -> stringResource(R.string.screen_qr_code_login_error_linking_not_suported_title)
ErrorScreenType.Expired -> stringResource(R.string.screen_link_new_device_error_request_timeout_title)
ErrorScreenType.ProtocolNotSupported -> stringResource(R.string.screen_link_new_device_error_not_supported_title)
ErrorScreenType.InsecureChannelDetected -> stringResource(id = R.string.screen_qr_code_login_connection_note_secure_state_title)
ErrorScreenType.Mismatch2Digits -> stringResource(id = R.string.screen_link_new_device_wrong_number_title)
ErrorScreenType.SlidingSyncNotAvailable -> stringResource(id = R.string.screen_qr_code_login_error_sliding_sync_not_supported_title, appName)
@@ -86,10 +86,10 @@ private fun titleText(errorScreenType: ErrorScreenType, appName: String) = when
@Composable
private fun subtitleText(errorScreenType: ErrorScreenType, appName: String) = when (errorScreenType) {
ErrorScreenType.Cancelled -> stringResource(R.string.screen_qr_code_login_error_cancelled_subtitle)
ErrorScreenType.Cancelled -> stringResource(R.string.screen_link_new_device_error_request_cancelled_subtitle)
ErrorScreenType.Declined -> stringResource(R.string.screen_qr_code_login_error_declined_subtitle)
ErrorScreenType.Expired -> stringResource(R.string.screen_qr_code_login_error_expired_subtitle)
ErrorScreenType.ProtocolNotSupported -> stringResource(R.string.screen_qr_code_login_error_linking_not_suported_subtitle, appName)
ErrorScreenType.Expired -> stringResource(R.string.screen_link_new_device_error_request_timeout_subtitle)
ErrorScreenType.ProtocolNotSupported -> stringResource(R.string.screen_link_new_device_error_not_supported_subtitle)
ErrorScreenType.Mismatch2Digits -> stringResource(id = R.string.screen_link_new_device_wrong_number_subtitle)
ErrorScreenType.InsecureChannelDetected -> stringResource(id = R.string.screen_qr_code_login_connection_note_secure_state_description)
ErrorScreenType.SlidingSyncNotAvailable -> stringResource(id = R.string.screen_qr_code_login_error_sliding_sync_not_supported_subtitle, appName)