From ba0a85703b3bcfbe24114323bbace47d229a5ce5 Mon Sep 17 00:00:00 2001 From: ganfra Date: Fri, 24 Jan 2025 15:55:30 +0100 Subject: [PATCH] feat(security&privacy) : update strings --- .../SecurityAndPrivacyView.kt | 52 +++++++++---------- .../editroomaddress/EditRoomAddressView.kt | 7 +-- .../impl/src/main/res/values/localazy.xml | 36 +++++++++++++ .../src/main/res/values/localazy.xml | 35 ------------- tools/localazy/config.json | 4 +- 5 files changed, 69 insertions(+), 65 deletions(-) diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/SecurityAndPrivacyView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/SecurityAndPrivacyView.kt index 0b5054c363..aa0321dc77 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/SecurityAndPrivacyView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/SecurityAndPrivacyView.kt @@ -184,31 +184,31 @@ private fun RoomAccessSection( modifier: Modifier = Modifier, ) { SecurityAndPrivacySection( - title = stringResource(CommonStrings.screen_security_and_privacy_room_access_section_header), + title = stringResource(R.string.screen_security_and_privacy_room_access_section_header), modifier = modifier, ) { ListItem( - headlineContent = { Text(text = stringResource(CommonStrings.screen_security_and_privacy_room_access_invite_only_option_title)) }, - supportingContent = { Text(text = stringResource(CommonStrings.screen_security_and_privacy_room_access_invite_only_option_description)) }, + headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_invite_only_option_title)) }, + supportingContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_invite_only_option_description)) }, trailingContent = ListItemContent.RadioButton(selected = edited == SecurityAndPrivacyRoomAccess.InviteOnly), onClick = { onSelected(SecurityAndPrivacyRoomAccess.InviteOnly) }, ) ListItem( - headlineContent = { Text(text = stringResource(CommonStrings.screen_security_and_privacy_ask_to_join_option_title)) }, - supportingContent = { Text(text = stringResource(CommonStrings.screen_security_and_privacy_ask_to_join_option_description)) }, + headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_ask_to_join_option_title)) }, + supportingContent = { Text(text = stringResource(R.string.screen_security_and_privacy_ask_to_join_option_description)) }, trailingContent = ListItemContent.RadioButton(selected = edited == SecurityAndPrivacyRoomAccess.AskToJoin), onClick = { onSelected(SecurityAndPrivacyRoomAccess.AskToJoin) }, ) ListItem( - headlineContent = { Text(text = stringResource(CommonStrings.screen_security_and_privacy_room_access_anyone_option_title)) }, - supportingContent = { Text(text = stringResource(CommonStrings.screen_security_and_privacy_room_access_anyone_option_description)) }, + headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_anyone_option_title)) }, + supportingContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_anyone_option_description)) }, trailingContent = ListItemContent.RadioButton(selected = edited == SecurityAndPrivacyRoomAccess.Anyone), onClick = { onSelected(SecurityAndPrivacyRoomAccess.Anyone) }, ) if (saved == SecurityAndPrivacyRoomAccess.SpaceMember) { ListItem( - headlineContent = { Text(text = stringResource(CommonStrings.screen_security_and_privacy_room_access_space_members_option_title)) }, - supportingContent = { Text(text = stringResource(CommonStrings.screen_security_and_privacy_room_access_space_members_option_description)) }, + headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_space_members_option_title)) }, + supportingContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_access_space_members_option_description)) }, trailingContent = ListItemContent.RadioButton(selected = true, enabled = false), enabled = false, ) @@ -222,12 +222,12 @@ private fun RoomVisibilitySection( modifier: Modifier = Modifier, ) { SecurityAndPrivacySection( - title = stringResource(CommonStrings.screen_security_and_privacy_room_visibility_section_header), + title = stringResource(R.string.screen_security_and_privacy_room_visibility_section_header), modifier = modifier, ) { Spacer(Modifier.height(12.dp)) Text( - text = stringResource(CommonStrings.screen_security_and_privacy_room_visibility_section_footer, homeserverName), + text = stringResource(R.string.screen_security_and_privacy_room_visibility_section_footer, homeserverName), style = ElementTheme.typography.fontBodyMdRegular, color = ElementTheme.colors.textSecondary, modifier = Modifier.padding(horizontal = 16.dp), @@ -245,23 +245,23 @@ private fun RoomAddressSection( modifier: Modifier = Modifier, ) { SecurityAndPrivacySection( - title = stringResource(CommonStrings.screen_security_and_privacy_room_address_section_header), + title = stringResource(R.string.screen_security_and_privacy_room_address_section_header), modifier = modifier, ) { ListItem( headlineContent = { - Text(text = roomAddress ?: stringResource(CommonStrings.screen_security_and_privacy_add_room_address_action)) + Text(text = roomAddress ?: stringResource(R.string.screen_security_and_privacy_add_room_address_action)) }, trailingContent = if (roomAddress.isNullOrEmpty()) ListItemContent.Icon(IconSource.Vector(CompoundIcons.Plus())) else null, - supportingContent = { Text(text = stringResource(CommonStrings.screen_security_and_privacy_room_address_section_footer)) }, + supportingContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_address_section_footer)) }, onClick = onRoomAddressClick, colors = ListItemDefaults.colors(trailingIconColor = ElementTheme.colors.iconAccentPrimary), ) ListItem( - headlineContent = { Text(text = stringResource(CommonStrings.screen_security_and_privacy_room_directory_visibility_toggle_title)) }, + headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_room_directory_visibility_toggle_title)) }, supportingContent = { - Text(text = stringResource(CommonStrings.screen_security_and_privacy_room_directory_visibility_section_footer, homeserverName)) + Text(text = stringResource(R.string.screen_security_and_privacy_room_directory_visibility_section_footer, homeserverName)) }, trailingContent = when (isVisibleInRoomDirectory) { @@ -303,12 +303,12 @@ private fun EncryptionSection( modifier: Modifier = Modifier, ) { SecurityAndPrivacySection( - title = stringResource(CommonStrings.screen_security_and_privacy_encryption_section_header), + title = stringResource(R.string.screen_security_and_privacy_encryption_section_header), modifier = modifier, ) { ListItem( - headlineContent = { Text(text = stringResource(CommonStrings.screen_security_and_privacy_encryption_toggle_title)) }, - supportingContent = { Text(text = stringResource(CommonStrings.screen_security_and_privacy_encryption_section_footer)) }, + headlineContent = { Text(text = stringResource(R.string.screen_security_and_privacy_encryption_toggle_title)) }, + supportingContent = { Text(text = stringResource(R.string.screen_security_and_privacy_encryption_section_footer)) }, trailingContent = ListItemContent.Switch( checked = isRoomEncrypted, enabled = canToggleEncryption, @@ -319,9 +319,9 @@ private fun EncryptionSection( } if (showConfirmation) { ConfirmationDialog( - title = stringResource(CommonStrings.screen_security_and_privacy_enable_encryption_alert_title), - content = stringResource(CommonStrings.screen_security_and_privacy_enable_encryption_alert_description), - submitText = stringResource(CommonStrings.screen_security_and_privacy_enable_encryption_alert_confirm_button_title), + title = stringResource(R.string.screen_security_and_privacy_enable_encryption_alert_title), + content = stringResource(R.string.screen_security_and_privacy_enable_encryption_alert_description), + submitText = stringResource(R.string.screen_security_and_privacy_enable_encryption_alert_confirm_button_title), onSubmitClick = onConfirmEncryption, onDismiss = onDismissConfirmation, ) @@ -337,7 +337,7 @@ private fun HistoryVisibilitySection( modifier: Modifier = Modifier, ) { SecurityAndPrivacySection( - title = stringResource(CommonStrings.screen_security_and_privacy_room_history_section_header), + title = stringResource(R.string.screen_security_and_privacy_room_history_section_header), modifier = modifier, ) { Spacer(Modifier.height(16.dp)) @@ -369,9 +369,9 @@ private fun HistoryVisibilityItem( isEnabled: Boolean = true, ) { val headlineText = when (option) { - SecurityAndPrivacyHistoryVisibility.SinceSelection -> stringResource(CommonStrings.screen_security_and_privacy_room_history_since_selecting_option_title) - SecurityAndPrivacyHistoryVisibility.SinceInvite -> stringResource(CommonStrings.screen_security_and_privacy_room_history_since_invite_option_title) - SecurityAndPrivacyHistoryVisibility.Anyone -> stringResource(CommonStrings.screen_security_and_privacy_room_history_anyone_option_title) + SecurityAndPrivacyHistoryVisibility.SinceSelection -> stringResource(R.string.screen_security_and_privacy_room_history_since_selecting_option_title) + SecurityAndPrivacyHistoryVisibility.SinceInvite -> stringResource(R.string.screen_security_and_privacy_room_history_since_invite_option_title) + SecurityAndPrivacyHistoryVisibility.Anyone -> stringResource(R.string.screen_security_and_privacy_room_history_anyone_option_title) } ListItem( headlineContent = { Text(text = headlineText) }, diff --git a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/editroomaddress/EditRoomAddressView.kt b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/editroomaddress/EditRoomAddressView.kt index 4c15feea3b..efe224ba58 100644 --- a/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/editroomaddress/EditRoomAddressView.kt +++ b/features/roomdetails/impl/src/main/kotlin/io/element/android/features/roomdetails/impl/securityandprivacy/editroomaddress/EditRoomAddressView.kt @@ -21,6 +21,7 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.PreviewParameter import androidx.compose.ui.unit.dp import io.element.android.compound.theme.ElementTheme +import io.element.android.features.roomdetails.impl.R import io.element.android.libraries.designsystem.components.async.AsyncActionView import io.element.android.libraries.designsystem.components.async.AsyncActionViewDefaults import io.element.android.libraries.designsystem.components.button.BackButton @@ -66,8 +67,8 @@ fun EditRoomAddressView( onAddressChange = { state.eventSink(EditRoomAddressEvents.RoomAddressChanged(it)) }, - label = stringResource(CommonStrings.screen_edit_room_address_title), - supportingText = stringResource(CommonStrings.screen_edit_room_address_room_address_section_footer), + label = stringResource(R.string.screen_edit_room_address_title), + supportingText = stringResource(R.string.screen_edit_room_address_room_address_section_footer), modifier = Modifier .fillMaxWidth() .padding(all = 16.dp) @@ -101,7 +102,7 @@ private fun EditRoomAddressTopBar( modifier = modifier, title = { Text( - text = stringResource(CommonStrings.screen_edit_room_address_title), + text = stringResource(R.string.screen_edit_room_address_title), style = ElementTheme.typography.aliasScreenTitle, ) }, diff --git a/features/roomdetails/impl/src/main/res/values/localazy.xml b/features/roomdetails/impl/src/main/res/values/localazy.xml index bd602d3ed3..6d3a9a5c0b 100644 --- a/features/roomdetails/impl/src/main/res/values/localazy.xml +++ b/features/roomdetails/impl/src/main/res/values/localazy.xml @@ -1,5 +1,7 @@ + "You’ll need a room address in order to make it visible in the directory." + "Room address" "An error occurred while updating the notification setting." "Your homeserver does not support this option in encrypted rooms, you may not get notified in some rooms." "Polls" @@ -54,6 +56,7 @@ "Default" "Notifications" "Pinned messages" + "Profile" "Requests to join" "Roles and permissions" "Room name" @@ -117,4 +120,37 @@ "Roles" "Room details" "Roles and permissions" + "Add room address" + "Anyone can ask to join the room but an administrator or moderator will have to accept the request." + "Ask to join" + "Yes, enable encryption" + "Once enabled, encryption for a room cannot be disabled, Message history will only be visible for room members since they were invited or since they joined the room. +No one besides the room members will be able to read messages. This may prevent bots and bridges to work correctly. +We do not recommend enabling encryption for rooms that anyone can find and join." + "Enable encryption?" + "Once enabled, encryption cannot be disabled." + "Encryption" + "Enable end-to-end encryption" + "Anyone can find and join" + "Anyone" + "People can only join if they are invited" + "Invite only" + "Room access" + "Spaces are not currently supported" + "Space members" + "You’ll need a room address in order to make it visible in the room directory." + "Room address" + "Allow for this room to be found by searching %1$s public room directory" + "Visible in public room directory" + "Anyone" + "Who can read history" + "Members only since they were invited" + "Members only since selecting this option" + "Room addresses are ways to find and access rooms. This also ensures you can easily share your room with others. +You can choose to publish your room in your homeserver public room directory." + "Room publishing" + "Room addresses are ways to find and access rooms. This also ensures you can easily share your room with others. +The address is also required to make the room visible in %1$s public room directory." + "Room visibility" + "Security & privacy" diff --git a/libraries/ui-strings/src/main/res/values/localazy.xml b/libraries/ui-strings/src/main/res/values/localazy.xml index 4a31e05852..1d2f2e2d38 100644 --- a/libraries/ui-strings/src/main/res/values/localazy.xml +++ b/libraries/ui-strings/src/main/res/values/localazy.xml @@ -308,8 +308,6 @@ Reason: %1$s." "Hey, talk to me on %1$s: %2$s" "%1$s Android" "Rageshake to report bug" - "You’ll need a room address in order to make it visible in the directory." - "Room address" "Failed selecting media, please try again." "Captions might not be visible to people using older apps." "Failed processing media to upload, please try again." @@ -339,39 +337,6 @@ Reason: %1$s." "View All" "Chat" "Request to join sent" - "Add room address" - "Anyone can ask to join the room but an administrator or moderator will have to accept the request." - "Ask to join" - "Yes, enable encryption" - "Once enabled, encryption for a room cannot be disabled, Message history will only be visible for room members since they were invited or since they joined the room. -No one besides the room members will be able to read messages. This may prevent bots and bridges to work correctly. -We do not recommend enabling encryption for rooms that anyone can find and join." - "Enable encryption?" - "Once enabled, encryption cannot be disabled." - "Encryption" - "Enable end-to-end encryption" - "Anyone can find and join" - "Anyone" - "People can only join if they are invited" - "Invite only" - "Room access" - "Spaces are not currently supported" - "Space members" - "You’ll need a room address in order to make it visible in the room directory." - "Room address" - "Allow for this room to be found by searching %1$s public room directory" - "Visible in public room directory" - "Anyone" - "Who can read history" - "Members only since they were invited" - "Members only since selecting this option" - "Room addresses are ways to find and access rooms. This also ensures you can easily share your room with others. -You can choose to publish your room in your homeserver public room directory." - "Room publishing" - "Room addresses are ways to find and access rooms. This also ensures you can easily share your room with others. -The address is also required to make the room visible in %1$s public room directory." - "Room visibility" - "Security & privacy" "Share location" "Share my location" "Open in Apple Maps" diff --git a/tools/localazy/config.json b/tools/localazy/config.json index 2efd8eac97..b75c0380ff 100644 --- a/tools/localazy/config.json +++ b/tools/localazy/config.json @@ -185,7 +185,9 @@ "screen_polls_history_title", "screen_notification_settings_mentions_only_disclaimer", "screen_room_change_.*", - "screen_room_roles_.*" + "screen_room_roles_.*", + "screen\\.edit_room_address\\..*", + "screen\\.security_and_privacy\\..*" ] }, {