Pluralize some strings.

This commit is contained in:
Greyson Parrelli
2023-05-16 10:15:24 -04:00
parent 8df0248d4f
commit 5c5b88ebcc
4 changed files with 30 additions and 6 deletions

View File

@@ -276,7 +276,7 @@ public class StoragePreferenceFragment extends ListSummaryPreferenceFragment {
if (newTrimLength > 0 && (!trimLengthEnabled || newTrimLength < trimLength)) {
new MaterialAlertDialogBuilder(activity)
.setTitle(R.string.preferences_storage__delete_older_messages)
.setMessage(activity.getString(R.string.preferences_storage__this_will_permanently_trim_all_conversations_to_the_d_most_recent_messages, NumberFormat.getInstance().format(newTrimLength)))
.setMessage(activity.getResources().getQuantityString(R.plurals.preferences_storage__this_will_permanently_trim_all_conversations_to_the_d_most_recent_messages, newTrimLength, newTrimLength))
.setPositiveButton(R.string.delete, (d, w) -> updateTrimByLength(newTrimLength))
.setNegativeButton(android.R.string.cancel, null)
.show();