From 3cfe3c1333a0e8d936f339fe80bd8362c9d1631e Mon Sep 17 00:00:00 2001 From: vicrodh <103399283+vicrodh@users.noreply.github.com> Date: Wed, 14 Jan 2026 10:12:38 -0600 Subject: [PATCH] feat(i18n): add translations to main UI components - Sidebar: navigation labels, playlist section, sort options - SearchView: search placeholder, tabs, results messages - HomeView: section titles, loading states, empty states - QueuePanel: headers, search, empty state, actions - NowPlayingBar: player controls, tooltips, cast buttons - FocusMode: close button, lyrics loading - HomeSettingsModal: all settings labels and descriptions Added new translation keys to en.json and es.json locales. --- src/lib/components/FocusMode.svelte | 5 +- src/lib/components/HomeSettingsModal.svelte | 25 ++++----- src/lib/components/NowPlayingBar.svelte | 33 ++++++------ src/lib/components/QueuePanel.svelte | 19 +++---- src/lib/components/Sidebar.svelte | 43 +++++++-------- src/lib/components/views/HomeView.svelte | 37 ++++++------- src/lib/components/views/SearchView.svelte | 33 ++++++------ src/lib/i18n/locales/en.json | 58 +++++++++++++++++++-- src/lib/i18n/locales/es.json | 58 +++++++++++++++++++-- 9 files changed, 209 insertions(+), 102 deletions(-) diff --git a/src/lib/components/FocusMode.svelte b/src/lib/components/FocusMode.svelte index 1da1e6daa..d6fcbf613 100644 --- a/src/lib/components/FocusMode.svelte +++ b/src/lib/components/FocusMode.svelte @@ -2,6 +2,7 @@ import { SkipBack, Play, Pause, SkipForward, ChevronDown } from 'lucide-svelte'; import LyricsLines from './lyrics/LyricsLines.svelte'; import { startActiveLineUpdates, stopActiveLineUpdates } from '$lib/stores/lyricsStore'; + import { t } from '$lib/i18n'; interface LyricsLine { text: string; @@ -135,7 +136,7 @@ - @@ -154,7 +155,7 @@ {#if lyricsLoading}
- Loading lyrics... + {$t('player.fetchingLyrics')}
{:else if lyricsError}
diff --git a/src/lib/components/HomeSettingsModal.svelte b/src/lib/components/HomeSettingsModal.svelte index 45e5ff604..2b7b590ef 100644 --- a/src/lib/components/HomeSettingsModal.svelte +++ b/src/lib/components/HomeSettingsModal.svelte @@ -13,6 +13,7 @@ resetToDefaults, type HomeSettings } from '$lib/stores/homeSettingsStore'; + import { t } from '$lib/i18n'; interface Props { isOpen: boolean; @@ -58,16 +59,16 @@ } - + {#snippet children()}
-
Greeting
+
{$t('homeSettings.greeting')}
- Show greeting - Display personalized greeting at top + {$t('homeSettings.showGreeting')} + {$t('homeSettings.showGreetingDesc')}