Added plural form to the checked items section

This commit is contained in:
Agnieszka C
2024-07-22 07:44:10 +02:00
parent f78f86ee73
commit e9d06d8fec
3 changed files with 13 additions and 4 deletions

View File

@@ -189,7 +189,7 @@ class TasksAdapter(
private fun setupCompletedTasks(view: View, completedTasks: CompletedTasks) {
ItemCheckedTasksBinding.bind(view).apply {
numCheckedItems.apply {
text = activity.getString(R.string.num_checked_items, completedTasks.tasks.size)
text = resources.getQuantityString(R.plurals.num_checked_items, completedTasks.tasks.size, completedTasks.tasks.size)
setTextColor(textColor)
setTextSize(TypedValue.COMPLEX_UNIT_PX, context.getPercentageFontSize())
}

View File

@@ -58,15 +58,21 @@
<string name="autosave_notes">Automatyczne zapisywanie notatek</string>
<string name="enable_line_wrap">Włącz zawijanie linii</string>
<string name="use_incognito_mode">Używaj trybu incognito klawiatury</string>
<string name="move_done_checklist_items">Przesuwaj na dół wykonane elementy listy kontrolnej</string>
<string name="move_done_checklist_items">Przesuwaj na dół odhaczone elementy</string>
<string name="add_new_checklist_items_top">Dodawaj na górze nowe elementy listy kontrolnej</string>
<string name="checklist">Lista kontrolna</string>
<string name="checklists">Listy kontrolne</string>
<string name="add_new_checklist_item">Dodaj nowy element listy kontrolnej</string>
<string name="add_new_checklist_items">Dodaj nowe elementy listy kontrolnej</string>
<string name="checklist_is_empty">Lista kontrolna jest pusta</string>
<string name="delete_checked_items">Usuń wykonane elementy</string>
<string name="delete_checked_items">Usuń odhaczone elementy</string>
<string name="add_to_the_top">Dodaj na górze</string>
<plurals name="num_checked_items">
<item quantity="one">%d odhaczony element</item>
<item quantity="few">%d odhaczone elementy</item>
<item quantity="many">%d odhaczonych elementów</item>
<item quantity="other">%d odhaczonych elementów</item>
</plurals>
<string name="import_folder">Importuj folder</string>
<string name="export_notes">Eksportuj notatki</string>
<string name="import_notes">Importuj notatki</string>

View File

@@ -72,7 +72,10 @@
<string name="checklist_is_empty">The checklist is empty</string>
<string name="delete_checked_items">Delete checked items</string>
<string name="add_to_the_top">Add to the top</string>
<string name="num_checked_items">%d checked items</string>
<plurals name="num_checked_items">
<item quantity="one">%d checked item</item>
<item quantity="other">%d checked items</item>
</plurals>
<!-- Import / Export -->
<string name="import_folder">Import folder</string>