Make some progress on incorporating the locale file into the app

This commit is contained in:
Preston 2020-08-06 20:20:42 -04:00
parent 64b877fe27
commit 898e513974
21 changed files with 221 additions and 187 deletions

View File

@ -10,28 +10,12 @@ export default Vue.extend({
}, },
data: function () { data: function () {
return { return {
sortByTitle: 'Sort By',
sortByLabels: [
'Most Relevant',
'Rating',
'Upload Date',
'View Count'
],
sortByValues: [ sortByValues: [
'relevance', 'relevance',
'rating', 'rating',
'upload_date', 'upload_date',
'view_count' 'view_count'
], ],
timeTitle: 'Time',
timeLabels: [
'Any Time',
'Last Hour',
'Today',
'This Week',
'This Month',
'This Year'
],
timeValues: [ timeValues: [
'', '',
'hour', 'hour',
@ -40,25 +24,12 @@ export default Vue.extend({
'month', 'month',
'year' 'year'
], ],
typeTitle: 'Type',
typeLabels: [
'All Types',
'Videos',
'Channels',
'Playlists'
],
typeValues: [ typeValues: [
'all', 'all',
'video', 'video',
'channel', 'channel',
'playlist' 'playlist'
], ],
durationTitle: 'Duration',
durationLabels: [
'All Durations',
'Short (< 4 minutes)',
'Long (> 20 minutes)'
],
durationValues: [ durationValues: [
'', '',
'short', 'short',
@ -69,6 +40,43 @@ export default Vue.extend({
computed: { computed: {
searchSettings: function () { searchSettings: function () {
return this.$store.getters.getSearchSettings return this.$store.getters.getSearchSettings
},
sortByLabels: function () {
return [
this.$t('Search Filters.Sort By.Most Relevant'),
this.$t('Search Filters.Sort By.Rating'),
this.$t('Search Filters.Sort By.Upload Date'),
this.$t('Search Filters.Sort By.View Count')
]
},
timeLabels: function () {
return [
this.$t('Search Filters.Time.Any Time'),
this.$t('Search Filters.Time.Last Hour'),
this.$t('Search Filters.Time.Today'),
this.$t('Search Filters.Time.This Week'),
this.$t('Search Filters.Time.This Month'),
this.$t('Search Filters.Time.This Year')
]
},
typeLabels: function () {
return [
this.$t('Search Filters.Type.All Types'),
this.$t('Search Filters.Type.Videos'),
this.$t('Search Filters.Type.Channels'),
this.$t('Playlists')
]
},
durationLabels: function () {
return [
this.$t('Search Filters.Duration.All Durations'),
this.$t('Search Filters.Duration.Short (< 4 minutes)'),
this.$t('Search Filters.Duration.Long (> 20 minutes)')
]
} }
}, },
methods: { methods: {

View File

@ -1,32 +1,32 @@
<template> <template>
<div class="searchFilter"> <div class="searchFilter">
<h2 class="center"> <h2 class="center">
Search Filters {{ $t("Search Filters.Search Filters") }}
</h2> </h2>
<ft-flex-box class="radioFlexBox"> <ft-flex-box class="radioFlexBox">
<ft-radio-button <ft-radio-button
:title="sortByTitle" :title="$t('Search Filters.Sort By.Sort By')"
:labels="sortByLabels" :labels="sortByLabels"
:values="sortByValues" :values="sortByValues"
class="searchRadio" class="searchRadio"
@change="updateSortBy" @change="updateSortBy"
/> />
<ft-radio-button <ft-radio-button
:title="timeTitle" :title="$t('Search Filters.Time.Time')"
:labels="timeLabels" :labels="timeLabels"
:values="timeValues" :values="timeValues"
class="searchRadio radioMargin" class="searchRadio radioMargin"
@change="updateTime" @change="updateTime"
/> />
<ft-radio-button <ft-radio-button
:title="typeTitle" :title="$t('Search Filters.Type.Type')"
:labels="typeLabels" :labels="typeLabels"
:values="typeValues" :values="typeValues"
class="searchRadio radioMargin" class="searchRadio radioMargin"
@change="updateType" @change="updateType"
/> />
<ft-radio-button <ft-radio-button
:title="durationTitle" :title="$t('Search Filters.Duration.Duration')"
:labels="durationLabels" :labels="durationLabels"
:values="durationValues" :values="durationValues"
class="radioMargin" class="radioMargin"

View File

@ -1,7 +1,7 @@
<template> <template>
<ft-icon-button <ft-icon-button
ref="iconButton" ref="iconButton"
title="Share Video" :title="$t('Share.Share Video')"
theme="secondary" theme="secondary"
icon="share-alt" icon="share-alt"
dropdown-position-x="left" dropdown-position-x="left"
@ -24,14 +24,14 @@
@click="copyYoutube()" @click="copyYoutube()"
> >
<font-awesome-icon icon="copy" /> <font-awesome-icon icon="copy" />
Copy link {{ $t("Share.Copy Link") }}
</ft-button> </ft-button>
<ft-button <ft-button
class="action" class="action"
@click="openYoutube()" @click="openYoutube()"
> >
<font-awesome-icon icon="globe" /> <font-awesome-icon icon="globe" />
Open link {{ $t("Share.Open Link") }}
</ft-button> </ft-button>
<ft-button <ft-button
class="action" class="action"
@ -39,7 +39,7 @@
@click="copyYoutubeEmbed()" @click="copyYoutubeEmbed()"
> >
<font-awesome-icon icon="copy" /> <font-awesome-icon icon="copy" />
Copy embed {{ $t("Share.Copy Embed") }}
</ft-button> </ft-button>
<ft-button <ft-button
class="action" class="action"
@ -47,7 +47,7 @@
@click="openYoutubeEmbed()" @click="openYoutubeEmbed()"
> >
<font-awesome-icon icon="globe" /> <font-awesome-icon icon="globe" />
Open embed {{ $t("Share.Open Embed") }}
</ft-button> </ft-button>
</div> </div>
@ -63,14 +63,14 @@
@click="copyInvidious()" @click="copyInvidious()"
> >
<font-awesome-icon icon="copy" /> <font-awesome-icon icon="copy" />
Copy link {{ $t("Share.Copy Link") }}
</ft-button> </ft-button>
<ft-button <ft-button
class="action" class="action"
@click="openInvidious()" @click="openInvidious()"
> >
<font-awesome-icon icon="globe" /> <font-awesome-icon icon="globe" />
Open link {{ $t("Share.Open Link") }}
</ft-button> </ft-button>
<ft-button <ft-button
class="action" class="action"
@ -78,7 +78,7 @@
@click="copyInvidiousEmbed()" @click="copyInvidiousEmbed()"
> >
<font-awesome-icon icon="copy" /> <font-awesome-icon icon="copy" />
Copy embed {{ $t("Share.Copy Embed") }}
</ft-button> </ft-button>
<ft-button <ft-button
class="action" class="action"
@ -86,7 +86,7 @@
@click="openInvidiousEmbed()" @click="openInvidiousEmbed()"
> >
<font-awesome-icon icon="globe" /> <font-awesome-icon icon="globe" />
Open embed {{ $t("Share.Open Embed") }}
</ft-button> </ft-button>
</div> </div>
</div> </div>

View File

@ -20,14 +20,9 @@ export default Vue.extend({
}, },
data: function () { data: function () {
return { return {
title: 'General Settings',
showInvidiousInstances: false, showInvidiousInstances: false,
instanceNames: [], instanceNames: [],
instanceValues: [], instanceValues: [],
backendNames: [
'Invidious API',
'Local API'
],
backendValues: [ backendValues: [
'invidious', 'invidious',
'local' 'local'
@ -46,20 +41,10 @@ export default Vue.extend({
'playlists', 'playlists',
'history' 'history'
], ],
viewTypeNames: [
'Grid',
'List'
],
viewTypeValues: [ viewTypeValues: [
'grid', 'grid',
'list' 'list'
], ],
thumbnailTypeNames: [
'Default',
'Beginning',
'Middle',
'End'
],
thumbnailTypeValues: [ thumbnailTypeValues: [
'', '',
'start', 'start',
@ -575,6 +560,29 @@ export default Vue.extend({
}, },
thumbnailPreference: function () { thumbnailPreference: function () {
return this.$store.getters.getThumbnailPreference return this.$store.getters.getThumbnailPreference
},
backendNames: function () {
return [
this.$t('Settings.General Settings.Preferred API Backend.Invidious API'),
this.$t('Settings.General Settings.Preferred API Backend.Local API')
]
},
viewTypeNames: function () {
return [
this.$t('Settings.General Settings.Video View Type.Grid'),
this.$t('Settings.General Settings.Video View Type.List')
]
},
thumbnailTypeNames: function () {
return [
this.$t('Settings.General Settings.Thumbnail Preference.Default'),
this.$t('Settings.General Settings.Thumbnail Preference.Beginning'),
this.$t('Settings.General Settings.Thumbnail Preference.Middle'),
this.$t('Settings.General Settings.Thumbnail Preference.End')
]
} }
}, },
mounted: function () { mounted: function () {

View File

@ -5,29 +5,29 @@
<h3 <h3
class="videoTitle" class="videoTitle"
> >
{{ title }} {{ $t("Settings.General Settings.General Settings") }}
</h3> </h3>
<ft-flex-box class="generalSettingsFlexBox"> <ft-flex-box class="generalSettingsFlexBox">
<ft-toggle-switch <ft-toggle-switch
label="Fallback to Non-Preferred Backend on Failure" :label="$t('Settings.General Settings.Fallback to Non-Preferred Backend on Failure')"
:default-value="backendFallback" :default-value="backendFallback"
@change="updateBackendFallback" @change="updateBackendFallback"
/> />
<ft-toggle-switch <ft-toggle-switch
label="Enable Search Suggestions" :label="$t('Settings.General Settings.Enable Search Suggestions')"
:default-value="enableSearchSuggestions" :default-value="enableSearchSuggestions"
@change="updateEnableSearchSuggestions" @change="updateEnableSearchSuggestions"
/> />
<ft-toggle-switch <ft-toggle-switch
v-if="false" v-if="false"
label="Check for Updates" :label="$t('Settings.General Settings.Check for Updates')"
:default-value="checkForUpdates" :default-value="checkForUpdates"
@change="updateCheckForUpdates" @change="updateCheckForUpdates"
/> />
</ft-flex-box> </ft-flex-box>
<div class="switchGrid"> <div class="switchGrid">
<ft-select <ft-select
placeholder="Preferred API Backend" :placeholder="$t('Settings.General Settings.Preferred API Backend.Preferred API Backend')"
:value="backendPreference" :value="backendPreference"
:select-names="backendNames" :select-names="backendNames"
:select-values="backendValues" :select-values="backendValues"
@ -35,7 +35,7 @@
/> />
<ft-select <ft-select
v-if="false" v-if="false"
placeholder="Default Landing Page" :placeholder="$t('Settings.General Settings.Default Landing Page')"
:value="landingPage" :value="landingPage"
:select-names="defaultPageNames" :select-names="defaultPageNames"
:select-values="defaultPageValues" :select-values="defaultPageValues"
@ -43,21 +43,21 @@
/> />
<ft-select <ft-select
v-if="false" v-if="false"
placeholder="Region for Trending" :placeholder="$t('Settings.General Settings.Region for Trending')"
:value="region" :value="region"
:select-names="regionNames" :select-names="regionNames"
:select-values="regionValues" :select-values="regionValues"
@change="updateRegion" @change="updateRegion"
/> />
<ft-select <ft-select
placeholder="Video View Type" :placeholder="$t('Settings.General Settings.Video View Type.Video View Type')"
:value="listType" :value="listType"
:select-names="viewTypeNames" :select-names="viewTypeNames"
:select-values="viewTypeValues" :select-values="viewTypeValues"
@change="updateListType" @change="updateListType"
/> />
<ft-select <ft-select
placeholder="Thumbnail Preference" :placeholder="$t('Settings.General Settings.Thumbnail Preference.Thumbnail Preference')"
:value="thumbnailPreference" :value="thumbnailPreference"
:select-names="thumbnailTypeNames" :select-names="thumbnailTypeNames"
:select-values="thumbnailTypeValues" :select-values="thumbnailTypeValues"
@ -66,7 +66,7 @@
</div> </div>
<ft-flex-box class="generalSettingsFlexBox"> <ft-flex-box class="generalSettingsFlexBox">
<ft-input <ft-input
placeholder="Invidious Instance (Default is https://invidio.us)" :placeholder="$t('Settings.General Settings[\'Invidious Instance (Default is https://invidio.us)\']')"
:show-arrow="false" :show-arrow="false"
:show-label="true" :show-label="true"
:value="invidiousInstance" :value="invidiousInstance"

View File

@ -17,29 +17,11 @@ export default Vue.extend({
}, },
data: function () { data: function () {
return { return {
title: 'Player Settings',
formatNames: [
'Dash Formats',
'Legacy Formats',
'Audio Formats'
],
formatValues: [ formatValues: [
'dash', 'dash',
'legacy', 'legacy',
'audio' 'audio'
], ],
qualityNames: [
'Auto',
'144p',
'240p',
'360p',
'480p',
'720p',
'1080p',
'1440p',
'4k',
'8k'
],
qualityValues: [ qualityValues: [
'auto', 'auto',
144, 144,
@ -101,6 +83,29 @@ export default Vue.extend({
defaultTheatreMode: function () { defaultTheatreMode: function () {
return this.$store.getters.getDefaultTheatreMode return this.$store.getters.getDefaultTheatreMode
},
formatNames: function () {
return [
this.$t('Settings.Player Settings.Default Video Format.Dash Formats'),
this.$t('Settings.Player Settings.Default Video Format.Legacy Formats'),
this.$t('Settings.Player Settings.Default Video Format.Audio Formats')
]
},
qualityNames: function () {
return [
this.$t('Settings.Player Settings.Default Quality.Auto'),
this.$t('Settings.Player Settings.Default Quality.144p'),
this.$t('Settings.Player Settings.Default Quality.240p'),
this.$t('Settings.Player Settings.Default Quality.360p'),
this.$t('Settings.Player Settings.Default Quality.480p'),
this.$t('Settings.Player Settings.Default Quality.720p'),
this.$t('Settings.Player Settings.Default Quality.1080p'),
this.$t('Settings.Player Settings.Default Quality.1440p'),
this.$t('Settings.Player Settings.Default Quality.4k'),
this.$t('Settings.Player Settings.Default Quality.8k')
]
} }
}, },
methods: { methods: {

View File

@ -5,7 +5,7 @@
<h3 <h3
class="videoTitle" class="videoTitle"
> >
{{ title }} {{ $t("Settings.Player Settings.Player Settings") }}
</h3> </h3>
<div class="switchColumnGrid"> <div class="switchColumnGrid">
<div class="switchColumn"> <div class="switchColumn">
@ -24,13 +24,13 @@
@change="updateEnableSubtitles" @change="updateEnableSubtitles"
/> />
<ft-toggle-switch <ft-toggle-switch
label="Force Local Backend for Legacy Formats" :label="$t('Settings.Player Settings.Force Local Backend for Legacy Formats')"
:compact="true" :compact="true"
:default-value="forceLocalBackendForLegacy" :default-value="forceLocalBackendForLegacy"
@change="updateForceLocalBackendForLegacy" @change="updateForceLocalBackendForLegacy"
/> />
<ft-toggle-switch <ft-toggle-switch
label="Proxy Videos Through Invidious" :label="$t('Settings.Player Settings.Proxy Videos Through Invidious')"
:compact="true" :compact="true"
:default-value="proxyVideos" :default-value="proxyVideos"
@change="updateProxyVideos" @change="updateProxyVideos"
@ -38,26 +38,26 @@
</div> </div>
<div class="switchColumn"> <div class="switchColumn">
<ft-toggle-switch <ft-toggle-switch
label="Autoplay Videos" :label="$t('Settings.Player Settings.Autoplay Videos')"
:compact="true" :compact="true"
:default-value="autoplayVideos" :default-value="autoplayVideos"
@change="updateAutoplayVideos" @change="updateAutoplayVideos"
/> />
<ft-toggle-switch <ft-toggle-switch
label="Autoplay Playlists" :label="$t('Settings.Player Settings.Autoplay Playlists')"
:compact="true" :compact="true"
:default-value="autoplayPlaylists" :default-value="autoplayPlaylists"
@change="updateAutoplayPlaylists" @change="updateAutoplayPlaylists"
/> />
<ft-toggle-switch <ft-toggle-switch
v-if="false" v-if="false"
label="Play Next Video" :label="$t('Settings.Player Settings.Play Next Video')"
:compact="true" :compact="true"
:default-value="playNextVideo" :default-value="playNextVideo"
@change="updatePlayNextVideo" @change="updatePlayNextVideo"
/> />
<ft-toggle-switch <ft-toggle-switch
label="Enable Theatre Mode by Default" :label="$t('Settings.Player Settings.Enable Theatre Mode by Default')"
:compact="true" :compact="true"
:default-value="defaultTheatreMode" :default-value="defaultTheatreMode"
@change="updateDefaultTheatreMode" @change="updateDefaultTheatreMode"
@ -66,7 +66,7 @@
</div> </div>
<ft-flex-box> <ft-flex-box>
<ft-slider <ft-slider
label="Default Volume" :label="$t('Settings.Player Settings.Default Volume')"
:default-value="defaultVolume" :default-value="defaultVolume"
:min-value="0" :min-value="0"
:max-value="100" :max-value="100"
@ -75,7 +75,7 @@
@change="parseVolumeBeforeUpdate" @change="parseVolumeBeforeUpdate"
/> />
<ft-slider <ft-slider
label="Default Playback Rate" :label="$t('Settings.Player Settings.Default Playback Rate')"
:default-value="defaultPlayback" :default-value="defaultPlayback"
:min-value="0.25" :min-value="0.25"
:max-value="3" :max-value="3"
@ -86,14 +86,14 @@
</ft-flex-box> </ft-flex-box>
<ft-flex-box> <ft-flex-box>
<ft-select <ft-select
placeholder="Default Video Format" :placeholder="$t('Settings.Player Settings.Default Video Format.Default Video Format')"
:value="defaultVideoFormat" :value="defaultVideoFormat"
:select-names="formatNames" :select-names="formatNames"
:select-values="formatValues" :select-values="formatValues"
@change="updateDefaultVideoFormat" @change="updateDefaultVideoFormat"
/> />
<ft-select <ft-select
placeholder="Default Quality" :placeholder="$t('Settings.Player Settings.Default Quality.Default Quality')"
:value="defaultQuality" :value="defaultQuality"
:select-names="qualityNames" :select-names="qualityNames"
:select-values="qualityValues" :select-values="qualityValues"

View File

@ -14,7 +14,7 @@
class="navIcon" class="navIcon"
/> />
<p class="navLabel"> <p class="navLabel">
Subscriptions {{ $t("Subscriptions.Subscriptions") }}
</p> </p>
<font-awesome-icon <font-awesome-icon
class="refreshIcon" class="refreshIcon"
@ -30,7 +30,7 @@
class="navIcon" class="navIcon"
/> />
<p class="navLabel"> <p class="navLabel">
Trending {{ $t("Trending") }}
</p> </p>
</div> </div>
<div <div
@ -42,7 +42,7 @@
class="navIcon" class="navIcon"
/> />
<p class="navLabel"> <p class="navLabel">
Most Popular {{ $t("Most Popular") }}
</p> </p>
</div> </div>
<div <div
@ -54,7 +54,7 @@
class="navIcon" class="navIcon"
/> />
<p class="navLabel"> <p class="navLabel">
Playlists {{ $t("Playlists") }}
</p> </p>
</div> </div>
<side-nav-more-options <side-nav-more-options
@ -69,7 +69,7 @@
class="navIcon" class="navIcon"
/> />
<p class="navLabel"> <p class="navLabel">
History {{ $t("History.History") }}
</p> </p>
</div> </div>
<hr> <hr>
@ -82,7 +82,7 @@
class="navIcon" class="navIcon"
/> />
<p class="navLabel"> <p class="navLabel">
Settings {{ $t("Settings.Settings") }}
</p> </p>
</div> </div>
<div <div
@ -94,7 +94,7 @@
class="navIcon" class="navIcon"
/> />
<p class="navLabel"> <p class="navLabel">
About {{ $t("About.About") }}
</p> </p>
</div> </div>
<hr> <hr>

View File

@ -15,38 +15,14 @@ export default Vue.extend({
}, },
data: function () { data: function () {
return { return {
title: 'Theme Settings',
currentBaseTheme: '', currentBaseTheme: '',
currentMainColor: '', currentMainColor: '',
currentSecColor: '', currentSecColor: '',
baseThemeNames: [
'Light',
'Dark',
'Black'
],
baseThemeValues: [ baseThemeValues: [
'light', 'light',
'dark', 'dark',
'black' 'black'
], ],
colorNames: [
'Red',
'Pink',
'Purple',
'Deep Purple',
'Indigo',
'Blue',
'Light Blue',
'Cyan',
'Teal',
'Green',
'Light Green',
'Lime',
'Yellow',
'Amber',
'Orange',
'Deep Orange'
],
colorValues: [ colorValues: [
'Red', 'Red',
'Pink', 'Pink',
@ -70,6 +46,35 @@ export default Vue.extend({
computed: { computed: {
barColor: function () { barColor: function () {
return this.$store.getters.getBarColor return this.$store.getters.getBarColor
},
baseThemeNames: function () {
return [
this.$t('Settings.Theme Settings.Base Theme.Light'),
this.$t('Settings.Theme Settings.Base Theme.Dark'),
this.$t('Settings.Theme Settings.Base Theme.Black')
]
},
colorNames: function () {
return [
this.$t('Settings.Theme Settings.Main Color Theme.Red'),
this.$t('Settings.Theme Settings.Main Color Theme.Pink'),
this.$t('Settings.Theme Settings.Main Color Theme.Purple'),
this.$t('Settings.Theme Settings.Main Color Theme.Deep Purple'),
this.$t('Settings.Theme Settings.Main Color Theme.Indigo'),
this.$t('Settings.Theme Settings.Main Color Theme.Blue'),
this.$t('Settings.Theme Settings.Main Color Theme.Light Blue'),
this.$t('Settings.Theme Settings.Main Color Theme.Cyan'),
this.$t('Settings.Theme Settings.Main Color Theme.Teal'),
this.$t('Settings.Theme Settings.Main Color Theme.Green'),
this.$t('Settings.Theme Settings.Main Color Theme.Light Green'),
this.$t('Settings.Theme Settings.Main Color Theme.Lime'),
this.$t('Settings.Theme Settings.Main Color Theme.Yellow'),
this.$t('Settings.Theme Settings.Main Color Theme.Amber'),
this.$t('Settings.Theme Settings.Main Color Theme.Orange'),
this.$t('Settings.Theme Settings.Main Color Theme.Deep Orange')
]
} }
}, },
mounted: function () { mounted: function () {

View File

@ -3,11 +3,11 @@
class="relative card" class="relative card"
> >
<h3> <h3>
{{ title }} {{ $t("Settings.Theme Settings.Theme Settings") }}
</h3> </h3>
<ft-flex-box> <ft-flex-box>
<ft-toggle-switch <ft-toggle-switch
label="Match Top Bar with Main Color" :label="$t('Settings.Theme Settings.Match Top Bar with Main Color')"
:default-value="barColor" :default-value="barColor"
@change="updateBarColor" @change="updateBarColor"
/> />
@ -15,21 +15,21 @@
<br> <br>
<ft-flex-box> <ft-flex-box>
<ft-select <ft-select
placeholder="Base Theme" :placeholder="$t('Settings.Theme Settings.Base Theme.Base Theme')"
:value="currentBaseTheme" :value="currentBaseTheme"
:select-names="baseThemeNames" :select-names="baseThemeNames"
:select-values="baseThemeValues" :select-values="baseThemeValues"
@change="updateBaseTheme" @change="updateBaseTheme"
/> />
<ft-select <ft-select
placeholder="Main Color Theme" :placeholder="$t('Settings.Theme Settings.Main Color Theme.Main Color Theme')"
:value="currentMainColor" :value="currentMainColor"
:select-names="colorNames" :select-names="colorNames"
:select-values="colorValues" :select-values="colorValues"
@change="updateMainColor" @change="updateMainColor"
/> />
<ft-select <ft-select
placeholder="Secondary Color Theme" :placeholder="$t('Settings.Theme Settings.Secondary Color Theme')"
:value="currentSecColor" :value="currentSecColor"
:select-names="colorNames" :select-names="colorNames"
:select-values="colorValues" :select-values="colorValues"

View File

@ -36,7 +36,7 @@
<div class="middle"> <div class="middle">
<div class="searchContainer"> <div class="searchContainer">
<ft-input <ft-input
placeholder="Search / Go to URL" :placeholder="$t('Search / Go to URL')"
class="searchInput" class="searchInput"
:is-search="true" :is-search="true"
:data-list="searchSuggestionsDataList" :data-list="searchSuggestionsDataList"

View File

@ -63,11 +63,6 @@ export default Vue.extend({
data: function () { data: function () {
return { return {
formatTypeLabel: 'VIDEO FORMATS', formatTypeLabel: 'VIDEO FORMATS',
formatTypeNames: [
'USE DASH FORMATS',
'USE LEGACY FORMATS',
'USE AUDIO FORMATS'
],
formatTypeValues: [ formatTypeValues: [
'dash', 'dash',
'legacy', 'legacy',
@ -84,6 +79,14 @@ export default Vue.extend({
return this.$store.getters.getUsingElectron return this.$store.getters.getUsingElectron
}, },
formatTypeNames: function () {
return [
this.$t('Change Format.Use Dash Formats').toUpperCase(),
this.$t('Change Format.Use Legacy Formats').toUpperCase(),
this.$t('Change Format.Use Audio Formats').toUpperCase()
]
},
totalLikeCount: function () { totalLikeCount: function () {
return this.likeCount + this.dislikeCount return this.likeCount + this.dislikeCount
}, },
@ -93,17 +96,18 @@ export default Vue.extend({
}, },
parsedViewCount: function () { parsedViewCount: function () {
return this.viewCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + ' views' return this.viewCount.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + ` ${this.$t('Video.Views').toLowerCase()}`
}, },
subscribedText: function () { subscribedText: function () {
return `SUBSCRIBE ${this.subscriptionCountText}` return `${this.$t('Subscribe').toUpperCase()} ${this.subscriptionCountText}`
}, },
dateString() { dateString() {
const date = new Date(this.published) const date = new Date(this.published)
const dateSplit = date.toDateString().split(' ') const dateSplit = date.toDateString().split(' ')
return `${dateSplit[1]} ${dateSplit[2]}, ${dateSplit[3]}` const localeDateString = `Video.Published.${dateSplit[1]}`
return `${this.$t(localeDateString)} ${dateSplit[2]}, ${dateSplit[3]}`
} }
}, },
methods: { methods: {

View File

@ -38,7 +38,7 @@
</div> </div>
<div> <div>
<div class="datePublished"> <div class="datePublished">
Published {{ dateString }} {{ $t("Video.Published on") }} {{ dateString }}
</div> </div>
<div class="viewCount"> <div class="viewCount">
{{ parsedViewCount }} {{ parsedViewCount }}
@ -59,14 +59,14 @@
</div> </div>
<div class="videoOptions"> <div class="videoOptions">
<ft-icon-button <ft-icon-button
title="Toggle Theatre Mode" :title="$t('Toggle Theatre Mode')"
class="theatreModeButton option" class="theatreModeButton option"
icon="expand-alt" icon="expand-alt"
theme="secondary" theme="secondary"
@click="$emit('theatreMode')" @click="$emit('theatreMode')"
/> />
<ft-icon-button <ft-icon-button
title="Change Video Formats" :title="$t('Change Format.Change Video Formats')"
class="option" class="option"
theme="secondary" theme="secondary"
icon="file-video" icon="file-video"

View File

@ -1,7 +1,7 @@
<template> <template>
<ft-card class="relative watchVideoRecommendations"> <ft-card class="relative watchVideoRecommendations">
<h3> <h3>
Up Next {{ $t("Up Next") }}
</h3> </h3>
<ft-list-video <ft-list-video
v-for="(video, index) in data" v-for="(video, index) in data"

View File

@ -1,10 +1,10 @@
<template> <template>
<div> <div>
<ft-card class="card"> <ft-card class="card">
<h3>History</h3> <h3>{{ $t("History.History") }}</h3>
<ft-flex-box> <ft-flex-box>
<p class="message"> <p class="message">
This part of the app is not ready yet. Come back later when progress has been made. {{ $t("This part of the app is not ready yet. Come back later when progress has been made.") }}
</p> </p>
</ft-flex-box> </ft-flex-box>
</ft-card> </ft-card>

View File

@ -8,7 +8,7 @@
v-else v-else
class="card" class="card"
> >
<h3>Most Popular</h3> <h3>{{ $t("Most Popular") }}</h3>
<ft-element-list <ft-element-list
:data="shownResults" :data="shownResults"
/> />

View File

@ -1,7 +1,7 @@
<template> <template>
<div> <div>
<ft-card class="card"> <ft-card class="card">
<h3>Subscriptions</h3> <h3>{{ $t("Subscriptions.Subscriptions") }}</h3>
<ft-flex-box> <ft-flex-box>
<p class="message"> <p class="message">
{{ $t("This part of the app is not ready yet. Come back later when progress has been made.") }} {{ $t("This part of the app is not ready yet. Come back later when progress has been made.") }}

View File

@ -8,7 +8,7 @@
v-else v-else
class="card" class="card"
> >
<h3>Trending</h3> <h3>{{ $t("Trending") }}</h3>
<ft-element-list <ft-element-list
:data="shownResults" :data="shownResults"
/> />

View File

@ -1,10 +1,10 @@
<template> <template>
<div> <div>
<ft-card class="card"> <ft-card class="card">
<h3>Your Playlists</h3> <h3>{{ $t("User Playlists.Your Playlists") }}</h3>
<ft-flex-box> <ft-flex-box>
<p class="message"> <p class="message">
This part of the app is not ready yet. Come back later when progress has been made. {{ $t("This part of the app is not ready yet. Come back later when progress has been made.") }}
</p> </p>
</ft-flex-box> </ft-flex-box>
</ft-card> </ft-card>

View File

@ -213,7 +213,7 @@ export default Vue.extend({
this.recommendedVideos = result.related_videos this.recommendedVideos = result.related_videos
this.videoLikeCount = result.videoDetails.likes this.videoLikeCount = result.videoDetails.likes
this.videoDislikeCount = result.videoDetails.dislikes this.videoDislikeCount = result.videoDetails.dislikes
this.isLive = result.player_response.videoDetails.isLive this.isLive = result.player_response.videoDetails.isLiveContent
if (this.videoDislikeCount === null) { if (this.videoDislikeCount === null) {
this.videoDislikeCount = 0 this.videoDislikeCount = 0

View File

@ -89,35 +89,11 @@ Subscriptions:
Your Subscription list is currently empty. Start adding subscriptions to see them here. Your Subscription list is currently empty. Start adding subscriptions to see them here.
'Getting Subscriptions. Please wait...': Getting Subscriptions. Please wait… 'Getting Subscriptions. Please wait...': Getting Subscriptions. Please wait…
Live Now: Live Now Trending: Trending
Published:
Jan: Jan
Feb: Feb
Mar: Mar
Apr: Apr
May: May
Jun: Jun
Jul: Jul
Aug: Aug
Sep: Sep
Oct: Oct
Nov: Nov
Dec: Dec
Hour: Hour
Hours: Hours
Day: Day
Days: Days
Week: Week
Weeks: Weeks
Month: Month
Months: Months
Year: Year
Years: Years
Ago: Ago
Published on: Published on
Featured: Featured
Most Popular: Most Popular Most Popular: Most Popular
Playlists: Playlists Playlists: Playlists
User Playlists:
Your Playlists: Your Playlists
History: History:
# On History Page # On History Page
History: History History: History
@ -130,8 +106,8 @@ Settings:
Fallback to Non-Preferred Backend on Failure: Fallback to Non-Preferred Backend on Failure Fallback to Non-Preferred Backend on Failure: Fallback to Non-Preferred Backend on Failure
Enable Search Suggestions: Enable Search Suggestions Enable Search Suggestions: Enable Search Suggestions
Default Landing Page: Default Landing Page Default Landing Page: Default Landing Page
Perferred API Backend: Preferred API Backend:
Perferred API Backend: Perferred API Backend Preferred API Backend: Preferred API Backend
Local API: Local API Local API: Local API
Invidious API: Invidious API Invidious API: Invidious API
Video View Type: Video View Type:
@ -160,7 +136,7 @@ Settings:
Red: Red Red: Red
Pink: Pink Pink: Pink
Purple: Purple Purple: Purple
Dark Purple: Dark Purple Deep Purple: Deep Purple
Indigo: Indigo Indigo: Indigo
Blue: Blue Blue: Blue
Light Blue: Light Blue Light Blue: Light Blue
@ -272,7 +248,34 @@ Subscriber: Subscriber
Subscribers: Subscribers Subscribers: Subscribers
Subscribe: Subscribe Subscribe: Subscribe
Unsubscribe: Unsubscribe Unsubscribe: Unsubscribe
Video: Video Video:
Views: Views
Live Now: Live Now
Published:
Jan: Jan
Feb: Feb
Mar: Mar
Apr: Apr
May: May
Jun: Jun
Jul: Jul
Aug: Aug
Sep: Sep
Oct: Oct
Nov: Nov
Dec: Dec
Hour: Hour
Hours: Hours
Day: Day
Days: Days
Week: Week
Weeks: Weeks
Month: Month
Months: Months
Year: Year
Years: Years
Ago: Ago
Published on: Published on
#& Videos #& Videos
Videos: Videos:
#& Sort By #& Sort By
@ -299,13 +302,14 @@ Share Playlist:
# On Video Watch Page # On Video Watch Page
#* Published #* Published
#& Views #& Views
Toggle Theatre Mode: Toggle Theatre Mode
Change Format: Change Format:
Change Format: Change Format Change Video Formats: Change Video Formats
Use Dash Formats: Use Dash Formats Use Dash Formats: Use Dash Formats
Use Legacy Formats: Use Legacy Formats Use Legacy Formats: Use Legacy Formats
Use Audio Formats: Use Audio Formats Use Audio Formats: Use Audio Formats
Share: Share:
Share: Share Share Video: Share Video
Copy Link: Copy Link Copy Link: Copy Link
Open Link: Open Link Open Link: Open Link
Copy Embed: Copy Embed Copy Embed: Copy Embed