feat(i18n): add localization to album release dates

This commit is contained in:
Gwendal Beaumont committed 2026-03-26 16:30:36 +01:00
1 parent 4a7cc6042a
commit b935b83675
1 file changed
+2 -1
+2 -1
View File
@@ -1,6 +1,7 @@
<script lang="ts">
import { onMount, tick } from 'svelte';
import { Play, Disc3, Heart, HardDrive } from 'lucide-svelte';
import { locale } from 'svelte-i18n';
import AlbumMenu from './AlbumMenu.svelte';
import {
subscribe as subscribeAlbumFavorites,
@@ -111,7 +112,7 @@
if (!dateStr) return '';
const date = new Date(dateStr);
if (isNaN(date.getTime())) return '';
return date.toLocaleDateString('en-US', {
return date.toLocaleDateString($locale ? $locale : 'en-US', {
month: 'short',
day: 'numeric',
year: 'numeric'