mirror of
https://github.com/nextcloud/notes-android.git
synced 2024-11-24 13:56:14 +03:00
#68 integrate a singular and plural version of <string name="ab_selected">
This commit is contained in:
parent
39930e9357
commit
b7141f3e0a
3 changed files with 18 additions and 4 deletions
|
@ -308,8 +308,8 @@ public class NotesListViewActivity extends AppCompatActivity implements
|
|||
} else {
|
||||
v.setSelected(true);
|
||||
}
|
||||
mActionMode.setTitle(String.valueOf(adapter.getSelected().size())
|
||||
+ " " + getString(R.string.ab_selected));
|
||||
int size = adapter.getSelected().size();
|
||||
mActionMode.setTitle(String.valueOf(getResources().getQuantityString(R.plurals.ab_selected, size, size)));
|
||||
int checkedItemCount = adapter.getSelected().size();
|
||||
boolean hasCheckedItems = checkedItemCount > 0;
|
||||
|
||||
|
@ -350,8 +350,7 @@ public class NotesListViewActivity extends AppCompatActivity implements
|
|||
v.setSelected(selected);
|
||||
mActionMode = startSupportActionMode(new MultiSelectedActionModeCallback());
|
||||
int checkedItemCount = adapter.getSelected().size();
|
||||
mActionMode.setTitle(String.valueOf(checkedItemCount)
|
||||
+ " " + getString(R.string.ab_selected));
|
||||
mActionMode.setTitle(getResources().getQuantityString(R.plurals.ab_selected, checkedItemCount, checkedItemCount));
|
||||
}
|
||||
return selected;
|
||||
}
|
||||
|
|
8
app/src/main/res/values-fr/plurals.xml
Normal file
8
app/src/main/res/values-fr/plurals.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<plurals
|
||||
name="ab_selected">
|
||||
<item quantity="one">%d selected fr</item>
|
||||
<item quantity="other">%d selected fr</item>
|
||||
</plurals>
|
||||
</resources>
|
7
app/src/main/res/values/plurals.xml
Normal file
7
app/src/main/res/values/plurals.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<plurals
|
||||
name="ab_selected">
|
||||
<item quantity="other">%d selected</item>
|
||||
</plurals>
|
||||
</resources>
|
Loading…
Reference in a new issue