feat(i18n): add missing translations
This commit is contained in:
11 files changed
+32
-28
No files matched your search
@@ -28,7 +28,7 @@
|
||||
const key = `favorites.tabLabels.${tab}`;
|
||||
const translated = $t(key);
|
||||
if (translated && !translated.startsWith('favorites.tabLabels.')) return translated;
|
||||
const fallback: Record<string, string> = { tracks: 'Tracks', albums: 'Albums', artists: 'Artists', playlists: 'Playlists' };
|
||||
const fallback: Record<string, string> = { tracks: $t('favorites.tabLabels.tracks'), albums: $t('favorites.tabLabels.albums'), artists: $t('favorites.tabLabels.artists'), playlists: $t('favorites.tabLabels.playlists') };
|
||||
return fallback[tab] || tab;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
*/
|
||||
import { X, User, Music, Info } from 'lucide-svelte';
|
||||
import type { ResolvedMusician } from '$lib/types';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
interface Props {
|
||||
musician: ResolvedMusician;
|
||||
@@ -82,7 +83,7 @@
|
||||
<span class="role">{musician.role}</span>
|
||||
</div>
|
||||
</div>
|
||||
<button class="close-btn" onclick={onClose} title="Close">
|
||||
<button class="close-btn" onclick={onClose} title={ $t('actions.close') }>
|
||||
<X size={18} />
|
||||
</button>
|
||||
</div>
|
||||
@@ -92,7 +93,7 @@
|
||||
<!-- Bands & Projects -->
|
||||
{#if musician.bands.length > 0}
|
||||
<div class="section">
|
||||
<h3>Known for</h3>
|
||||
<h3>{ $t('musician.knownFor') }</h3>
|
||||
<div class="bands-list">
|
||||
{#each musician.bands as band}
|
||||
<div class="band-item">
|
||||
@@ -116,7 +117,7 @@
|
||||
{#if showArtistCta}
|
||||
<div class="section cta-section">
|
||||
<button class="cta-btn" onclick={handleNavigateToArtist}>
|
||||
View Artist Page
|
||||
{ $t('musician.viewArtistPage') }
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
} from 'lucide-svelte';
|
||||
import QualityBadge from './QualityBadge.svelte';
|
||||
import GlassSurface from './glass/GlassSurface.svelte';
|
||||
import { t } from 'svelte-i18n';
|
||||
|
||||
interface Props {
|
||||
artwork?: string;
|
||||
@@ -167,7 +168,7 @@
|
||||
</div>
|
||||
{:else}
|
||||
<div class="empty-state">
|
||||
<span class="empty-text">No track playing</span>
|
||||
<span class="empty-text">{ $t('player.noTrackPlaying') }</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -242,14 +243,14 @@
|
||||
<button class="action-btn" onclick={onOpenQueue}>
|
||||
<List size={20} />
|
||||
</button>
|
||||
<button class="action-btn" onclick={onCast} title="Cast to device">
|
||||
<button class="action-btn" onclick={onCast} title={ $t('player.castToDevice') }>
|
||||
<Cast size={20} />
|
||||
</button>
|
||||
<button
|
||||
class="action-btn"
|
||||
class:active={lyricsActive}
|
||||
onclick={onToggleLyrics}
|
||||
title="Lyrics"
|
||||
title={ $t('player.lyrics') }
|
||||
>
|
||||
<MicVocal size={20} />
|
||||
</button>
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
PictureInPicture2,
|
||||
TriangleAlert
|
||||
} from 'lucide-svelte';
|
||||
import { t } from 'svelte-i18n';
|
||||
import QualityBadge from './QualityBadge.svelte';
|
||||
import AudioOutputBadges from './AudioOutputBadges.svelte';
|
||||
import QconnectBadge from './QconnectBadge.svelte';
|
||||
@@ -395,7 +396,7 @@
|
||||
<div class="song-title-row">
|
||||
<button class="song-title" title={$translateStore('actions.trackInfo')} onclick={onTrackClick}>{trackTitle}</button>
|
||||
{#if explicit}
|
||||
<span class="explicit-badge" title="Explicit"></span>
|
||||
<span class="explicit-badge" title={ $t('library.explicit') }></span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="song-meta">
|
||||
|
||||
@@ -358,7 +358,7 @@
|
||||
<div class="suggestions-header">
|
||||
<div class="header-left">
|
||||
<Sparkles size={18} class="sparkle-icon" />
|
||||
<h3>Suggested songs</h3>
|
||||
<h3>{ $t('playlist.suggestedSongs') }</h3>
|
||||
</div>
|
||||
<button
|
||||
class="refresh-btn"
|
||||
@@ -374,12 +374,12 @@
|
||||
{#if loading && pool.length === 0}
|
||||
<div class="loading-state">
|
||||
<div class="spinner"></div>
|
||||
<p>Finding similar artists...</p>
|
||||
<p>{ $t('toast.findingSimilarArtists') }</p>
|
||||
</div>
|
||||
{:else if error}
|
||||
<div class="error-state">
|
||||
<p>{error}</p>
|
||||
<button onclick={() => loadSuggestions(false)}>Retry</button>
|
||||
<button onclick={() => loadSuggestions(false)}>{ $t('actions.retry') }</button>
|
||||
</div>
|
||||
{:else}
|
||||
<div class="suggestions-list">
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
{/if}
|
||||
</span>
|
||||
<span class="badge-text">
|
||||
<span class="badge-label">Qobuz</span>
|
||||
<span class="badge-label">{ $t('platforms.qobuz') }</span>
|
||||
<span class="badge-label">Connect</span>
|
||||
</span>
|
||||
</button>
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
<div class="np-title-row">
|
||||
<span class="np-title">{currentTrack.title}</span>
|
||||
{#if currentTrack.parental_warning}
|
||||
<span class="explicit-badge" title="Explicit"></span>
|
||||
<span class="explicit-badge" title={ $t('library.explicit') }></span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="np-artist">{currentTrack.artist}</div>
|
||||
@@ -369,7 +369,7 @@
|
||||
<div class="track-title-row">
|
||||
<span class="track-title">{queueTrack.title}</span>
|
||||
{#if queueTrack.parental_warning}
|
||||
<span class="explicit-badge" title="Explicit"></span>
|
||||
<span class="explicit-badge" title={ $t('library.explicit') }></span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="track-artist">{queueTrack.artist}</div>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { tick, onMount } from 'svelte';
|
||||
import { t } from 'svelte-i18n';
|
||||
import { Play, Heart, Ellipsis, ListPlus, Library, Share2, ListMusic } from 'lucide-svelte';
|
||||
import PlaylistCollage from './PlaylistCollage.svelte';
|
||||
import type { Playlist } from '$lib/stores/searchState';
|
||||
@@ -182,10 +183,10 @@
|
||||
</div>
|
||||
{/if}
|
||||
<div class="action-buttons">
|
||||
<button class="overlay-btn overlay-btn--minor" type="button" title="Add to favorites">
|
||||
<button class="overlay-btn overlay-btn--minor" type="button" title={ $t('actions.addToFavorites') }>
|
||||
<Heart size={18} />
|
||||
</button>
|
||||
<button class="overlay-btn" type="button" onclick={handlePlay} title="Play">
|
||||
<button class="overlay-btn" type="button" onclick={handlePlay} title={ $t('actions.play') }>
|
||||
<Play size={18} fill="white" />
|
||||
</button>
|
||||
<button
|
||||
@@ -193,7 +194,7 @@
|
||||
type="button"
|
||||
bind:this={menuTriggerRef}
|
||||
onclick={toggleMenu}
|
||||
title="More options"
|
||||
title={ $t('actions.moreOptions') }
|
||||
>
|
||||
<Ellipsis size={18} />
|
||||
</button>
|
||||
@@ -213,7 +214,7 @@
|
||||
<div class="card-subtitle">
|
||||
<span class="owner">{playlist.owner.name}</span>
|
||||
<span class="separator">-</span>
|
||||
<span class="tracks">{playlist.tracks_count} tracks</span>
|
||||
<span class="tracks">{ $t('playlist.trackCount', { values: { count: playlist.tracks_count } }) }</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -221,18 +222,18 @@
|
||||
{#if menuOpen}
|
||||
<div class="playlist-menu" bind:this={menuEl} style={menuStyle} use:portal>
|
||||
<button class="menu-item" onclick={() => { onPlayNext?.(); closeMenu(); }}>
|
||||
<ListPlus size={14} /> <span>Play next</span>
|
||||
<ListPlus size={14} /> <span>{ $t('actions.playNext') }</span>
|
||||
</button>
|
||||
<button class="menu-item" onclick={() => { onPlayLater?.(); closeMenu(); }}>
|
||||
<ListMusic size={14} /> <span>Add to queue</span>
|
||||
<ListMusic size={14} /> <span>{ $t('actions.addToQueue') }</span>
|
||||
</button>
|
||||
<div class="menu-separator"></div>
|
||||
<button class="menu-item" onclick={() => { onCopyToLibrary?.(); closeMenu(); }}>
|
||||
<Library size={14} /> <span>Copy to library</span>
|
||||
<Library size={14} /> <span>{ $t('playlist.copyToLibrary') }</span>
|
||||
</button>
|
||||
<div class="menu-separator"></div>
|
||||
<button class="menu-item" onclick={() => { onShareQobuz?.(); closeMenu(); }}>
|
||||
<Share2 size={14} /> <span>Share (Qobuz)</span>
|
||||
<Share2 size={14} /> <span>{ $t('actions.shareQobuz') }</span>
|
||||
</button>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
@@ -2027,7 +2027,7 @@
|
||||
</div>
|
||||
{:else}
|
||||
<div class="folder-popover-empty">
|
||||
No playlists
|
||||
{ $t('empty.noPlaylists') }
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
<button
|
||||
class="control-btn close"
|
||||
onclick={handleClose}
|
||||
title="Close"
|
||||
title={ $t('actions.close') }
|
||||
aria-label="Close window"
|
||||
style={btnStyle(controlsColors?.close)}
|
||||
data-tauri-drag-region="false"
|
||||
@@ -162,7 +162,7 @@
|
||||
<button
|
||||
class="control-btn minimize"
|
||||
onclick={handleMinimize}
|
||||
title="Minimize"
|
||||
title={ $t('player.minimize') }
|
||||
aria-label="Minimize window"
|
||||
style={btnStyle(controlsColors?.minimize)}
|
||||
data-tauri-drag-region="false"
|
||||
@@ -180,7 +180,7 @@
|
||||
<button
|
||||
class="control-btn minimize"
|
||||
onclick={handleMinimize}
|
||||
title="Minimize"
|
||||
title={ $t('player.minimize') }
|
||||
aria-label="Minimize window"
|
||||
style={btnStyle(controlsColors?.minimize)}
|
||||
data-tauri-drag-region="false"
|
||||
@@ -204,7 +204,7 @@
|
||||
<button
|
||||
class="control-btn close"
|
||||
onclick={handleClose}
|
||||
title="Close"
|
||||
title={ $t('actions.close') }
|
||||
aria-label="Close window"
|
||||
style={btnStyle(controlsColors?.close)}
|
||||
data-tauri-drag-region="false"
|
||||
|
||||
@@ -243,7 +243,7 @@
|
||||
<div class="track-title-row">
|
||||
<span class="track-title" class:active={isActiveTrack || isPlaying}>{title}</span>
|
||||
{#if explicit}
|
||||
<span class="explicit-badge" title="Explicit"></span>
|
||||
<span class="explicit-badge" title={ $t('library.explicit') }></span>
|
||||
{/if}
|
||||
</div>
|
||||
{#if artist && !compact}
|
||||
|
||||
Reference in new issue
Block a user