i18n: Add greeting and toast translations

- Add time-based greeting translations (goodMorning, goodAfternoon,
  goodEvening, goodNight) to homeSettings section
- Update homeSettingsStore to export getGreetingInfo for i18n support
- Update HomeView.svelte to use translated greetings
- Add comprehensive toast translations (~60 keys) for all user-facing
  notifications including queue, playback, offline, favorites, etc.
- Update +page.svelte to use $t() for all showToast calls
- Complete Spanish translations for all new keys
This commit is contained in:
vicrodh committed 2026-02-02 15:45:35 -06:00
1 parent a742c22c8f
commit 2dc9989d22
5 files changed
+356 -89

No files matched your search

+9 -3
View File
@@ -12,7 +12,7 @@
import {
subscribe as subscribeHomeSettings,
getSettings,
getGreetingText,
getGreetingInfo,
type HomeSettings,
type HomeSectionId
} from '$lib/stores/homeSettingsStore';
@@ -127,8 +127,14 @@
let homeSettings = $state<HomeSettings>(getSettings());
let isSettingsModalOpen = $state(false);
// Computed greeting
const greetingText = $derived(getGreetingText(userName));
// Computed greeting with i18n support
const greetingText = $derived.by(() => {
const info = getGreetingInfo(userName);
if (info.type === 'custom') {
return info.text;
}
return $t(info.key, { name: info.name });
});
// Check if a section is visible