mirror of
https://github.com/advplyr/audiobookshelf-app.git
synced 2025-08-04 01:54:33 +02:00
Add more translation strings, clean out unused strings #448
This commit is contained in:
parent
fed6579e08
commit
a26f37aa49
36 changed files with 530 additions and 9201 deletions
|
@ -12,7 +12,7 @@
|
|||
<div class="top-6 right-4 absolute cursor-pointer">
|
||||
<span class="material-icons text-3xl" :class="{ 'text-black text-opacity-75': coverBgIsLight }" @click="showMoreMenuDialog = true">more_vert</span>
|
||||
</div>
|
||||
<p class="top-4 absolute left-0 right-0 mx-auto text-center uppercase tracking-widest text-opacity-75" :class="{ 'text-black text-opacity-75': coverBgIsLight }" style="font-size: 10px">{{ isDirectPlayMethod ? 'Direct' : isLocalPlayMethod ? 'Local' : 'Transcode' }}</p>
|
||||
<p class="top-4 absolute left-0 right-0 mx-auto text-center uppercase tracking-widest text-opacity-75" :class="{ 'text-black text-opacity-75': coverBgIsLight }" style="font-size: 10px">{{ isDirectPlayMethod ? $strings.LabelPlaybackDirect : isLocalPlayMethod ? $strings.LabelPlaybackLocal : $strings.LabelPlaybackTranscode }}</p>
|
||||
</div>
|
||||
|
||||
<div v-if="useChapterTrack && useTotalTrack && showFullscreen" class="absolute total-track w-full z-30 px-6">
|
||||
|
@ -175,7 +175,7 @@ export default {
|
|||
// TODO: Implement on iOS
|
||||
if (this.$platform !== 'ios' && !this.isPodcast && this.mediaId) {
|
||||
items.push({
|
||||
text: 'History',
|
||||
text: this.$strings.ButtonHistory,
|
||||
value: 'history',
|
||||
icon: 'history'
|
||||
})
|
||||
|
@ -184,22 +184,22 @@ export default {
|
|||
items.push(
|
||||
...[
|
||||
{
|
||||
text: 'Total Track',
|
||||
text: this.$strings.LabelTotalTrack,
|
||||
value: 'total_track',
|
||||
icon: this.useTotalTrack ? 'check_box' : 'check_box_outline_blank'
|
||||
},
|
||||
{
|
||||
text: 'Chapter Track',
|
||||
text: this.$strings.LabelChapterTrack,
|
||||
value: 'chapter_track',
|
||||
icon: this.useChapterTrack ? 'check_box' : 'check_box_outline_blank'
|
||||
},
|
||||
{
|
||||
text: this.lockUi ? 'Unlock Player' : 'Lock Player',
|
||||
text: this.lockUi ? this.$strings.LabelUnlockPlayer : this.$strings.LabelLockPlayer,
|
||||
value: 'lock',
|
||||
icon: this.lockUi ? 'lock' : 'lock_open'
|
||||
},
|
||||
{
|
||||
text: 'Close Player',
|
||||
text: this.$strings.LabelClosePlayer,
|
||||
value: 'close',
|
||||
icon: 'close'
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ export default {
|
|||
return this.$store.getters['libraries/getCurrentLibrary']
|
||||
},
|
||||
currentLibraryIcon() {
|
||||
return this.currentLibrary ? this.currentLibrary.icon : 'database'
|
||||
return this.currentLibrary?.icon || 'database'
|
||||
},
|
||||
userHasPlaylists() {
|
||||
return this.$store.state.libraries.numUserPlaylists
|
||||
|
|
|
@ -64,16 +64,16 @@ export default {
|
|||
return this.$route.query || {}
|
||||
},
|
||||
entityTitle() {
|
||||
if (this.isPodcast) return 'Podcasts'
|
||||
if (this.page === 'library') return 'Books'
|
||||
if (this.isPodcast) return this.$strings.LabelPodcasts
|
||||
if (this.page === 'library') return this.$strings.LabelBooks
|
||||
else if (this.page === 'series') {
|
||||
return 'Series'
|
||||
return this.$strings.LabelSeries
|
||||
} else if (this.page === 'collections') {
|
||||
return 'Collections'
|
||||
return this.$strings.ButtonCollections
|
||||
} else if (this.page === 'playlists') {
|
||||
return 'Playlists'
|
||||
return this.$strings.ButtonPlaylists
|
||||
} else if (this.page === 'authors') {
|
||||
return 'Authors'
|
||||
return this.$strings.LabelAuthors
|
||||
}
|
||||
return ''
|
||||
},
|
||||
|
@ -92,7 +92,7 @@ export default {
|
|||
if (this.seriesBookPage) {
|
||||
return [
|
||||
{
|
||||
text: 'Collapse Sub-Series',
|
||||
text: this.$strings.LabelCollapseSeries,
|
||||
value: 'collapse_subseries',
|
||||
icon: this.settings.collapseBookSeries ? 'check_box' : 'check_box_outline_blank'
|
||||
}
|
||||
|
@ -100,7 +100,7 @@ export default {
|
|||
} else {
|
||||
return [
|
||||
{
|
||||
text: 'Collapse Series',
|
||||
text: this.$strings.LabelCollapseSeries,
|
||||
value: 'collapse_series',
|
||||
icon: this.settings.collapseSeries ? 'check_box' : 'check_box_outline_blank'
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<div class="w-full overflow-x-hidden overflow-y-auto bg-primary rounded-lg border border-white border-opacity-20 p-2" style="max-height: 75%" @click.stop>
|
||||
<p class="mb-2">{{ mediaMetadata.title }}</p>
|
||||
|
||||
<div v-if="size" class="text-sm mb-2">Size: {{ $bytesPretty(size) }}</div>
|
||||
<div v-if="size" class="text-sm mb-2">{{ $strings.LabelSize }}: {{ $bytesPretty(size) }}</div>
|
||||
|
||||
<p class="mb-1 text-xs text-gray-200">ID: {{ _libraryItem.id }}</p>
|
||||
</div>
|
||||
|
|
|
@ -381,13 +381,9 @@ export default {
|
|||
return
|
||||
}
|
||||
|
||||
let confirmMessage = `Remove local episode "${localFile.basePath}" from your device?`
|
||||
if (this.serverLibraryItemId) {
|
||||
confirmMessage += ' The file on the server will be unaffected.'
|
||||
}
|
||||
const { value } = await Dialog.confirm({
|
||||
title: 'Confirm',
|
||||
message: confirmMessage
|
||||
message: this.$getString('MessageConfirmDeleteLocalEpisode', [localFile.basePath])
|
||||
})
|
||||
if (value) {
|
||||
const res = await AbsFileSystem.deleteTrackFromItem({ id: this.localLibraryItemId, trackLocalFileId: localFile.id, trackContentUrl: localEpisodeAudioTrack.contentUrl })
|
||||
|
@ -411,13 +407,9 @@ export default {
|
|||
async deleteLocalItem() {
|
||||
await this.$hapticsImpact()
|
||||
|
||||
let confirmMessage = 'Remove local files of this item from your device?'
|
||||
if (this.serverLibraryItemId) {
|
||||
confirmMessage += ' The files on the server and your progress will be unaffected.'
|
||||
}
|
||||
const { value } = await Dialog.confirm({
|
||||
title: 'Confirm',
|
||||
message: confirmMessage
|
||||
message: this.$strings.MessageConfirmDeleteLocalFiles
|
||||
})
|
||||
if (value) {
|
||||
const res = await AbsFileSystem.deleteItem(this.localLibraryItem)
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
<!-- table of contents modal -->
|
||||
<modals-fullscreen-modal v-model="showTOCModal" :theme="ereaderTheme">
|
||||
<div class="flex items-end justify-between h-20 px-4 pb-2">
|
||||
<h1 class="text-lg">Table of Contents</h1>
|
||||
<h1 class="text-lg">{{ $strings.HeaderTableOfContents }}</h1>
|
||||
<button class="flex" @click.stop="showTOCModal = false">
|
||||
<span class="material-icons">close</span>
|
||||
</button>
|
||||
|
@ -47,7 +47,7 @@
|
|||
</li>
|
||||
</ul>
|
||||
<div v-if="!chapters.length" class="flex h-full items-center justify-center">
|
||||
<p class="text-xl">{{ 'No Chapters' }}</p>
|
||||
<p class="text-xl">{{ $strings.MessageNoChapters }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -56,7 +56,7 @@
|
|||
<!-- ereader settings modal -->
|
||||
<modals-fullscreen-modal v-model="showSettingsModal" :theme="ereaderTheme" half-screen>
|
||||
<div class="flex items-end justify-between h-20 px-4 pb-2 mb-8">
|
||||
<h1 class="text-lg">Ereader Settings</h1>
|
||||
<h1 class="text-lg">{{ $strings.HeaderEreaderSettings }}</h1>
|
||||
<button class="flex" @click="showSettingsModal = false">
|
||||
<span class="material-icons">close</span>
|
||||
</button>
|
||||
|
@ -65,19 +65,19 @@
|
|||
<div class="w-full h-full px-4">
|
||||
<div class="flex items-center mb-8">
|
||||
<div class="w-32">
|
||||
<p class="text-base">Theme:</p>
|
||||
<p class="text-base">{{ $strings.LabelTheme }}:</p>
|
||||
</div>
|
||||
<ui-toggle-btns v-model="ereaderSettings.theme" :items="themeItems" @input="settingsUpdated" />
|
||||
</div>
|
||||
<div class="flex items-center mb-8">
|
||||
<div class="w-32">
|
||||
<p class="text-base">Font scale:</p>
|
||||
<p class="text-base">{{ $strings.LabelFontScale }}:</p>
|
||||
</div>
|
||||
<ui-range-input v-model="ereaderSettings.fontScale" :min="5" :max="300" :step="5" input-width="180px" @input="settingsUpdated" />
|
||||
</div>
|
||||
<div class="flex items-center mb-8">
|
||||
<div class="w-32">
|
||||
<p class="text-base">Line spacing:</p>
|
||||
<p class="text-base">{{ $strings.LabelLineSpacing }}:</p>
|
||||
</div>
|
||||
<ui-range-input v-model="ereaderSettings.lineSpacing" :min="100" :max="300" :step="5" input-width="180px" @input="settingsUpdated" />
|
||||
</div>
|
||||
|
@ -155,11 +155,11 @@ export default {
|
|||
themeItems() {
|
||||
return [
|
||||
{
|
||||
text: 'Dark',
|
||||
text: this.$strings.LabelThemeDark,
|
||||
value: 'dark'
|
||||
},
|
||||
{
|
||||
text: 'Light',
|
||||
text: this.$strings.LabelThemeLight,
|
||||
value: 'light'
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div class="w-96 my-6 mx-auto">
|
||||
<h1 class="text-2xl mb-4">Minutes Listening <span class="text-white text-opacity-60 text-lg">(Last 7 days)</span></h1>
|
||||
<h1 class="text-2xl mb-4">{{ $strings.HeaderStatsMinutesListeningChart }}</h1>
|
||||
<div class="relative w-96 h-72">
|
||||
<div class="absolute top-0 left-0">
|
||||
<template v-for="lbl in yAxisLabels">
|
||||
|
@ -32,24 +32,24 @@
|
|||
</div>
|
||||
<div class="flex justify-between pt-12">
|
||||
<div>
|
||||
<p class="text-sm text-center">Week Listening</p>
|
||||
<p class="text-sm text-center">{{ $strings.LabelStatsWeekListening }}</p>
|
||||
<p class="text-5xl font-semibold text-center" style="line-height: 0.85">{{ totalMinutesListeningThisWeek }}</p>
|
||||
<p class="text-sm text-center">minutes</p>
|
||||
<p class="text-sm text-center">{{ $strings.LabelStatsMinutes }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-sm text-center">Daily Average</p>
|
||||
<p class="text-sm text-center">{{ $strings.LabelStatsDailyAverage }}</p>
|
||||
<p class="text-5xl font-semibold text-center" style="line-height: 0.85">{{ averageMinutesPerDay }}</p>
|
||||
<p class="text-sm text-center">minutes</p>
|
||||
<p class="text-sm text-center">{{ $strings.LabelStatsMinutes }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-sm text-center">Best Day</p>
|
||||
<p class="text-sm text-center">{{ $strings.LabelStatsBestDay }}</p>
|
||||
<p class="text-5xl font-semibold text-center" style="line-height: 0.85">{{ mostListenedDay }}</p>
|
||||
<p class="text-sm text-center">minutes</p>
|
||||
<p class="text-sm text-center">{{ $strings.LabelStatsMinutes }}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="text-sm text-center">Days</p>
|
||||
<p class="text-sm text-center">{{ $strings.LabelStatsDays }}</p>
|
||||
<p class="text-5xl font-semibold text-center" style="line-height: 0.85">{{ daysInARow }}</p>
|
||||
<p class="text-sm text-center">in a row</p>
|
||||
<p class="text-sm text-center">{{ $strings.LabelStatsInARow }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -82,46 +82,6 @@ export default {
|
|||
sortKey: 'publishedAt',
|
||||
sortDesc: true,
|
||||
filterKey: 'incomplete',
|
||||
episodeSortItems: [
|
||||
{
|
||||
text: 'Pub Date',
|
||||
value: 'publishedAt'
|
||||
},
|
||||
{
|
||||
text: 'Title',
|
||||
value: 'title'
|
||||
},
|
||||
{
|
||||
text: 'Season',
|
||||
value: 'season'
|
||||
},
|
||||
{
|
||||
text: 'Episode',
|
||||
value: 'episode'
|
||||
}
|
||||
],
|
||||
filterItems: [
|
||||
{
|
||||
text: 'Show All',
|
||||
value: 'all'
|
||||
},
|
||||
{
|
||||
text: 'Incomplete',
|
||||
value: 'incomplete'
|
||||
},
|
||||
{
|
||||
text: 'In Progress',
|
||||
value: 'inProgress'
|
||||
},
|
||||
{
|
||||
text: 'Complete',
|
||||
value: 'complete'
|
||||
},
|
||||
{
|
||||
text: 'Downloaded',
|
||||
value: 'downloaded'
|
||||
}
|
||||
],
|
||||
fetchingRSSFeed: false,
|
||||
podcastFeedEpisodes: [],
|
||||
showPodcastEpisodeFeed: false,
|
||||
|
@ -156,6 +116,50 @@ export default {
|
|||
episodesAreFiltered() {
|
||||
return this.episodesFiltered.length !== this.episodesCopy.length
|
||||
},
|
||||
episodeSortItems() {
|
||||
return [
|
||||
{
|
||||
text: this.$strings.LabelPubDate,
|
||||
value: 'publishedAt'
|
||||
},
|
||||
{
|
||||
text: this.$strings.LabelTitle,
|
||||
value: 'title'
|
||||
},
|
||||
{
|
||||
text: this.$strings.LabelSeason,
|
||||
value: 'season'
|
||||
},
|
||||
{
|
||||
text: this.$strings.LabelEpisode,
|
||||
value: 'episode'
|
||||
}
|
||||
]
|
||||
},
|
||||
filterItems() {
|
||||
return [
|
||||
{
|
||||
text: this.$strings.LabelShowAll,
|
||||
value: 'all'
|
||||
},
|
||||
{
|
||||
text: this.$strings.LabelIncomplete,
|
||||
value: 'incomplete'
|
||||
},
|
||||
{
|
||||
text: this.$strings.LabelInProgress,
|
||||
value: 'inProgress'
|
||||
},
|
||||
{
|
||||
text: this.$strings.LabelComplete,
|
||||
value: 'complete'
|
||||
},
|
||||
{
|
||||
text: this.$strings.LabelDownloaded,
|
||||
value: 'downloaded'
|
||||
}
|
||||
]
|
||||
},
|
||||
episodesFiltered() {
|
||||
return this.episodesCopy.filter((ep) => {
|
||||
if (this.filterKey === 'downloaded') {
|
||||
|
@ -230,7 +234,7 @@ export default {
|
|||
},
|
||||
async searchEpisodes() {
|
||||
if (!this.networkConnected) {
|
||||
return this.$toast.error('No network connection')
|
||||
return this.$toast.error(this.$strings.MessageNoNetworkConnection)
|
||||
}
|
||||
|
||||
if (!this.mediaMetadata.feedUrl) {
|
||||
|
|
|
@ -59,20 +59,19 @@ export default {
|
|||
methods: {
|
||||
showAlertDialog() {
|
||||
var msg = ''
|
||||
var meteredString = this.isNetworkUnmetered ? 'unmetered' : 'metered'
|
||||
if (this.attemptingConnection) {
|
||||
msg = 'Attempting server connection'
|
||||
msg = this.$strings.MessageAttemptingServerConnection
|
||||
} else if (!this.networkConnected) {
|
||||
msg = 'No internet'
|
||||
msg = this.$strings.MessageNoNetworkConnection
|
||||
} else if (!this.socketConnected) {
|
||||
msg = 'Socket not connected'
|
||||
msg = this.$strings.MessageSocketNotConnected
|
||||
} else if (this.isCellular) {
|
||||
msg = `Socket connected over ${meteredString} cellular`
|
||||
msg = this.isNetworkUnmetered ? this.$strings.MessageSocketConnectedOverUnmeteredCellular : this.$strings.MessageSocketConnectedOverMeteredCellular
|
||||
} else {
|
||||
msg = `Socket connected over ${meteredString} wifi`
|
||||
msg = this.isNetworkUnmetered ? this.$strings.MessageSocketConnectedOverUnmeteredWifi : this.$strings.MessageSocketConnectedOverMeteredWifi
|
||||
}
|
||||
Dialog.alert({
|
||||
title: 'Connection Status',
|
||||
title: this.$strings.HeaderConnectionStatus,
|
||||
message: msg
|
||||
})
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ export default {
|
|||
}
|
||||
|
||||
if (!data.localLibraryItem) {
|
||||
this.$toast.error('Item download complete but failed to create library item')
|
||||
this.$toast.error(this.$strings.MessageItemDownloadCompleteFailedToCreate)
|
||||
} else {
|
||||
this.$toast.success(`Item "${data.localLibraryItem.media.metadata.title}" download finished`)
|
||||
this.$eventBus.$emit('new-local-library-item', data.localLibraryItem)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue