Properly pluralize a string.

This commit is contained in:
Greyson Parrelli
2024-03-08 14:39:28 -05:00
parent c64dfff4c7
commit 9897ba4b28
2 changed files with 10 additions and 4 deletions

View File

@@ -397,9 +397,9 @@ class MediaReviewFragment : Fragment(R.layout.v2_media_review_fragment), Schedul
}
} else {
if (state.quality == SentMediaQuality.HIGH) {
getString(R.string.MediaReviewFragment__items_set_to_high_quality, mediaList.size)
resources.getQuantityString(R.plurals.MediaReviewFragment__items_set_to_high_quality, mediaList.size, mediaList.size)
} else {
getString(R.string.MediaReviewFragment__items_set_to_standard_quality, mediaList.size)
resources.getQuantityString(R.plurals.MediaReviewFragment__items_set_to_standard_quality, mediaList.size, mediaList.size)
}
}

View File

@@ -4904,9 +4904,15 @@
<!-- Small notification presented to the user when they set their still image to be sent in standard (lower than high) visual quality. -->
<string name="MediaReviewFragment__photo_set_to_standard_quality">Photo set to standard quality</string>
<!-- Small notification presented to the user when they set multiple media items to be sent in high visual quality. -->
<string name="MediaReviewFragment__items_set_to_high_quality">%d items set to high quality</string>
<plurals name="MediaReviewFragment__items_set_to_high_quality">
<item quantity="one">%1$d item set to high quality</item>
<item quantity="other">%1$d items set to high quality</item>
</plurals>
<!-- Small notification presented to the user when they set multiple media items to be sent in standard (lower than high) visual quality. -->
<string name="MediaReviewFragment__items_set_to_standard_quality">%d items set to standard quality</string>
<plurals name="MediaReviewFragment__items_set_to_standard_quality">
<item quantity="one">%d item set to standard quality</item>
<item quantity="other">%d items set to standard quality</item>
</plurals>
<string name="ImageEditorHud__cancel">Cancel</string>
<string name="ImageEditorHud__draw">Draw</string>