From 155e8ce8784da60244f0d7ee02c4a525960ad2a1 Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Fri, 30 Aug 2024 11:05:29 -0700 Subject: [PATCH] Update: "failed to get" strings --- client/components/modals/libraries/LazyFolderChooser.vue | 2 +- client/pages/audiobook/_id/chapters.vue | 2 +- client/pages/config/sessions.vue | 4 ++-- client/pages/config/users/_id/sessions.vue | 4 ++-- client/pages/library/_library/podcast/download-queue.vue | 2 +- client/pages/library/_library/podcast/latest.vue | 2 +- client/pages/library/_library/podcast/search.vue | 4 ++-- client/strings/en-us.json | 6 ++++++ 8 files changed, 16 insertions(+), 10 deletions(-) diff --git a/client/components/modals/libraries/LazyFolderChooser.vue b/client/components/modals/libraries/LazyFolderChooser.vue index 061e702f9..ae867d443 100644 --- a/client/components/modals/libraries/LazyFolderChooser.vue +++ b/client/components/modals/libraries/LazyFolderChooser.vue @@ -162,7 +162,7 @@ export default { }) .catch((error) => { console.error('Failed to get filesystem paths', error) - this.$toast.error('Failed to get filesystem paths') + this.$toast.error(this.$strings.ToastGetFilesystemPathsFailed) return [] }) .finally(() => { diff --git a/client/pages/audiobook/_id/chapters.vue b/client/pages/audiobook/_id/chapters.vue index 5449af094..23c7fb179 100644 --- a/client/pages/audiobook/_id/chapters.vue +++ b/client/pages/audiobook/_id/chapters.vue @@ -560,7 +560,7 @@ export default { .catch((error) => { this.findingChapters = false console.error('Failed to get chapter data', error) - this.$toast.error('Failed to find chapters') + this.$toast.error(this.$strings.ToastGetChaptersFailed) this.showFindChaptersModal = false }) }, diff --git a/client/pages/config/sessions.vue b/client/pages/config/sessions.vue index e0b512c63..c4be11c36 100644 --- a/client/pages/config/sessions.vue +++ b/client/pages/config/sessions.vue @@ -358,12 +358,12 @@ export default { }) if (!libraryItem) { - this.$toast.error('Failed to get library item') + this.$toast.error(this.$strings.ToastGetLibraryItemFailed) this.processingGoToTimestamp = false return } if (session.episodeId && !libraryItem.media.episodes.some((ep) => ep.id === session.episodeId)) { - this.$toast.error('Failed to get podcast episode') + this.$toast.error(this.$strings.ToastGetPodcastEpisodeFailed) this.processingGoToTimestamp = false return } diff --git a/client/pages/config/users/_id/sessions.vue b/client/pages/config/users/_id/sessions.vue index 8e7ebfb86..18e802bb6 100644 --- a/client/pages/config/users/_id/sessions.vue +++ b/client/pages/config/users/_id/sessions.vue @@ -127,12 +127,12 @@ export default { }) if (!libraryItem) { - this.$toast.error('Failed to get library item') + this.$toast.error(this.$strings.ToastGetLibraryItemFailed) this.processingGoToTimestamp = false return } if (session.episodeId && !libraryItem.media.episodes.some((ep) => ep.id === session.episodeId)) { - this.$toast.error('Failed to get podcast episode') + this.$toast.error(this.$strings.ToastGetPodcastEpisodeFailed) this.processingGoToTimestamp = false return } diff --git a/client/pages/library/_library/podcast/download-queue.vue b/client/pages/library/_library/podcast/download-queue.vue index 49b4d4da6..65306cec2 100644 --- a/client/pages/library/_library/podcast/download-queue.vue +++ b/client/pages/library/_library/podcast/download-queue.vue @@ -111,7 +111,7 @@ export default { this.processing = true const queuePayload = await this.$axios.$get(`/api/libraries/${this.libraryId}/episode-downloads`).catch((error) => { console.error('Failed to get download queue', error) - this.$toast.error('Failed to get download queue') + this.$toast.error(this.$strings.ToastGetDownloadQueueFailed) return null }) this.processing = false diff --git a/client/pages/library/_library/podcast/latest.vue b/client/pages/library/_library/podcast/latest.vue index 800e7bfd7..dc6e8bd00 100644 --- a/client/pages/library/_library/podcast/latest.vue +++ b/client/pages/library/_library/podcast/latest.vue @@ -211,7 +211,7 @@ export default { this.processing = true const episodePayload = await this.$axios.$get(`/api/libraries/${this.libraryId}/recent-episodes?limit=25&page=${page}`).catch((error) => { console.error('Failed to get recent episodes', error) - this.$toast.error('Failed to get recent episodes') + this.$toast.error(this.$strings.ToastGetRecentEpisodesFailed) return null }) this.processing = false diff --git a/client/pages/library/_library/podcast/search.vue b/client/pages/library/_library/podcast/search.vue index c7808979f..b80ca2f8f 100644 --- a/client/pages/library/_library/podcast/search.vue +++ b/client/pages/library/_library/podcast/search.vue @@ -146,7 +146,7 @@ export default { this.processing = true var payload = await this.$axios.$post(`/api/podcasts/feed`, { rssFeed }).catch((error) => { console.error('Failed to get feed', error) - this.$toast.error('Failed to get podcast feed') + this.$toast.error(this.$strings.ToastPodcastGetFeedFailed) return null }) this.processing = false @@ -197,7 +197,7 @@ export default { this.processing = true const payload = await this.$axios.$post(`/api/podcasts/feed`, { rssFeed: podcast.feedUrl }).catch((error) => { console.error('Failed to get feed', error) - this.$toast.error('Failed to get podcast feed') + this.$toast.error(this.$strings.ToastPodcastGetFeedFailed) return null }) this.processing = false diff --git a/client/strings/en-us.json b/client/strings/en-us.json index ad7beb0e7..fe0777c06 100644 --- a/client/strings/en-us.json +++ b/client/strings/en-us.json @@ -869,6 +869,12 @@ "ToastFailedToUpdateAccount": "Failed to update account", "ToastFailedToUpdateUser": "Failed to update user", "ToastFfprobeFailed": "FFprobe failed", + "ToastGetChaptersFailed": "Failed to get chapters", + "ToastGetDownloadQueueFailed": "Failed to get download queue", + "ToastGetFilesystemPathsFailed": "Failed to get filesystem paths", + "ToastGetLibraryItemFailed": "Failed to get library item", + "ToastGetPodcastEpisodeFailed": "Failed to get podcast episode", + "ToastGetRecentEpisodesFailed": "Failed to get recent episodes", "ToastInvalidImageUrl": "Invalid image URL", "ToastInvalidUrl": "Invalid URL", "ToastItemCoverUpdateFailed": "Failed to update item cover",