Skip to content

Commit

Permalink
use plural string for feed_group_dialog_selection_count
Browse files Browse the repository at this point in the history
  • Loading branch information
B0pol committed Mar 15, 2020
1 parent 3206408 commit 66120f5
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
}
Expand Down
40 changes: 40 additions & 0 deletions app/src/main/res/values-eo/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -547,4 +547,44 @@
<item quantity="one">%s sekundo</item>
<item quantity="other">%s sekundoj</item>
</plurals>
<plurals name="minutes">
<item quantity="one">%d minuto</item>
<item quantity="other">%d minutoj</item>
</plurals>

<plurals name="hours">
<item quantity="one">%d horo</item>
<item quantity="other">%d horoj</item>
</plurals>

<plurals name="days">
<item quantity="one">%d tago</item>
<item quantity="other">%d tagoj</item>
</plurals>

<!-- Feed -->
<string name="feed_groups_header_title">Abonfluoj grupoj</string>
<string name="feed_oldest_subscription_update">Lasta ĝisdatigo: %s</string>
<string name="feed_subscription_not_loaded_count">Ne ŝarĝitaj: %d</string>
<string name="feed_notification_loading">Ŝarĝante abonfluon…</string>
<string name="feed_processing_message">Procesante abonfluon…</string>
<string name="feed_group_dialog_select_subscriptions">Seletkti abonojn</string>
<plurals name="feed_group_dialog_selection_count">
<item quantity="one">Selektita: %d</item>
<item quantity="other">Selektitaj: %d</item>
</plurals>
<string name="feed_group_dialog_empty_selection">No subscription selected</string>
<string name="feed_group_dialog_empty_name">Malplena grupa nomo</string>
<string name="feed_group_dialog_name_input">Nomo</string>
<string name="feed_group_dialog_delete_message">Ĉu vi volas forviŝi tion grupon?</string>
<string name="feed_create_new_group_button_title">Nova</string>

<string name="settings_category_feed_title">Abonfluo</string>
<string name="feed_update_threshold_title">Abonflua ĝisdatiga sojlo</string>
<string name="feed_update_threshold_summary">Tempo post lasta ĝisdatigo antaŭ abono estas konsiderita malĝisdatigita — %s</string>
<string name="feed_update_threshold_option_always_update">Ĉiam ĝisdatigi</string>
<string name="feed_use_dedicated_fetch_method_title">Ŝarĝi el dediĉita abonfluo kiam ĝi haveblas</string>
<string name="feed_use_dedicated_fetch_method_summary">Havebla en kelkaj servoj, ĝi estas ĝenerale multe pli rapida, sed povas doni limigita kvanto da aĵoj kaj ofte malpreciza informoj (ekzemple: neniu duracio, ajâ tipo, neniu « nuna » statuso).</string>
<string name="feed_use_dedicated_fetch_method_enable_button">Ŝalti rapidan modon</string>
<string name="feed_use_dedicated_fetch_method_disable_button">Malŝati rapidan modon</string>
</resources>
8 changes: 5 additions & 3 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -546,13 +546,12 @@
<string name="new_seek_duration_toast">En raison des contraintes d’ExoPlayer, le pas de déplacement a été réglée à %d secondes</string>
<string name="mute">Couper le son</string>
<string name="unmute">Remettre le son</string>

<!-- Time duration plurals -->
<plurals name="dynamic_seek_duration_description">
<item quantity="one">%s seconde</item>
<item quantity="other">%s secondes</item>
</plurals>

<!-- Time duration plurals -->
<plurals name="minutes">
<item quantity="one">%d minute</item>
<item quantity="other">%d minutes</item>
Expand All @@ -576,8 +575,11 @@
<string name="feed_notification_loading">Chargement du flux…</string>
<string name="feed_processing_message">Préparation du flux…</string>
<string name="feed_group_dialog_select_subscriptions">Choisir les abonnements</string>
<string name="feed_group_dialog_selection_count">Sélectionnés : %d</string>
<string name="feed_group_dialog_empty_selection">Aucun abonnement sélectionné</string>
<plurals name="feed_group_dialog_selection_count">
<item quantity="one">Sélectionné : %d</item>
<item quantity="other">Sélectionnés : %d</item>
</plurals>
<string name="feed_group_dialog_empty_name">Nom de groupe vide</string>
<string name="feed_group_dialog_name_input">Nom</string>
<string name="feed_group_dialog_delete_message">Voulez-vous supprimer ce groupe ?</string>
Expand Down
5 changes: 4 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,11 @@
<string name="feed_notification_loading">Loading feed…</string>
<string name="feed_processing_message">Processing feed…</string>
<string name="feed_group_dialog_select_subscriptions">Select subscriptions</string>
<string name="feed_group_dialog_selection_count">Selected: %d</string>
<string name="feed_group_dialog_empty_selection">No subscription selected</string>
<plurals name="feed_group_dialog_selection_count">
<item quantity="one">Selected: %d</item>
<item quantity="other">Selected: %d</item>
</plurals>
<string name="feed_group_dialog_empty_name">Empty group name</string>
<string name="feed_group_dialog_name_input">Name</string>
<string name="feed_group_dialog_delete_message">Do you want to delete this group?</string>
Expand Down

0 comments on commit 66120f5

Please sign in to comment.