[web] Replace formatting method with the one provided by Vue-i18n

This commit is contained in:
Alain Nussbaumer 2025-02-25 17:15:57 +01:00
parent 68a5254efb
commit b068b5f745
2 changed files with 3 additions and 6 deletions

View File

@ -41,9 +41,6 @@ export const filters = {
const format = value >= 3600000 ? 'h:mm:ss' : 'm:ss'
return Duration.fromMillis(value).toFormat(format)
},
number(value) {
return value.toLocaleString(locale.value)
},
timeFromNow(value) {
return DateTime.fromISO(value).toRelative({
unit: ['years', 'months', 'days', 'hours', 'minutes', 'seconds']

View File

@ -127,15 +127,15 @@ export default {
},
{
label: 'property.artists',
value: this.$filters.number(this.libraryStore.artists)
value: this.$n(this.libraryStore.artists)
},
{
label: 'property.albums',
value: this.$filters.number(this.libraryStore.albums)
value: this.$n(this.libraryStore.albums)
},
{
label: 'property.tracks',
value: this.$filters.number(this.libraryStore.songs)
value: this.$n(this.libraryStore.songs)
},
{
label: 'property.playtime',