diff options
author | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-23 10:07:03 +0100 |
---|---|---|
committer | Martin Fietz <Martin.Fietz@gmail.com> | 2016-01-23 10:07:03 +0100 |
commit | 1a0b4ce6bfd4557d1b8444ab2361014b3a2a84cf (patch) | |
tree | 5bcc020edf41678619426a11b097a92424d320c5 | |
parent | eb02da8a00a7c1f7646aab6456f75753f894f4f6 (diff) | |
parent | 9fe5e91af2beb8d5a41d21b8e21ac8338af8de47 (diff) | |
download | AntennaPod-1a0b4ce6bfd4557d1b8444ab2361014b3a2a84cf.zip |
Merge pull request #1587 from recalculated/download-plural
Say '1 download left' instead of '1 downloads left'
-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 303ca307f..1e07ec185 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> |