diff --git a/package-lock.json b/package-lock.json index 8647867c..6f359876 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6035,9 +6035,9 @@ "dev": true }, "css-loader": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-4.2.0.tgz", - "integrity": "sha512-ko7a9b0iFpWtk9eSI/C8IICvZeGtYnjxYjw45rJprokXj/+kBd/siX4vAIBq9Uij8Jubc4jL1EvSnTjCEwaHSw==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-4.2.1.tgz", + "integrity": "sha512-MoqmF1if7Z0pZIEXA4ZF9PgtCXxWbfzfJM+3p+OYfhcrwcqhaCRb74DSnfzRl7e024xEiCRn5hCvfUbTf2sgFA==", "dev": true, "requires": { "camelcase": "^6.0.0", @@ -6834,9 +6834,9 @@ } }, "electron": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/electron/-/electron-9.1.2.tgz", - "integrity": "sha512-xEYadr3XqIqJ4ktBPo0lhzPdovv4jLCpiUUGc2M1frUhFhwqXokwhPaTUcE+zfu5+uf/ONDnQApwjzznBsRrgQ==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/electron/-/electron-9.2.0.tgz", + "integrity": "sha512-4ecZ3rcGg//Gk4fAK3Jo61T+uh36JhU6HHR/PTujQqQiBw1g4tNPd4R2hGGth2d+7FkRIs5GdRNef7h64fQEMw==", "dev": true, "requires": { "@electron/get": "^1.0.1", @@ -7181,9 +7181,9 @@ } }, "electron-context-menu": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/electron-context-menu/-/electron-context-menu-2.2.0.tgz", - "integrity": "sha512-ArnzPlGqBrkOFOAWbq4aVWMtN6ZfYxVNon8s+akOm7ffnNv8yqYi4EPiMeQ5UU894dPi7I1PhTGVKBlOQM4a1g==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/electron-context-menu/-/electron-context-menu-2.3.0.tgz", + "integrity": "sha512-XYsYkNY+jvX4C5o09qMuZoKL6e9frnQzBFehZSIiKp6zK0u3XYowJYDyK3vDKKZxYsOIGiE/Gbx40jERC03Ctw==", "requires": { "cli-truncate": "^2.0.0", "electron-dl": "^3.0.0", @@ -7201,9 +7201,9 @@ } }, "electron-dl": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-3.0.1.tgz", - "integrity": "sha512-JHEsUCusT7x/i682LNl1gJYWTiic71Sp3ykdvwbgywGuY19dLUd3VqkE5zI905e4Wy+G/pDcLjoeFo0SgCm3CA==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/electron-dl/-/electron-dl-3.0.2.tgz", + "integrity": "sha512-pRgE9Jbhoo5z6Vk3qi+vIrfpMDlCp2oB1UeR96SMnsfz073jj0AZGQwp69EdIcEvlUlwBSGyJK8Jt6OB6JLn+g==", "requires": { "ext-name": "^5.0.0", "pupa": "^2.0.1", @@ -16363,14 +16363,14 @@ } }, "sass-loader": { - "version": "9.0.2", - "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-9.0.2.tgz", - "integrity": "sha512-nphcum3jNI442njnrZ5wJgSNX5lfEOHOKHCLf+PrTIaleploKqAMUuT9CVKjf+lyi6c2MCGPHh1vb9nGsjnZJA==", + "version": "9.0.3", + "resolved": "https://registry.npmjs.org/sass-loader/-/sass-loader-9.0.3.tgz", + "integrity": "sha512-fOwsP98ac1VMme+V3+o0HaaMHp8Q/C9P+MUazLFVi3Jl7ORGHQXL1XeRZt3zLSGZQQPC8xE42Y2WptItvGjDQg==", "dev": true, "requires": { - "klona": "^1.1.1", + "klona": "^1.1.2", "loader-utils": "^2.0.0", - "neo-async": "^2.6.1", + "neo-async": "^2.6.2", "schema-utils": "^2.7.0", "semver": "^7.3.2" }, @@ -16388,9 +16388,9 @@ } }, "ajv-keywords": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.1.tgz", - "integrity": "sha512-KWcq3xN8fDjSB+IMoh2VaXVhRI0BBGxoYp3rx7Pkb6z0cFjYR9Q9l4yZqqals0/zsioCmocC5H6UvsGD4MoIBA==", + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", "dev": true }, "big.js": { @@ -16422,6 +16422,12 @@ "json5": "^2.1.2" } }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, "schema-utils": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-2.7.0.tgz", @@ -18820,9 +18826,9 @@ } }, "vue-router": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.3.4.tgz", - "integrity": "sha512-SdKRBeoXUjaZ9R/8AyxsdTqkOfMcI5tWxPZOUX5Ie1BTL5rPSZ0O++pbiZCeYeythiZIdLEfkDiQPKIaWk5hDg==" + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/vue-router/-/vue-router-3.4.2.tgz", + "integrity": "sha512-n3Ok70hW0EpcJF4lcWIwSHAQbFTnIOLl/fhO8+oTs4jHNtBNsovcVvPZeTOyKEd8C3xF1Crft2ASuOiVT5K1mw==" }, "vue-style-loader": { "version": "4.1.2", @@ -20042,9 +20048,9 @@ } }, "yt-channel-info": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/yt-channel-info/-/yt-channel-info-1.0.2.tgz", - "integrity": "sha512-zY7+wrBVrooI1jbEsiIMrjf+/kD0V7XpiewoPpu0uwkGUzyboNYtgxRJ1808YutyW5F+2vfAfEMDQv19k0jJ5g==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/yt-channel-info/-/yt-channel-info-1.0.3.tgz", + "integrity": "sha512-AFFh403fCX+vRei+bExIwgO7OPDydbLdq57HtZIQ1bn7/f4w7Vv7Vh/G+HT9s5yIApbqrbR9uPetPWofG0KDuw==", "requires": { "axios": "^0.18.0", "querystring": "^0.2.0" @@ -20099,17 +20105,17 @@ } }, "ytpl": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/ytpl/-/ytpl-0.2.3.tgz", - "integrity": "sha512-UfPAGj8RIQoWqa1nTB6leqkBUBVKg36Tv5gtSKtnT4vy7AvGL9iUnVIBkzII6lrds5oBS8e+hxciz/nEqx0ztw==", + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/ytpl/-/ytpl-0.2.4.tgz", + "integrity": "sha512-ExjaGdNucs9mjWZ+6BT4c/LV0B2NmLv0gcLoX9DnY2Qfq1fWAEYZQ1PE3E820BVlPcX5mF39guNXeFk/APT9ew==", "requires": { "html-entities": "^1.1.3" } }, "ytsr": { - "version": "0.1.20", - "resolved": "https://registry.npmjs.org/ytsr/-/ytsr-0.1.20.tgz", - "integrity": "sha512-enrGr+JQEFXzEo1jvGbdaw7odAemHl6sR3Wyi50ympb/k46kKZ16gqxHgwf8RD3+pLzv1aZea2kJ3iURQXEvfw==", + "version": "0.1.21", + "resolved": "https://registry.npmjs.org/ytsr/-/ytsr-0.1.21.tgz", + "integrity": "sha512-JbHqd/0LdzqfxblyAx1Nh+/YOhkGmXnf/w6djqPYeCRlyRgH2um3yyfZ+lJVIvCn431fEOfPvX6byg2wJM8YJA==", "requires": { "html-entities": "^1.1.3" } diff --git a/package.json b/package.json index 9aba08b0..4e9fad5a 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "autolinker": "^3.14.1", "bulma-pro": "^0.2.0", "dateformat": "^3.0.3", - "electron-context-menu": "^2.2.0", + "electron-context-menu": "^2.3.0", "jquery": "^3.5.1", "js-yaml": "^3.14.0", "lodash.debounce": "^4.0.8", @@ -33,18 +33,18 @@ "vue": "^2.6.11", "vue-electron": "^1.0.6", "vue-i18n": "^8.20.0", - "vue-router": "^3.3.4", + "vue-router": "^3.4.2", "vuex": "^3.5.1", "xml2json": "^0.12.0", "youtube-chat": "^1.1.0", "youtube-comments-fetch": "^1.0.1", "youtube-comments-task": "^1.3.15", "youtube-suggest": "^1.1.0", - "yt-channel-info": "^1.0.2", + "yt-channel-info": "^1.0.3", "yt-xml2vtt": "^1.1.1", "ytdl-core": "^3.2.0", - "ytpl": "^0.2.3", - "ytsr": "^0.1.20" + "ytpl": "^0.2.4", + "ytsr": "^0.1.21" }, "description": "A private YouTube client", "devDependencies": { @@ -59,9 +59,9 @@ "babel-eslint": "^10.1.0", "babel-loader": "^8.1.0", "copy-webpack-plugin": "^6.0.3", - "css-loader": "^4.2.0", + "css-loader": "^4.2.1", "devtron": "^1.4.0", - "electron": "^9.1.2", + "electron": "^9.2.0", "electron-builder": "^22.8.0", "electron-builder-squirrel-windows": "^22.8.1", "electron-debug": "^3.1.0", @@ -85,7 +85,7 @@ "npm-run-all": "^4.1.5", "prettier": "^2.0.5", "sass": "^1.26.10", - "sass-loader": "^9.0.2", + "sass-loader": "^9.0.3", "style-loader": "^1.2.1", "tree-kill": "1.2.2", "typescript": "^3.9.7", diff --git a/src/renderer/components/ft-share-button/ft-share-button.js b/src/renderer/components/ft-share-button/ft-share-button.js index 0693c2fc..35e5f57c 100644 --- a/src/renderer/components/ft-share-button/ft-share-button.js +++ b/src/renderer/components/ft-share-button/ft-share-button.js @@ -60,7 +60,9 @@ export default Vue.extend({ }, copyInvidious() { - this.showToast('Invidious URL copied to clipboard') + this.showToast({ + message: this.$t('Share.Invidious URL copied to clipboard') + }) this.copy(this.invidiousURL) this.$refs.iconButton.toggleDropdown() }, @@ -71,7 +73,9 @@ export default Vue.extend({ }, copyYoutube() { - this.showToast('YouTube URL copied to clipboard') + this.showToast({ + message: this.$t('Share.YouTube URL copied to clipboard') + }) this.copy(this.youtubeURL) this.$refs.iconButton.toggleDropdown() }, @@ -82,7 +86,9 @@ export default Vue.extend({ }, copyYoutubeEmbed() { - this.showToast('YouTube Embed URL copied to clipboard') + this.showToast({ + message: this.$t('Share.YouTube Embed URL copied to clipboard') + }) this.copy(this.youtubeEmbedURL) this.$refs.iconButton.toggleDropdown() }, @@ -93,7 +99,9 @@ export default Vue.extend({ }, copyInvidiousEmbed() { - this.showToast('Invidious Embed URL copied to clipboard') + this.showToast({ + message: this.$t('Share.Invidious Embed URL copied to clipboard') + }) this.copy(this.invidiousEmbedURL) this.$refs.iconButton.toggleDropdown() }, diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.js b/src/renderer/components/watch-video-comments/watch-video-comments.js index 4e19c42e..f3415ddb 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.js +++ b/src/renderer/components/watch-video-comments/watch-video-comments.js @@ -68,8 +68,9 @@ export default Vue.extend({ getCommentDataLocal: function () { console.log('Getting comment data please wait..') ytct(this.id, this.nextPageToken).fork(e => { + const errorMessage = this.$t('Local API Error (Click to copy)') this.showToast({ - message: `Local API Error (Click to copy): ${e.message}`, + message: `${errorMessage}: ${e.message}`, time: 10000, action: () => { navigator.clipboard.writeText(e.message) @@ -78,7 +79,7 @@ export default Vue.extend({ console.error('ERROR', e) if (this.backendFallback && this.backendPreference === 'local') { this.showToast({ - message: 'Falling back to Invidious API' + message: this.$t('Falling back to Invidious API') }) this.getCommentDataInvidious() } else { @@ -143,8 +144,18 @@ export default Vue.extend({ }).catch((xhr) => { console.log('found an error') console.log(xhr) + const errorMessage = this.$t('Invidious API Error (Click to copy)') + this.showToast({ + message: `${errorMessage}: ${xhr.responseText}`, + time: 10000, + action: () => { + navigator.clipboard.writeText(xhr.responseText) + } + }) if (this.backendFallback && this.backendPreference === 'invidious') { - console.log('Falling back to local API') + this.showToast({ + message: this.$t('Falling back to Local API') + }) this.getCommentDataLocal() } else { this.isLoading = false @@ -153,7 +164,9 @@ export default Vue.extend({ }, getCommentRepliesInvidious: function (index) { - console.log('Getting comment replies') + this.showToast({ + message: this.$t('Getting comment replies, please wait') + }) const payload = { resource: 'comments', id: this.id, @@ -186,6 +199,14 @@ export default Vue.extend({ }).catch((xhr) => { console.log('found an error') console.log(xhr) + const errorMessage = this.$t('Invidious API Error (Click to copy)') + this.showToast({ + message: `${errorMessage}: ${xhr.responseText}`, + time: 10000, + action: () => { + navigator.clipboard.writeText(xhr.responseText) + } + }) this.isLoading = false }) }, diff --git a/src/renderer/components/watch-video-comments/watch-video-comments.vue b/src/renderer/components/watch-video-comments/watch-video-comments.vue index 89996ec2..60135f53 100644 --- a/src/renderer/components/watch-video-comments/watch-video-comments.vue +++ b/src/renderer/components/watch-video-comments/watch-video-comments.vue @@ -8,24 +8,24 @@ class="getCommentsTitle" @click="getCommentData" > - Click to view comments + {{ $t("Comments.Click to View Comments") }}
- There are no comments available for this video. + {{ $t("There are no comments available for this video") }}
- Load More Comments + {{ $t("Load More Comments") }}
diff --git a/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js b/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js index cb6ee429..8cd126dd 100644 --- a/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js +++ b/src/renderer/components/watch-video-live-chat/watch-video-live-chat.js @@ -77,7 +77,7 @@ export default Vue.extend({ created: function () { if (!this.usingElectron) { this.hasError = true - this.errorMessage = 'Live Chat is currently not supported in this build.' + this.errorMessage = this.$t('Video["Live Chat is currently not supported in this build."]') } else { switch (this.backendPreference) { case 'local': @@ -89,7 +89,7 @@ export default Vue.extend({ this.getLiveChatLocal() } else { this.hasError = true - this.errorMessage = 'Live Chat is currently not supported with the Invidious API. A direct connection to YouTube is required.' + this.errorMessage = this.$t('Video["Live Chat is currently not supported with the Invidious API. A direct connection to YouTube is required."]') this.showEnableChat = true this.isLoading = false } @@ -120,7 +120,7 @@ export default Vue.extend({ console.log(reason) this.hasError = true this.showEnableChat = false - this.errorMessage = 'Chat is disabled or the Live Stream has ended.' + this.errorMessage = this.$t('Video["Chat is disabled or the Live Stream has ended."]') }) this.liveChat.on('error', (err) => { diff --git a/src/renderer/components/watch-video-live-chat/watch-video-live-chat.vue b/src/renderer/components/watch-video-live-chat/watch-video-live-chat.vue index 9fb5de92..995f56af 100644 --- a/src/renderer/components/watch-video-live-chat/watch-video-live-chat.vue +++ b/src/renderer/components/watch-video-live-chat/watch-video-live-chat.vue @@ -18,7 +18,7 @@ />