From fe94dce5e3bd38825dcf8dd6253ee14a4b2157ea Mon Sep 17 00:00:00 2001 From: Cadence Ember Date: Sun, 9 Aug 2020 20:34:38 +1200 Subject: [PATCH 1/5] Add default values for Second's missing properties --- src/renderer/views/Watch/Watch.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/views/Watch/Watch.js b/src/renderer/views/Watch/Watch.js index 59d38d71..a5c3afd2 100644 --- a/src/renderer/views/Watch/Watch.js +++ b/src/renderer/views/Watch/Watch.js @@ -351,10 +351,10 @@ export default Vue.extend({ this.videoViewCount = result.viewCount this.videoLikeCount = result.likeCount this.videoDislikeCount = result.dislikeCount - this.channelSubscriptionCountText = result.subCountText + this.channelSubscriptionCountText = result.subCountText || 'FT-0' this.channelId = result.authorId this.channelName = result.author - this.channelThumbnail = result.authorThumbnails[1].url + this.channelThumbnail = result.authorThumbnails[1] ? result.authorThumbnails[1].url : '' this.videoPublished = result.published * 1000 this.videoDescriptionHtml = result.descriptionHtml this.recommendedVideos = result.recommendedVideos From 27d8eed1166c25e02c8030f99964065b768e4007 Mon Sep 17 00:00:00 2001 From: Luca Date: Tue, 11 Aug 2020 21:54:45 +0200 Subject: [PATCH 2/5] German Translation --- static/locales/de-DE.yaml | 379 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 379 insertions(+) create mode 100644 static/locales/de-DE.yaml diff --git a/static/locales/de-DE.yaml b/static/locales/de-DE.yaml new file mode 100644 index 00000000..a59893d6 --- /dev/null +++ b/static/locales/de-DE.yaml @@ -0,0 +1,379 @@ +# This document follows a roughly page to page, top to bottom, left to right view +# as things appear on the screen for the user. It is layouted in this way to allow for +# easy verification of all words and phrases by the translator. + +# For repeat entries, + #an ampersand (&) will follow the pound (#) in a comment for single item repeats, i.e: + #& Playlists + #an asterisk (*) will follow the pound (#) in a comment to reference the head listing in multiple item repeats, i.e: + #Main Color Theme: Main Color Theme + #Red: Red + #Pink: Pink + #Secondary Color Theme: Secondary Color Theme + #* Main Color Theme +# An exclamation point (!) is used for entries not yet completed. +# A tilda (~) is used for entries that are present, but do not need to be translated. i.e: + #~ 'BTC: 1Lih7Ho5gnxb1CwPD4o59ss78pwo2T91eS' + +--- +FreeTube: FreeTube +# Currently on Subscriptions, Playlists, and History +'This part of the app is not ready yet. Come back later when progress has been made.': > + Dieser Teil des Programms is noch nicht fertig. Bitte komme zu einem späteren Zeitpunkt wieder. + +# Webkit Menu Bar +File: Datei +Quit: Verlassen +Edit: Bearbeiten +Undo: Rückgängig machen +Redo: Zurück machen +Cut: Ausschneiden +Copy: Kopieren +Paste: Einfügen +Delete: Löschen +Select all: Alles auswählen +Reload: Aktualisieren +Force Reload: Erzwinge Aktualisierung +Toggle Developer Tools: Aktiviere Entwicklerwerkzeuge +Actual size: Tatsächliche Größe +Zoom in: Vergrößern +Zoom out: Verkleinern +Toggle fullscreen: Vollbild aktivieren +Window: Fenster +Minimize: Minimieren +Close: Schließen +Back: Zurück +Forward: Vorwärts + +# Search Bar +Search / Go to URL: Suche / Geh zu URL + # In Filter Button +Search Filters: + Search Filters: Suchfilter + Sort By: + Sort By: Sortiere nach + Most Relevant: Am relevantesten + Rating: Bewertung + Upload Date: Hochladedatum + View Count: Klickzahl + Time: + Time: Zeit + Any Time: Jeder Zeitraum + Last Hour: Letze Stunde + Today: Heute + This Week: Diese Woche + This Month: Dieser Monat + This Year: Dieses Jahr + Type: + Type: Typ + All Types: Alle Typen + Videos: Videos + Channels: Kanäle + #& Playlists + Duration: + Duration: Dauer + All Durations: Aller Dauern + Short (< 4 minutes): Kurz (< 4 Minuten) + Long (> 20 minutes): Lang (> 20 Minuten) + # On Search Page + Search Results: Suchergebnisse + Fetching results. Please wait: Lade Ergebnisse. Bitte warten + Fetch more results: Lade mehr Ergebnisse +# Sidebar +Subscriptions: + # On Subscriptions Page + Subscriptions: Abonnement + Latest Subscriptions: Neueste Abonnements + + 'Your Subscription list is currently empty. Start adding subscriptions to see them here.': > + Deine Abonnementliste ist aktuell leer. Beginne Abonnements hinzuzufügen um sie hier zu sehen. + + 'Getting Subscriptions. Please wait...': Hole Abonnements. Bitte warten… +Trending: Trends +Most Popular: Am beliebtesten +Playlists: Playlists +User Playlists: + Your Playlists: Deine Playlists +History: + # On History Page + History: Verlauf + Watch History: Schaue Verlauf +Settings: + # On Settings Page + Settings: Einstellungen + General Settings: + General Settings: Allgemeine Einstellungen + Fallback to Non-Preferred Backend on Failure: Falle zu nicht-präferiertem System bei Fehlschlag zurück + Enable Search Suggestions: Aktiviere Suchvorschläge + Default Landing Page: Standardseite + Preferred API Backend: + Preferred API Backend: Präferiertes API System + Local API: Lokale API + Invidious API: Invidious API + Video View Type: + Video View Type: Videoansichtstyp + Grid: Gitter + List: Liste + Thumbnail Preference: + Thumbnail Preference: Thumbnail Präferenz + Default: Standard + Beginning: Anfang + Middle: Mitte + End: Ende + 'Invidious Instance (Default is https://invidio.us)': Invidious Instanz (Standard ist https://invidio.us) + Region for Trending: Region für Trends + #! List countries + Theme Settings: + Theme Settings: Thema Einstellungen + Match Top Bar with Main Color: Passe obere Leiste an Hauptfarbe an + Base Theme: + Base Theme: Grundlegendes Thema + Black: Schwarz + Dark: Dunkel + Light: Hell + Main Color Theme: + Main Color Theme: Hauptfarbenthema + Red: Rot + Pink: Pink + Purple: Lila + Deep Purple: Dunkellila + Indigo: Indigo + Blue: Blau + Light Blue: Hellblau + Cyan: Cyan + Teal: Petrol + Green: Grün + Light Green: Hellgrün + Lime: Lindgrün + Yellow: Gelb + Amber: Bernstein + Orange: Orange + Deep Orange: Dunkelorange + Secondary Color Theme: Sekundäres Farbenthema + #* Main Color Theme + Player Settings: + Player Settings: Videoplayer Einstellungen + Force Local Backend for Legacy Formats: Erzwinge lokales System für Legacyformat + Remember History: Speichere Verlauf + Play Next Video: Spiele nächstes Video + Turn on Subtitles by Default: Untertitel standardmäßig aktivieren + Autoplay Videos: Automatische Videowiedergabe + Proxy Videos Through Invidious: Proxy Videos durch Invidious + Autoplay Playlists: Automatische Playlistwiedergabe + Enable Theatre Mode by Default: Aktiviere standardmäßig Kinomodus + Default Volume: Standard Lautstärke + Default Playback Rate: Standard Wiedergabegeschwindigkeit + Default Video Format: + Default Video Format: Standard Video Format + Dash Formats: Dash Formate + Legacy Formats: Legacy Formate + Audio Formats: Audio Formate + Default Quality: + Default Quality: Standard Qualität + Auto: Auto + 144p: 144p + 240p: 240p + 360p: 360p + 480p: 480p + 720p: 720p + 1080p: 1080p + 1440p: 1440p + 4k: 4k + 8k: 8k + Subscription Settings: + Subscription Settings: Abonnement Einstellungen + Hide Videos on Watch: Verstecke Videos bei Wiedergabe + Subscriptions Export Format: + Subscriptions Export Format: Abonnement Exportierformat + #& Freetube + Newpipe: Newpipe + OPML: OPML + Manage Subscriptions: Verwalte Abonnements + Import Subscriptions: Importiere Abonnements + Export Subscriptions: Exportiere Abonnements + How do I import my subscriptions?: Wie importiere ich meine Abonnements? + Advanced Settings: + Advanced Settings: Fortgeschrittene Einstellungen + Enable Debug Mode (Prints data to the console): Aktiviere Debug Modus (Gibt Daten auf der Konsole aus) + 'Proxy Address (Example: SOCKS5://127.0.0.1:9050 )': 'Proxy Adresse (Beispiel: SOCKS5://127.0.0.1:9050 )' + 'Clicking "TEST PROXY" button will send a request to https://ipinfo.io/json': > + Den "TESTE PROXY" Knopf zu drücken, sendet eine Anfrage an https://ipinfo.io/json + Use Tor / Proxy for API calls: Nutze Tor / Proxy für API Aufrufe + TEST PROXY: TESTE PROXY + #& Invidious Instance (Default is https://invidio.us) + See Public Instances: Zeige öffentliche Instanzen + Clear History: + Clear History: Lösche Verlauf + # On Click + Are you sure you want to delete your history?: Bist du sicher, dass du deinen Verlauf löschen möchtest? + #& Yes + #& No + Clear Subscriptions: + Clear Subscriptions: Lösche Abonnements + # On Click + Are you sure you want to remove all subscriptions?: Bist du sicher, dass du deine Abonnements löschen möchtest? + #& Yes + #& No + +About: + #On About page + About: Über + #& About + 'This software is FOSS and released under the GNU Public License v3+.': > + Dieses Programm is unter der freien Lizent GPLv3+ veröffentlicht. + + 'Found a bug? Want to suggest a feature? Want to help out? Check out our GitHub page. Pull requests are welcome.': >- + Einen Bug gefunden? Eine neue Funktion vorschlagen? Mithelfen? Schau auf unserer GitHub-Seite vorbei. + Pull requests sind wilkommen. + + Thank you very much to the People and Projects that make FreeTube possible!: > + Vielen Dank an all die Personen und Projekte die FreeTube möglich machen! + + 'Want to chat? Join our Element / Matrix Server . Please check the rules before joining.': > + Lust zu chatten? Tritt unserem Element / Matrix Server bei. Bitte lese zuvor aber noch die Regeln. + + 'Looking for help? Check out our Wiki page.': Suchst nach Hilfe? Schaue auf unserer Wiki vorbei. + + Check out our Firefox extension!: Installiere auch unsere Firefox-Erweiterung! + + 'If you enjoy using FreeTube, consider donating via Liberapay or through our Bitcoin address.': > + Falls du FreeTube gerne nutzt, erwäge doch view Liberapay oder über unsere Bitcoinadresse zu spenden. + + #~ 'BTC: 1Lih7Ho5gnxb1CwPD4o59ss78pwo2T91eS' + + Latest FreeTube News: Aktuellsten FreeTube Neuigkeiten + +#On Channel Page +Channel: + Subscriber: Abonnement + Subscribers: Abonnements + Subscribe: Abonnieren + Unsubscribe: Deabonnieren + Search Channel: Suche Kanal + Your search results have returned 0 results: Deine Suche hat 0 Ergebnisse geliefert. + Sort By: Sortiere nach + Videos: + Videos: Videos + This channel does not currently have any videos: Dieser Kanal hat aktuell keine Videos + Sort Types: + Newest: Neueste + Oldest: Älteste + Most Popular: Am beliebtesten + Playlists: + Playlists: Playlists + This channel does not currently have any playlists: Dieser Kanal hat aktuell keine Playlists + Sort Types: + Last Video Added: Zuletzt hinzugefügtes Video + Newest: Neuestes + Oldest: Ältestes + About: + About: Über + Channel Description: Kanalbeschreibung + Featured Channels: Featured Kanäle +Video: + Views: Klicks + Live Now: Gerade Live + Enable Live Chat: Aktiviere Live-Chat + Live Chat is currently not supported in this build.: Live-Chat ist in der aktuellen Version nicht unterstützt. + 'Chat is disabled or the Live Stream has ended.': Der Chat ist deaktiviert oder der Livestream zuende. + Live chat is enabled. Chat messages will appear here once sent.: Der Live chat ist aktivier. Chatnachrichten tauchen hier auf. + 'Live Chat is currently not supported with the Invidious API. A direct connection to YouTube is required.': Live Chat ist in der aktuellen Invidious API nicht unterstützt. Eine direkte Verbindung zu YouTube wird benötigt. + Published: + Jan: Jan + Feb: Feb + Mar: Mär + Apr: Apr + May: Mai + Jun: Jun + Jul: Jul + Aug: Aug + Sep: Sep + Oct: Okt + Nov: Nov + Dec: Dez + Hour: Stunde + Hours: Stunden + Day: Tag + Days: Tage + Week: Woche + Weeks: Wochen + Month: Monat + Months: Monate + Year: Jahr + Years: Jahre + Ago: Vor + Published on: Veröffentlicht am +#& Videos +Videos: + #& Sort By + Sort By: + Newest: Neuestes + Oldest: Ältestes + #& Most Popular +#& Playlists +Playlist: + #& About + View Full Playlist: Zeige volle Playlist + +# On Channel Playlist Page +Share Playlist: + Share Playlist: Teile Playlist + Copy YouTube Link: Kopiere YouTube Link + Open in YouTube: Öffne auf YouTube + Copy Invidious Link: Kopiere Invidious Link + Open in Invidious: Öffne auf Invidious + +# On Video Watch Page +#* Published +#& Views +Toggle Theatre Mode: Aktiviere Kinomodus +Change Format: + Change Video Formats: Ändere Videoformat + Use Dash Formats: Nutze Dash Format + Use Legacy Formats: Nutze Legacy Format + Use Audio Formats: Nutze Audio Format +Share: + Share Video: Teile das Video + Copy Link: Kopiere Link + Open Link: Öffne Link + Copy Embed: Kopiere Embed + Open Embed: Öffne Embed + # On Click + Invidious URL copied to clipboard: Invidious URL in die Zwischenablage kopiert + Invidious Embed URL copied to clipboard: Invidious Embed URL in die Zwischenablage kopiert + YouTube URL copied to clipboard: YouTube URL in die Zwischenablage kopiert + YouTube Embed URL copied to clipboard: YouTube Embed URL in die Zwischenablage kopiert +Mini Player: Mini Player +Comments: + Comments: Kommentare + Click to View Comments: Klicke um Kommentare anzuzeigen + Getting comment replies, please wait: Lade Kommentare, bitte warten + Show Comments: Zeige Kommentare + Hide Comments: Verstecke Kommentare + # Context: View 10 Replies, View 1 Reply + View: Zeige + Hide: Verstecke + Replies: Antworten + Reply: Antworte + There are no comments available for this video: Für dieses Video gibt es keine Kommentare + Load More Comments: Lade mehr Kommentare +Up Next: Nächster Titel + +# Toast Messages +Local API Error (Click to copy): Lokaler API Fehler (Klicke zum Kopieren) +Invidious API Error (Click to copy): Invidious API Fehler (Klicke zum Kopieren) +Falling back to Invidious API: Falle auf Invidious API zurück +Falling back to the local API: Dalle auf lokale API zurück +Subscriptions have not yet been implemented: Abonnements sind noch nicht implementiert +Loop is now disabled: Schleife ist jetzt deaktiviert +Loop is now enabled: Schleife ist jetzt aktiviert +Shuffle is now disabled: Zufallswiedergabe ist jetzt deaktiviert +Shuffle is now enabled: Zufallswiedergabe ist jetzt aktiviert +Playing Next Video: Spiele nächstes Video +Playing Previous Video: Spiele vorheriges Video +Playing next video in 5 seconds. Click to cancel: Spiele nächstes Video in 5 Sekunden. Klicke um abzubrechen +Canceled next video autoplay: Wiedergabe des nächsten Videos abgebrochen +'The playlist has ended. Enable loop to continue playing': 'Die Playlist hat das Ende erreicht. Aktiviere Schleife um weiterzuspielen' + +Yes: Ja +No: Nein From 0ba7cc53ca5ac86fdd7080ef550979cafd18efb0 Mon Sep 17 00:00:00 2001 From: Preston Date: Tue, 11 Aug 2020 18:17:09 -0400 Subject: [PATCH 3/5] Add Locale Setting and enable German Translation --- src/renderer/App.js | 12 ++++++++++++ .../components/general-settings/general-settings.js | 12 ++++++++++++ .../components/general-settings/general-settings.vue | 7 +++++++ src/renderer/main.js | 2 +- static/locales/de-DE.yaml | 1 + static/locales/en-US.yaml | 1 + 6 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/renderer/App.js b/src/renderer/App.js index cb7d4da3..63375810 100644 --- a/src/renderer/App.js +++ b/src/renderer/App.js @@ -33,6 +33,7 @@ export default Vue.extend({ this.$store.dispatch('grabUserSettings') this.$store.commit('setUsingElectron', useElectron) this.checkThemeSettings() + this.checkLocale() if (useElectron) { console.log('User is using Electron') @@ -48,6 +49,17 @@ export default Vue.extend({ } }, methods: { + checkLocale: function () { + const locale = localStorage.getItem('locale') + + if (locale === null) { + // TODO: Get User default locale + this.$i18n.locale = 'en-US' + } else { + this.$i18n.locale = locale + } + }, + checkThemeSettings: function () { let baseTheme = localStorage.getItem('baseTheme') let mainColor = localStorage.getItem('mainColor') diff --git a/src/renderer/components/general-settings/general-settings.js b/src/renderer/components/general-settings/general-settings.js index a7bc3995..a9958d27 100644 --- a/src/renderer/components/general-settings/general-settings.js +++ b/src/renderer/components/general-settings/general-settings.js @@ -23,6 +23,7 @@ export default Vue.extend({ showInvidiousInstances: false, instanceNames: [], instanceValues: [], + currentLocale: '', backendValues: [ 'invidious', 'local' @@ -562,6 +563,10 @@ export default Vue.extend({ return this.$store.getters.getThumbnailPreference }, + localeOptions: function () { + return Object.keys(this.$i18n.messages) + }, + backendNames: function () { return [ this.$t('Settings.General Settings.Preferred API Backend.Invidious API'), @@ -614,6 +619,8 @@ export default Vue.extend({ }) this.updateInvidiousInstanceBounce = debounce(this.updateInvidiousInstance, 500) + + this.currentLocale = this.$i18n.locale }, beforeDestroy: function () { if (this.invidiousInstance === '') { @@ -626,6 +633,11 @@ export default Vue.extend({ this.updateInvidiousInstanceBounce(invidiousInstance) }, + updateLocale: function (locale) { + this.$i18n.locale = locale + localStorage.setItem('locale', locale) + }, + ...mapActions([ 'updateEnableSearchSuggestions', 'updateBackendFallback', diff --git a/src/renderer/components/general-settings/general-settings.vue b/src/renderer/components/general-settings/general-settings.vue index 985785d7..4faca0c0 100644 --- a/src/renderer/components/general-settings/general-settings.vue +++ b/src/renderer/components/general-settings/general-settings.vue @@ -63,6 +63,13 @@ :select-values="thumbnailTypeValues" @change="updateThumbnailPreference" /> + { }) // List of locales approved for use -const activeLocales = ['en-US'] +const activeLocales = ['en-US', 'de-DE'] const messages = {} // Take active locales and load respective YAML file diff --git a/static/locales/de-DE.yaml b/static/locales/de-DE.yaml index a59893d6..41542a8a 100644 --- a/static/locales/de-DE.yaml +++ b/static/locales/de-DE.yaml @@ -106,6 +106,7 @@ Settings: Fallback to Non-Preferred Backend on Failure: Falle zu nicht-präferiertem System bei Fehlschlag zurück Enable Search Suggestions: Aktiviere Suchvorschläge Default Landing Page: Standardseite + Locale Preference: Locale Preference Preferred API Backend: Preferred API Backend: Präferiertes API System Local API: Lokale API diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index 5122e2d6..a5dc6eec 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -106,6 +106,7 @@ Settings: Fallback to Non-Preferred Backend on Failure: Fallback to Non-Preferred Backend on Failure Enable Search Suggestions: Enable Search Suggestions Default Landing Page: Default Landing Page + Locale Preference: Locale Preference Preferred API Backend: Preferred API Backend: Preferred API Backend Local API: Local API From d929918eec1de136a8ab5b8e2b55a669881dfe19 Mon Sep 17 00:00:00 2001 From: Preston Date: Tue, 11 Aug 2020 18:20:22 -0400 Subject: [PATCH 4/5] Update Dependencies --- package.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 74f88189..c7e4b17a 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "vue": "^2.6.11", "vue-electron": "^1.0.6", "vue-i18n": "^8.20.0", - "vue-router": "^3.4.2", + "vue-router": "^3.4.3", "vuex": "^3.5.1", "xml2json": "^0.12.0", "youtube-chat": "^1.1.0", @@ -41,9 +41,9 @@ "youtube-comments-task": "^1.3.15", "youtube-suggest": "^1.1.0", "yt-channel-info": "^1.0.3", - "yt-trending-scraper": "^1.0.2", + "yt-trending-scraper": "^1.0.3", "yt-xml2vtt": "^1.1.1", - "ytdl-core": "^3.2.0", + "ytdl-core": "^3.2.1", "ytpl": "^0.2.4", "ytsr": "^0.1.21" }, @@ -54,8 +54,8 @@ "@babel/plugin-proposal-object-rest-spread": "^7.11.0", "@babel/preset-env": "^7.11.0", "@babel/preset-typescript": "^7.10.4", - "@typescript-eslint/eslint-plugin": "^3.8.0", - "@typescript-eslint/parser": "^3.8.0", + "@typescript-eslint/eslint-plugin": "^3.9.0", + "@typescript-eslint/parser": "^3.9.0", "acorn": "^7.4.0", "babel-eslint": "^10.1.0", "babel-loader": "^8.1.0", @@ -79,8 +79,8 @@ "fast-glob": "^3.2.4", "file-loader": "^6.0.0", "html-webpack-plugin": "^4.3.0", - "jest": "^26.2.2", - "mini-css-extract-plugin": "^0.9.0", + "jest": "^26.3.0", + "mini-css-extract-plugin": "^0.10.0", "node-abi": "^2.18.0", "node-loader": "^1.0.1", "npm-run-all": "^4.1.5", From 287739de7c0b8fdbfa42bc9a37a4eae8175aa8a3 Mon Sep 17 00:00:00 2001 From: Preston Date: Tue, 11 Aug 2020 23:26:49 -0400 Subject: [PATCH 5/5] Add More Locale Strings to Both the locales file and the app --- .../components/ft-list-video/ft-list-video.js | 30 +++++++++++------- .../ft-list-video/ft-list-video.vue | 10 +++--- .../components/playlist-info/playlist-info.js | 15 +++++---- .../playlist-info/playlist-info.vue | 6 ++-- .../watch-video-comments.vue | 2 +- .../watch-video-live-chat.vue | 2 +- src/renderer/main.js | 3 ++ src/renderer/views/Channel/Channel.vue | 4 +-- static/locales/en-US.yaml | 31 ++++++++++++++----- 9 files changed, 66 insertions(+), 37 deletions(-) diff --git a/src/renderer/components/ft-list-video/ft-list-video.js b/src/renderer/components/ft-list-video/ft-list-video.js index 8b2da219..219ae7b0 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.js +++ b/src/renderer/components/ft-list-video/ft-list-video.js @@ -31,6 +31,7 @@ export default Vue.extend({ channelName: '', channelId: '', viewCount: 0, + parsedViewCount: '', uploadedTime: '', duration: '', description: '', @@ -39,14 +40,6 @@ export default Vue.extend({ isLive: false, isFavorited: false, hideViews: false, - optionsNames: [ - 'Open in YouTube', - 'Copy YouTube Link', - 'Open YouTube Embedded Player', - 'Copy YouTube Embedded Player Link', - 'Open in Invidious', - 'Copy Invidious Link' - ], optionsValues: [ 'openYoutube', 'copyYoutube', @@ -90,6 +83,17 @@ export default Vue.extend({ return `https://www.youtube-nocookie.com/embed/${this.id}` }, + optionsNames: function () { + return [ + this.$t('Video.Open in YouTube'), + this.$t('Video.Copy YouTube Link'), + this.$t('Video.Open YouTube Embedded Player'), + this.$t('Video.Copy YouTube Embedded Player Link'), + this.$t('Video.Open in Invidious'), + this.$t('Video.Copy Invidious Link') + ] + }, + thumbnail: function () { let baseUrl if (this.backendPreference === 'invidious') { @@ -206,15 +210,16 @@ export default Vue.extend({ this.duration = this.calculateVideoDuration(this.data.lengthSeconds) this.description = this.data.description this.isLive = this.data.liveNow + this.viewCount = this.data.viewCount if (typeof (this.data.publishedText) !== 'undefined') { this.uploadedTime = this.data.publishedText } if (typeof (this.data.viewCount) !== 'undefined' && this.data.viewCount !== null) { - this.viewCount = this.data.viewCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + this.parsedViewCount = this.data.viewCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') } else if (typeof (this.data.viewCountText) !== 'undefined') { - this.viewCount = this.data.viewCountText.replace(' views', '') + this.parsedViewCount = this.data.viewCountText.replace(' views', '') } else { this.hideViews = true } @@ -232,6 +237,7 @@ export default Vue.extend({ if (typeof (this.data.author) === 'string') { this.channelName = this.data.author this.channelId = this.data.ucid + this.viewCount = this.data.views // Data is returned as a literal string names 'undefined' if (this.data.length_seconds !== 'undefined') { @@ -250,10 +256,10 @@ export default Vue.extend({ } if (this.data.views !== null && typeof (this.data.views) !== 'undefined') { - this.viewCount = this.data.views.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + this.parsedViewCount = this.data.views.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') } else if (typeof (this.data.view_count) !== 'undefined') { const viewCount = this.data.view_count.replace(',', '') - this.viewCount = viewCount.replace(/\B(?=(\d{3})+(?!\d))/g, ',') + this.parsedViewCount = viewCount.replace(/\B(?=(\d{3})+(?!\d))/g, ',') } else { this.hideViews = true } diff --git a/src/renderer/components/ft-list-video/ft-list-video.vue b/src/renderer/components/ft-list-video/ft-list-video.vue index f1ab22f4..72897693 100644 --- a/src/renderer/components/ft-list-video/ft-list-video.vue +++ b/src/renderer/components/ft-list-video/ft-list-video.vue @@ -26,7 +26,7 @@ class="videoDuration" :class="{ live: isLive }" > - {{ isLive ? "Live" : duration }} + {{ isLive ? $t("Video.Live") : duration }} - Watched + {{ $t("Video.Watched") }}
• {{ viewCount }} views + >• {{ parsedViewCount }} + {{ $t("Video.Views").toLowerCase() }} + {{ $t("Video.View") }} • {{ viewCount }} watching + >• {{ viewCount }} {{ $t("Video.Watching").toLowerCase() }}

- {{ videoCount }} videos - {{ viewCount }} views - + {{ videoCount }} {{ $t("Playlist.Videos") }} - {{ viewCount }} {{ $t("Playlist.Views") }} - - Last updated on + {{ $t("Playlist.Last Updated On") }} {{ lastUpdated }}

@@ -31,7 +31,7 @@
- {{ $t("Load More Comments") }} + {{ $t("Comments.Load More Comments") }} 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 995f56af..ac932826 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 @@ -37,7 +37,7 @@ v-else class="relative" > -

Live Chat

+

{{ $t("Video.Live Chat") }}

{ const i18n = new VueI18n({ locale: 'en-US', // set locale + fallbackLocale: { + default: 'en-US' + }, messages // set locale messages }) diff --git a/src/renderer/views/Channel/Channel.vue b/src/renderer/views/Channel/Channel.vue index 22003cf8..68ef0e41 100644 --- a/src/renderer/views/Channel/Channel.vue +++ b/src/renderer/views/Channel/Channel.vue @@ -68,7 +68,7 @@ {{ $t("Channel.About.About").toUpperCase() }}
@@ -171,7 +171,7 @@ class="getNextPage" @click="handleFetchMore" > - Fetch more results… + {{ $t("Search Filters.Fetch more results") }} diff --git a/static/locales/en-US.yaml b/static/locales/en-US.yaml index a5dc6eec..7dbb8904 100644 --- a/static/locales/en-US.yaml +++ b/static/locales/en-US.yaml @@ -272,8 +272,21 @@ Channel: Channel Description: Channel Description Featured Channels: Featured Channels Video: + Open in YouTube: Open in YouTube + Copy YouTube Link: Copy YouTube Link + Open YouTube Embedded Player: Open YouTube Embedded Player + Copy YouTube Embedded Player Link: Copy YouTube Embedded Player Link + Open in Invidious: Open in Invidious + Copy Invidious Link: Copy Invidious Link + View: View Views: Views + # Context is "X People Watching" + Watching: Watching + Watched: Watched + # As in a Live Video + Live: Live Live Now: Live Now + Live Chat: Live Chat Enable Live Chat: Enable Live Chat Live Chat is currently not supported in this build.: Live Chat is currently not supported in this build. 'Chat is disabled or the Live Stream has ended.': Chat is disabled or the Live Stream has ended. @@ -315,14 +328,16 @@ Videos: Playlist: #& About View Full Playlist: View Full Playlist - -# On Channel Playlist Page -Share Playlist: - Share Playlist: Share Playlist - Copy YouTube Link: Copy YouTube Link - Open in YouTube: Open in YouTube - Copy Invidious Link: Copy Invidious Link - Open in Invidious: Open in Invidious + Videos: Videos + View: View + Views: Views + Last Updated On: Last Updated On + Share Playlist: + Share Playlist: Share Playlist + Copy YouTube Link: Copy YouTube Link + Open in YouTube: Open in YouTube + Copy Invidious Link: Copy Invidious Link + Open in Invidious: Open in Invidious # On Video Watch Page #* Published