Merge pull request #6633 from element-hq/feature/bma/deactivateStrings

Update wording of deactivate account screen
This commit is contained in:
Benoit Marty 2026-04-21 15:34:23 +02:00 committed by GitHub
commit f3dd7b86d8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
30 changed files with 144 additions and 48 deletions

View file

@ -135,7 +135,7 @@ private fun ColumnScope.Buttons(
) {
val logoutAction = state.accountDeactivationAction
Button(
text = stringResource(CommonStrings.action_deactivate),
text = stringResource(CommonStrings.action_delete),
showProgress = logoutAction is AsyncAction.Loading,
destructive = true,
enabled = state.submitEnabled,

View file

@ -22,7 +22,7 @@ fun AccountDeactivationConfirmationDialog(
ConfirmationDialog(
title = stringResource(id = R.string.screen_deactivate_account_title),
content = stringResource(R.string.screen_deactivate_account_confirmation_dialog_content),
submitText = stringResource(id = CommonStrings.action_deactivate),
submitText = stringResource(id = CommonStrings.action_delete),
onSubmitClick = onSubmitClick,
onDismiss = onDismiss,
destructiveSubmit = true,

View file

@ -1,14 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="screen_deactivate_account_confirmation_dialog_content">"Please confirm that you want to deactivate your account. This action cannot be undone."</string>
<string name="screen_deactivate_account_confirmation_dialog_content">"Please confirm that you want to delete your account. This action cannot be undone."</string>
<string name="screen_deactivate_account_delete_all_messages">"Delete all my messages"</string>
<string name="screen_deactivate_account_delete_all_messages_notice">"Warning: Future users may see incomplete conversations."</string>
<string name="screen_deactivate_account_description">"Deactivating your account is %1$s, it will:"</string>
<string name="screen_deactivate_account_description">"Deleting your account is %1$s, it will:"</string>
<string name="screen_deactivate_account_description_bold_part">"irreversible"</string>
<string name="screen_deactivate_account_list_item_1">"%1$s your account (you can\'t log back in, and your ID can\'t be reused)."</string>
<string name="screen_deactivate_account_list_item_1_bold_part">"Permanently disable"</string>
<string name="screen_deactivate_account_list_item_2">"Remove you from all chat rooms."</string>
<string name="screen_deactivate_account_list_item_3">"Delete your account information from our identity server."</string>
<string name="screen_deactivate_account_list_item_4">"Your messages will still be visible to registered users but wont be available to new or unregistered users if you choose to delete them."</string>
<string name="screen_deactivate_account_title">"Deactivate account"</string>
<string name="screen_deactivate_account_title">"Delete account"</string>
</resources>

View file

@ -60,7 +60,7 @@ class AccountDeactivationViewTest {
eventSink = eventsRecorder,
),
)
rule.clickOn(CommonStrings.action_deactivate)
rule.clickOn(CommonStrings.action_delete)
eventsRecorder.assertSingle(AccountDeactivationEvents.DeactivateAccount(false))
}

View file

@ -33,6 +33,7 @@ dependencies {
implementation(projects.libraries.matrixui)
implementation(projects.libraries.designsystem)
implementation(projects.libraries.uiStrings)
implementation(projects.libraries.uiUtils)
implementation(projects.libraries.androidutils)
implementation(projects.libraries.usersearch.api)
implementation(libs.coil.compose)

View file

@ -55,6 +55,7 @@ import io.element.android.libraries.matrix.ui.components.SelectedUsersRowList
import io.element.android.libraries.matrix.ui.model.getAvatarData
import io.element.android.libraries.matrix.ui.model.getBestName
import io.element.android.libraries.ui.strings.CommonStrings
import io.element.android.libraries.ui.utils.strings.simplePluralStringResource
import kotlinx.collections.immutable.ImmutableList
@Composable
@ -263,16 +264,16 @@ private fun InvitePeopleConfirmModal(
dragHandle = null,
) {
IconTitleSubtitleMolecule(
title = if (users.size > 1) {
stringResource(R.string.screen_invite_users_confirm_dialog_title_mutiple_users)
} else {
stringResource(R.string.screen_invite_users_confirm_dialog_title_one_user)
},
subTitle = if (users.size > 1) {
stringResource(R.string.screen_invite_users_confirm_dialog_subtitle_multiple_users)
} else {
stringResource(R.string.screen_invite_users_confirm_dialog_subtitle_one_user)
},
title = simplePluralStringResource(
resIdForOne = R.string.screen_invite_users_confirm_dialog_title_one_user,
resIdForOthers = R.string.screen_invite_users_confirm_dialog_title_mutiple_users,
count = users.size,
),
subTitle = simplePluralStringResource(
resIdForOne = R.string.screen_invite_users_confirm_dialog_subtitle_one_user,
resIdForOthers = R.string.screen_invite_users_confirm_dialog_subtitle_multiple_users,
count = users.size,
),
iconStyle = BigIcon.Style.Default(CompoundIcons.UserAddSolid()),
modifier = Modifier.padding(
top = 32.dp,

View file

@ -28,7 +28,7 @@
<string name="screen_change_server_subtitle">"What is the address of your server?"</string>
<string name="screen_change_server_title">"Select your server"</string>
<string name="screen_create_account_title">"Create account"</string>
<string name="screen_login_error_deactivated_account">"This account has been deactivated."</string>
<string name="screen_login_error_deactivated_account">"This account has been deleted."</string>
<string name="screen_login_error_invalid_credentials">"Incorrect username and/or password"</string>
<string name="screen_login_error_invalid_user_id">"This is not a valid user identifier. Expected format: @user:homeserver.org"</string>
<string name="screen_login_error_refresh_tokens">"This server is configured to use refresh tokens. These aren\'t supported when using password based login."</string>

View file

@ -278,7 +278,7 @@ private fun ColumnScope.GeneralSection(
)
if (state.canDeactivateAccount) {
ListItem(
headlineContent = { Text(stringResource(id = CommonStrings.action_deactivate_account)) },
headlineContent = { Text(stringResource(id = CommonStrings.action_delete_account)) },
leadingContent = ListItemContent.Icon(IconSource.Vector(CompoundIcons.Delete())),
style = ListItemStyle.Destructive,
onClick = onDeactivateClick,

View file

@ -407,7 +407,7 @@ class PreferencesRootViewTest {
),
onDeactivateClick = callback,
)
rule.clickOn(CommonStrings.action_deactivate_account)
rule.clickOn(CommonStrings.action_delete_account)
}
}
@ -420,7 +420,7 @@ class PreferencesRootViewTest {
eventSink = eventsRecorder,
),
)
rule.onNodeWithText(rule.activity.getString(CommonStrings.action_deactivate_account)).assertDoesNotExist()
rule.onNodeWithText(rule.activity.getString(CommonStrings.action_delete_account)).assertDoesNotExist()
}
@Test