use plural string for feed_group_dialog_selection_count

This commit is contained in:
bopol 2020-03-15 07:25:48 -03:00 committed by Mauricio Colli
parent d0f2a02277
commit 0ae4d1369d
5 changed files with 54 additions and 7 deletions

View file

@ -128,7 +128,7 @@ class FeedFragment : BaseListFragment<FeedState, Unit>() {
.putBoolean(getString(R.string.feed_use_dedicated_fetch_method_key), !usingDedicatedMethod)
.apply()
}
.setPositiveButton(android.R.string.ok, null)
.setPositiveButton(resources.getString(R.string.finish), null)
.create()
.show()
return true

View file

@ -189,7 +189,8 @@ class FeedGroupDialog : DialogFragment() {
val groupAdapter = GroupAdapter<GroupieViewHolder>()
groupAdapter.spanCount = if (useGridLayout) 4 else 1
val selectedCountText = getString(R.string.feed_group_dialog_selection_count, this.selectedSubscriptions.size)
var subscriptionsCount = this.selectedSubscriptions.size
val selectedCountText = resources.getQuantityString(R.plurals.feed_group_dialog_selection_count, subscriptionsCount, subscriptionsCount)
selected_subscription_count_view.text = selectedCountText
subscriptions_selector_header_info.text = selectedCountText
@ -234,7 +235,8 @@ class FeedGroupDialog : DialogFragment() {
item.isSelected = isSelected
item.notifyChanged(PickerSubscriptionItem.UPDATE_SELECTED)
val updateSelectedCountText = getString(R.string.feed_group_dialog_selection_count, this.selectedSubscriptions.size)
subscriptionsCount = this.selectedSubscriptions.size
val updateSelectedCountText = resources.getQuantityString(R.plurals.feed_group_dialog_selection_count, subscriptionsCount, subscriptionsCount)
selected_subscription_count_view.text = updateSelectedCountText
subscriptions_selector_header_info.text = updateSelectedCountText
}