mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-08-31 23:20:05 +02:00
Localization updates for 2.15.0 (#3520)
* Add: episode edit dropdowns * Update: lazy episode table and row * Various string updates * Batch quick match strings * Author card strings * Update translation key for quick match episodes confirm --------- Co-authored-by: advplyr <advplyr@protonmail.com>
This commit is contained in:
parent
1c15007e32
commit
9327331ee9
17 changed files with 135 additions and 76 deletions
|
@ -12,10 +12,10 @@
|
|||
</div>
|
||||
<div class="h-8 flex items-center">
|
||||
<div class="w-full inline-flex justify-between max-w-xl">
|
||||
<p v-if="episode?.season" class="text-sm text-gray-300">Season #{{ episode.season }}</p>
|
||||
<p v-if="episode?.episode" class="text-sm text-gray-300">Episode #{{ episode.episode }}</p>
|
||||
<p v-if="episode?.chapters?.length" class="text-sm text-gray-300">{{ episode.chapters.length }} Chapters</p>
|
||||
<p v-if="publishedAt" class="text-sm text-gray-300">Published {{ $formatDate(publishedAt, dateFormat) }}</p>
|
||||
<p v-if="episode?.season" class="text-sm text-gray-300">{{ $getString('LabelSeasonNumber', [episode.season]) }}</p>
|
||||
<p v-if="episode?.episode" class="text-sm text-gray-300">{{ $getString('LabelEpisodeNumber', [episode.episode]) }}</p>
|
||||
<p v-if="episode?.chapters?.length" class="text-sm text-gray-300">{{ $getString('LabelChapterCount', [episode.chapters.length]) }}</p>
|
||||
<p v-if="publishedAt" class="text-sm text-gray-300">{{ $getString('LabelPublishedDate', [$formatDate(publishedAt, dateFormat)]) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -132,13 +132,13 @@ export default {
|
|||
return this.store.state.streamIsPlaying && this.isStreaming
|
||||
},
|
||||
timeRemaining() {
|
||||
if (this.streamIsPlaying) return 'Playing'
|
||||
if (this.streamIsPlaying) return this.$strings.ButtonPlaying
|
||||
if (!this.itemProgress) return this.$elapsedPretty(this.episode?.duration || 0)
|
||||
if (this.userIsFinished) return 'Finished'
|
||||
if (this.userIsFinished) return this.$strings.LabelFinished
|
||||
|
||||
const duration = this.itemProgress.duration || this.episode?.duration || 0
|
||||
const remaining = Math.floor(duration - this.itemProgress.currentTime)
|
||||
return `${this.$elapsedPretty(remaining)} left`
|
||||
return this.$getString('LabelTimeLeft', [this.$elapsedPretty(remaining)])
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
@ -182,7 +182,7 @@ export default {
|
|||
toggleFinished(confirmed = false) {
|
||||
if (!this.userIsFinished && this.itemProgressPercent > 0 && !confirmed) {
|
||||
const payload = {
|
||||
message: `Are you sure you want to mark "${this.episodeTitle}" as finished?`,
|
||||
message: this.$getString('MessageConfirmMarkItemFinished', [this.episodeTitle]),
|
||||
callback: (confirmed) => {
|
||||
if (confirmed) {
|
||||
this.toggleFinished(true)
|
||||
|
|
|
@ -96,7 +96,7 @@ export default {
|
|||
const menuItems = []
|
||||
if (this.userIsAdminOrUp) {
|
||||
menuItems.push({
|
||||
text: 'Quick match all episodes',
|
||||
text: this.$strings.MessageQuickMatchAllEpisodes,
|
||||
action: 'quick-match-episodes'
|
||||
})
|
||||
}
|
||||
|
@ -262,21 +262,21 @@ export default {
|
|||
this.processing = true
|
||||
|
||||
const payload = {
|
||||
message: 'Quick matching episodes will overwrite details if a match is found. Only unmatched episodes will be updated. Are you sure?',
|
||||
message: this.$strings.MessageConfirmQuickMatchEpisodes,
|
||||
callback: (confirmed) => {
|
||||
if (confirmed) {
|
||||
this.$axios
|
||||
.$post(`/api/podcasts/${this.libraryItem.id}/match-episodes?override=1`)
|
||||
.then((data) => {
|
||||
if (data.numEpisodesUpdated) {
|
||||
this.$toast.success(`${data.numEpisodesUpdated} episodes updated`)
|
||||
this.$toast.success(this.$getString('ToastEpisodeUpdateSuccess', [data.numEpisodesUpdated]))
|
||||
} else {
|
||||
this.$toast.info(this.$strings.ToastNoUpdatesNecessary)
|
||||
}
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Failed to request match episodes', error)
|
||||
this.$toast.error('Failed to match episodes')
|
||||
this.$toast.error(this.$strings.ToastFailedToMatch)
|
||||
})
|
||||
}
|
||||
this.processing = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue