Do not use plurals in this case since it can lead to lint issues since there is no %d in the value for one and this triggers a warning in some languages.

This commit is contained in:
Benoit Marty
2025-09-29 14:43:16 +02:00
parent e3fd465005
commit 4b641dbe1a
2 changed files with 2 additions and 6 deletions

View File

@@ -155,9 +155,8 @@ private fun LeaveSpaceHeader(
),
subTitle =
if (state.selectableSpaceRooms is AsyncData.Success && state.selectableSpaceRooms.data.isNotEmpty()) {
val count = state.selectableSpaceRooms.data.size
if (state.hasOnlyLastAdminRoom) {
pluralStringResource(R.plurals.screen_leave_space_subtitle_only_last_admin, count, count)
stringResource(R.string.screen_leave_space_subtitle_only_last_admin)
} else {
stringResource(R.string.screen_leave_space_subtitle)
}

View File

@@ -6,9 +6,6 @@
<item quantity="other">"Leave %1$d rooms and space"</item>
</plurals>
<string name="screen_leave_space_subtitle">"Select the rooms youd like to leave which you\'re not the only administrator for:"</string>
<plurals name="screen_leave_space_subtitle_only_last_admin">
<item quantity="one">"You will not be removed from the following room because you\'re the only administrator:"</item>
<item quantity="other">"You will not be removed from the following rooms because you\'re the only administrator:"</item>
</plurals>
<string name="screen_leave_space_subtitle_only_last_admin">"You will not be removed from the following room(s) because you\'re the only administrator:"</string>
<string name="screen_leave_space_title">"Leave %1$s?"</string>
</resources>