diff options
author | ByteHamster <info@bytehamster.com> | 2022-11-27 18:40:31 +0100 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2022-11-30 19:53:56 +0100 |
commit | 75a795e3d744fc78175deff79ccb2aeae113da0a (patch) | |
tree | d3e3e167b7dfd289b522d597ed66336c85e4929f | |
parent | 3973f450bed152a10aa46de23791f9028da33f8b (diff) | |
download | AntennaPod-75a795e3d744fc78175deff79ccb2aeae113da0a.zip |
Show human readable error message on details dialog
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/dialog/DownloadLogDetailsDialog.java | 6 | ||||
-rw-r--r-- | ui/i18n/src/main/res/values/strings.xml | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/dialog/DownloadLogDetailsDialog.java b/app/src/main/java/de/danoeh/antennapod/dialog/DownloadLogDetailsDialog.java index 023d0a152..5e28639dd 100644 --- a/app/src/main/java/de/danoeh/antennapod/dialog/DownloadLogDetailsDialog.java +++ b/app/src/main/java/de/danoeh/antennapod/dialog/DownloadLogDetailsDialog.java @@ -8,6 +8,7 @@ import androidx.annotation.NonNull; import androidx.appcompat.app.AlertDialog; import com.google.android.material.dialog.MaterialAlertDialogBuilder; import de.danoeh.antennapod.R; +import de.danoeh.antennapod.core.util.DownloadErrorLabel; import de.danoeh.antennapod.model.download.DownloadStatus; import de.danoeh.antennapod.core.storage.DBReader; import de.danoeh.antennapod.event.MessageEvent; @@ -21,7 +22,6 @@ public class DownloadLogDetailsDialog extends MaterialAlertDialogBuilder { super(context); String url = "unknown"; - String message = context.getString(R.string.download_successful); if (status.getFeedfileType() == FeedMedia.FEEDFILETYPE_FEEDMEDIA) { FeedMedia media = DBReader.getFeedMedia(status.getFeedfileId()); if (media != null) { @@ -34,11 +34,13 @@ public class DownloadLogDetailsDialog extends MaterialAlertDialogBuilder { } } + String message = context.getString(R.string.download_successful); if (!status.isSuccessful()) { message = status.getReasonDetailed(); } - String messageFull = context.getString(R.string.download_error_details_message, message, url); + String messageFull = context.getString(R.string.download_log_details_message, + context.getString(DownloadErrorLabel.from(status.getReason())), message, url); setTitle(R.string.download_error_details); setMessage(messageFull); setPositiveButton(android.R.string.ok, null); diff --git a/ui/i18n/src/main/res/values/strings.xml b/ui/i18n/src/main/res/values/strings.xml index 327d758f0..6991720d5 100644 --- a/ui/i18n/src/main/res/values/strings.xml +++ b/ui/i18n/src/main/res/values/strings.xml @@ -256,7 +256,7 @@ <string name="download_pending">Download pending</string> <string name="download_running">Download running</string> <string name="download_error_details">Details</string> - <string name="download_error_details_message">%1$s \n\nFile URL:\n%2$s</string> + <string name="download_log_details_message">%1$s \n\nTechnical reason: \n%2$s \n\nFile URL:\n%3$s</string> <string name="download_error_tap_for_details">Tap to view details.</string> <string name="download_error_device_not_found">Storage Device not found</string> <string name="download_error_insufficient_space">There is not enough space left on your device.</string> |