[web] Fix options not translated correctly

This commit is contained in:
Alain Nussbaumer 2025-03-25 21:17:12 +01:00
parent 2a0badfea4
commit 30323712f9

View File

@ -8,10 +8,10 @@
v-model="uiStore.hideSpotify" v-model="uiStore.hideSpotify"
> >
<template #label> <template #label>
<span v-text="$t('page.artist.filter.hide-spotify')" /> <span v-text="$t('options.filter.hide-spotify')" />
</template> </template>
<template #help> <template #help>
<span v-text="$t('page.artist.filter.hide-spotify-help')" /> <span v-text="$t('options.filter.hide-spotify-help')" />
</template> </template>
</control-switch> </control-switch>
</template> </template>
@ -113,12 +113,12 @@ export default {
return [ return [
{ {
id: 1, id: 1,
name: this.$t('page.artist.sort.name'), name: this.$t('options.sort.name'),
options: { criteria: [{ field: 'name_sort', type: String }] } options: { criteria: [{ field: 'name_sort', type: String }] }
}, },
{ {
id: 2, id: 2,
name: this.$t('page.artist.sort.release-date'), name: this.$t('options.sort.release-date'),
options: { criteria: [{ field: 'date_released', type: Date }] } options: { criteria: [{ field: 'date_released', type: Date }] }
} }
] ]
@ -139,7 +139,7 @@ export default {
trackCount() { trackCount() {
// The count of tracks is incorrect when albums have Spotify tracks. // The count of tracks is incorrect when albums have Spotify tracks.
return [...this.albums].reduce( return [...this.albums].reduce(
(total, album) => total + (album.isItem ? album.item.track_count : 0), (total, album) => total + (album?.item.track_count || 0),
0 0
) )
} }