From 28cf84a471e00fc626d5a7643b9ecc25e102a45d Mon Sep 17 00:00:00 2001 From: Gwendal Beaumont Date: Sun, 29 Mar 2026 12:04:54 +0200 Subject: [PATCH] feat(i18n): translation strings in Sidebar --- src/lib/components/Sidebar.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/components/Sidebar.svelte b/src/lib/components/Sidebar.svelte index fc6e97470..e05adc3d0 100644 --- a/src/lib/components/Sidebar.svelte +++ b/src/lib/components/Sidebar.svelte @@ -318,7 +318,7 @@ } const artists = Array.from(artistNames).slice(0, 5); - const trackText = `${trackCount} ${trackCount === 1 ? 'Track' : 'Tracks'}`; + const trackText = `${trackCount} ${trackCount === 1 ? $t('playlist.track') : $t('playlist.tracks')}`; if (artists.length > 0) { return `${artists.join('\n')}\n${trackText}`; @@ -329,12 +329,12 @@ console.debug('Failed to fetch playlist artists:', err); } - return `${trackCount} ${trackCount === 1 ? 'Track' : 'Tracks'}`; + return `${trackCount} ${trackCount === 1 ? $t('playlist.track') : $t('playlist.tracks')}`; } // Format track count text with proper plural function formatTrackCount(total: number, localCount: number): string { - const plural = total === 1 ? 'Track' : 'Tracks'; + const plural = total === 1 ? $t('playlist.track') : $t('playlist.tracks'); if (localCount > 0) { return `${total} ${plural} (${localCount} local)`; }