diff options
author | recalculated <recalculated@users.noreply.github.com> | 2016-01-21 21:23:23 -0600 |
---|---|---|
committer | recalculated <recalculated@users.noreply.github.com> | 2016-01-22 22:17:32 -0600 |
commit | 9fe5e91af2beb8d5a41d21b8e21ac8338af8de47 (patch) | |
tree | 13755453cffa2565c2d42e07e0604efd46238260 /core/src | |
parent | 6d6a8d2fcda2ba2c8d1ef51049403aa6b25d31f2 (diff) | |
download | AntennaPod-9fe5e91af2beb8d5a41d21b8e21ac8338af8de47.zip |
Use plurals for x downloads left
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java | 3 | ||||
-rw-r--r-- | core/src/main/res/values/strings.xml | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java index c3afff276..ed4377a72 100644 --- a/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java +++ b/core/src/main/java/de/danoeh/antennapod/core/service/download/DownloadService.java @@ -361,7 +361,8 @@ public class DownloadService extends Service { int numDownloads = requester.getNumberOfDownloads(); String downloadsLeft; if (numDownloads > 0) { - downloadsLeft = requester.getNumberOfDownloads() + getString(R.string.downloads_left); + downloadsLeft = getResources() + .getQuantityString(R.plurals.downloads_left, numDownloads, numDownloads); } else { downloadsLeft = getString(R.string.downloads_processing); } diff --git a/core/src/main/res/values/strings.xml b/core/src/main/res/values/strings.xml index 91a77e6e2..65f6d1cef 100644 --- a/core/src/main/res/values/strings.xml +++ b/core/src/main/res/values/strings.xml @@ -187,7 +187,10 @@ <string name="download_error_io_error">IO Error</string> <string name="download_error_request_error">Request Error</string> <string name="download_error_db_access">Database Access Error</string> - <string name="downloads_left">\u0020Downloads left</string> + <plurals name="downloads_left"> + <item quantity="one">%d download left</item> + <item quantity="other">%d downloads left</item> + </plurals> <string name="downloads_processing">Processing downloads</string> <string name="download_notification_title">Downloading podcast data</string> <string name="download_report_content">%1$d downloads succeeded, %2$d failed</string> |