diff --git a/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/banner/KnockRequestsBannerState.kt b/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/banner/KnockRequestsBannerState.kt index 4d73ec8748..5ad89b239a 100644 --- a/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/banner/KnockRequestsBannerState.kt +++ b/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/banner/KnockRequestsBannerState.kt @@ -11,10 +11,9 @@ import androidx.compose.runtime.Composable import androidx.compose.ui.res.pluralStringResource import androidx.compose.ui.res.stringResource import io.element.android.features.knockrequests.impl.KnockRequest +import io.element.android.features.knockrequests.impl.R import io.element.android.features.knockrequests.impl.getBestName import io.element.android.libraries.architecture.AsyncAction -import io.element.android.libraries.ui.strings.CommonPlurals -import io.element.android.libraries.ui.strings.CommonStrings import kotlinx.collections.immutable.ImmutableList data class KnockRequestsBannerState( @@ -40,12 +39,12 @@ data class KnockRequestsBannerState( fun formattedTitle(): String { return when (knockRequests.size) { 0 -> "" - 1 -> stringResource(CommonStrings.screen_room_single_knock_request_title, knockRequests.first().getBestName()) + 1 -> stringResource(R.string.screen_room_single_knock_request_title, knockRequests.first().getBestName()) else -> { val firstRequest = knockRequests.first() val otherRequestsCount = knockRequests.size - 1 pluralStringResource( - id = CommonPlurals.screen_room_multiple_knock_requests_title, + id = R.plurals.screen_room_multiple_knock_requests_title, count = otherRequestsCount, firstRequest.getBestName(), otherRequestsCount diff --git a/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/banner/KnockRequestsBannerView.kt b/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/banner/KnockRequestsBannerView.kt index 024efd2985..4ef26d460e 100644 --- a/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/banner/KnockRequestsBannerView.kt +++ b/features/knockrequests/impl/src/main/kotlin/io/element/android/features/knockrequests/impl/banner/KnockRequestsBannerView.kt @@ -37,6 +37,7 @@ import androidx.compose.ui.zIndex import io.element.android.compound.theme.ElementTheme import io.element.android.compound.tokens.generated.CompoundIcons import io.element.android.features.knockrequests.impl.KnockRequest +import io.element.android.features.knockrequests.impl.R import io.element.android.features.knockrequests.impl.getAvatarData import io.element.android.libraries.designsystem.components.avatar.Avatar import io.element.android.libraries.designsystem.components.avatar.AvatarSize @@ -133,21 +134,21 @@ private fun KnockRequestsBannerContent( Row(Modifier.fillMaxWidth(), horizontalArrangement = Arrangement.spacedBy(12.dp)) { if (state.knockRequests.size > 1) { Button( - text = "View all", + text = stringResource(R.string.screen_room_multiple_knock_requests_view_all_button_title), onClick = onViewRequestsClick, size = ButtonSize.MediumLowPadding, modifier = Modifier.weight(1f), ) } else { OutlinedButton( - text = "View", + text = stringResource(R.string.screen_room_single_knock_request_view_button_title), onClick = onViewRequestsClick, size = ButtonSize.MediumLowPadding, modifier = Modifier.weight(1f), ) if (state.canAccept) { Button( - text = "Accept", + text = stringResource(R.string.screen_room_single_knock_request_accept_button_title), onClick = {}, size = ButtonSize.MediumLowPadding, modifier = Modifier.weight(1f), diff --git a/features/knockrequests/impl/src/main/res/values/localazy.xml b/features/knockrequests/impl/src/main/res/values/localazy.xml index df14d665b8..d2e9dc5d14 100644 --- a/features/knockrequests/impl/src/main/res/values/localazy.xml +++ b/features/knockrequests/impl/src/main/res/values/localazy.xml @@ -14,4 +14,12 @@ "When somebody will ask to join the room, you’ll be able to see their request here." "No pending request to join" "Requests to join" + + "%1$s +%2$d other want to join this room" + "%1$s +%2$d others want to join this room" + + "View all" + "Accept" + "%1$s wants to join this room" + "View" diff --git a/libraries/ui-strings/src/main/res/values/localazy.xml b/libraries/ui-strings/src/main/res/values/localazy.xml index 75b0f6853a..6e8569cae1 100644 --- a/libraries/ui-strings/src/main/res/values/localazy.xml +++ b/libraries/ui-strings/src/main/res/values/localazy.xml @@ -322,18 +322,10 @@ Reason: %1$s." "Your message was not sent because you have not verified one or more of your devices" "Failed processing media to upload, please try again." "Could not retrieve user details" - - "%1$s +%2$d other want to join this room" - "%1$s +%2$d others want to join this room" - - "View all" "%1$s of %2$s" "%1$s Pinned messages" "Loading message…" "View All" - "Accept" - "%1$s wants to join this room" - "View" "Chat" "Request to join sent" "Share location" diff --git a/tools/localazy/config.json b/tools/localazy/config.json index fe95d1930e..a365379344 100644 --- a/tools/localazy/config.json +++ b/tools/localazy/config.json @@ -291,7 +291,9 @@ { "name" : ":features:knockrequests:impl", "includeRegex" : [ - "screen\\.knock_requests_list\\..*" + "screen\\.knock_requests_list\\..*", + "screen\\.room\\.single_knock_request.*", + "screen\\.room\\.multiple_knock_requests.*" ] } ]