diff --git a/ui/i18n/src/main/res/values/strings.xml b/ui/i18n/src/main/res/values/strings.xml
index 42cab5f25..70628a198 100644
--- a/ui/i18n/src/main/res/values/strings.xml
+++ b/ui/i18n/src/main/res/values/strings.xml
@@ -77,7 +77,10 @@
Shown
- Total size of episodes on the device
+
+ - Total size of %d episode on the device
+ - Total size of %d episodes on the device
+
Open menu
diff --git a/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/downloads/DownloadStatisticsListAdapter.java b/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/downloads/DownloadStatisticsListAdapter.java
index 2af3f0bf7..4ab6f3a13 100644
--- a/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/downloads/DownloadStatisticsListAdapter.java
+++ b/ui/statistics/src/main/java/de/danoeh/antennapod/ui/statistics/downloads/DownloadStatisticsListAdapter.java
@@ -16,6 +16,7 @@ import java.util.List;
*/
public class DownloadStatisticsListAdapter extends StatisticsListAdapter {
private final Fragment fragment;
+ private int cacheEpisodes;
public DownloadStatisticsListAdapter(Context context, Fragment fragment) {
super(context);
@@ -24,7 +25,8 @@ public class DownloadStatisticsListAdapter extends StatisticsListAdapter {
@Override
protected String getHeaderCaption() {
- return context.getString(R.string.total_size_downloaded_podcasts);
+ return context.getResources().getQuantityString(
+ R.plurals.total_size_downloaded_podcasts, cacheEpisodes, cacheEpisodes);
}
@Override
@@ -35,9 +37,11 @@ public class DownloadStatisticsListAdapter extends StatisticsListAdapter {
@Override
protected PieChartView.PieChartData generateChartData(List statisticsData) {
float[] dataValues = new float[statisticsData.size()];
+ cacheEpisodes = 0;
for (int i = 0; i < statisticsData.size(); i++) {
StatisticsItem item = statisticsData.get(i);
dataValues[i] = item.totalDownloadSize;
+ cacheEpisodes += item.episodesDownloadCount;
}
return new PieChartView.PieChartData(dataValues);
}