- This channel does not currently have any playlists
+ {{ $t("Channel.Playlists.This channel does not currently have any playlists") }}
- Your search results have returned 0 results
+ {{ $t("Channel.Your search results have returned 0 results") }}
{
console.log(err)
+ const errorMessage = this.$t('Local API Error (Click to copy)')
+ this.showToast({
+ message: `${errorMessage}: ${err}`,
+ time: 10000,
+ action: () => {
+ navigator.clipboard.writeText(err)
+ }
+ })
if (this.backendPreference === 'local' && this.backendFallback) {
- console.log('Error getting data with local backend, falling back to Invidious')
+ this.showToast({
+ message: this.$t('Falling back to Invidious API')
+ })
this.performSearchInvidious(payload)
} else {
this.isLoading = false
@@ -206,8 +217,18 @@ export default Vue.extend({
this.$store.commit('addToSessionSearchHistory', historyPayload)
}).catch((err) => {
console.log(err)
+ const errorMessage = this.$t('Invidious API Error (Click to copy)')
+ this.showToast({
+ message: `${errorMessage}: ${err}`,
+ time: 10000,
+ action: () => {
+ navigator.clipboard.writeText(err)
+ }
+ })
if (this.backendPreference === 'invidious' && this.backendFallback) {
- console.log('Error getting data with Invidious, falling back to local backend')
+ this.showToast({
+ message: this.$t('Falling back to Local API')
+ })
this.performSearchLocal(payload)
} else {
this.isLoading = false
@@ -228,6 +249,10 @@ export default Vue.extend({
console.log(payload)
+ this.showToast({
+ message: this.$t('Search Filters["Fetching results. Please wait"]')
+ })
+
if (this.nextPageRef !== '') {
this.performSearchLocal(payload)
} else {
@@ -249,6 +274,10 @@ export default Vue.extend({
}
this.isLoading = false
- }
+ },
+
+ ...mapActions([
+ 'showToast'
+ ])
}
})
diff --git a/src/renderer/views/Search/Search.vue b/src/renderer/views/Search/Search.vue
index d7fc9c78..814f5cc2 100644
--- a/src/renderer/views/Search/Search.vue
+++ b/src/renderer/views/Search/Search.vue
@@ -10,7 +10,7 @@
v-else
class="card"
>
-
Search Results
+ {{ $t("Search Filters.Search Results") }}
@@ -18,7 +18,7 @@
class="getNextPage"
@click="nextPage"
>
- Fetch more results…
+ {{ $t("Search Filters.Fetch more results") }}