From 9224aee6f82844234fa287a920ef1cd42056d25b Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Sun, 17 Dec 2023 16:40:08 +0100 Subject: [PATCH 01/10] feat: translate options menu --- messages/de.json | 6 +++++- messages/en.json | 6 +++++- src/lib/components/contextmenu/OptionsMenu.svelte | 9 +++++---- 3 files changed, 15 insertions(+), 6 deletions(-) diff --git a/messages/de.json b/messages/de.json index 722e39b..2e4e828 100644 --- a/messages/de.json +++ b/messages/de.json @@ -68,5 +68,9 @@ "playlist_remove": "Von Playlist entfernen", "download_audio_file": "Audiodatei herunterladen", "copy_urls": "URLs kopieren", - "language": "Sprache" + "language": "Sprache", + "login": "Anmeldung", + "settings": "Einstellungen", + "documentation": "Dokumentation", + "frontend": "Frontend" } diff --git a/messages/en.json b/messages/en.json index 2120147..68b9007 100644 --- a/messages/en.json +++ b/messages/en.json @@ -68,5 +68,9 @@ "playlist_remove": "Remove from playlist", "download_audio_file": "Download audio file", "copy_urls": "Copy URLs", - "language": "Language" + "language": "Language", + "login": "Login", + "settings": "Settings", + "documentation": "Documentation", + "frontend": "Frontend" } diff --git a/src/lib/components/contextmenu/OptionsMenu.svelte b/src/lib/components/contextmenu/OptionsMenu.svelte index 1689fca..471bf8c 100644 --- a/src/lib/components/contextmenu/OptionsMenu.svelte +++ b/src/lib/components/contextmenu/OptionsMenu.svelte @@ -1,4 +1,5 @@ - -{#key _languageTag} - -{/key} diff --git a/src/lib/components/list/TrackList.svelte b/src/lib/components/list/TrackList.svelte index 5eb8cce..72682c4 100644 --- a/src/lib/components/list/TrackList.svelte +++ b/src/lib/components/list/TrackList.svelte @@ -1,5 +1,5 @@
- + - import * as m from "$paraglide/messages"; + import LL from "$i18n/i18n-svelte"; import { mdiChevronDown, mdiChevronUp } from "@mdi/js"; import IconButton from "$lib/components/ui/IconButton.svelte"; @@ -33,7 +33,7 @@ size={isLarge ? "sm" : "xs"} color="default" cls="absolute top-0 right-0 opacity-0 hover:opacity-100 transition-opacity" - ariaLabel={isLarge ? m.cover_show_small() : m.m_cover_show_large()} + ariaLabel={isLarge ? $LL.cover_show_small() : $LL.m_cover_show_large()} on:click={toggleCurrentCoverLarge} />
diff --git a/src/lib/components/player/Playerbar.svelte b/src/lib/components/player/Playerbar.svelte index 85f29ed..30c6916 100644 --- a/src/lib/components/player/Playerbar.svelte +++ b/src/lib/components/player/Playerbar.svelte @@ -1,5 +1,5 @@ diff --git a/src/lib/components/tiles/TileItem.svelte b/src/lib/components/tiles/TileItem.svelte index 9b2b32b..aae4581 100644 --- a/src/lib/components/tiles/TileItem.svelte +++ b/src/lib/components/tiles/TileItem.svelte @@ -1,6 +1,6 @@ - - + +
-
- {#if showNavbar} - - {/if} - {#if showQueue} - - {/if} -
- -
-
- {#if !$page.data.header?.fading} -
- {/if} - - {#if !showNavbar} - -
- {/if} -
-
{#if showNavbar} - - {:else} - - + {/if} + {#if showQueue} + + {/if} +
+ +
+
+ {#if !$page.data.header?.fading} +
+ {/if} + + {#if !showNavbar} + +
+ {/if} +
- + {#if showNavbar} + + {:else} + + + {/if} +
diff --git a/src/lib/util/icons.ts b/src/lib/util/icons.ts index e34e6bd..7832805 100644 --- a/src/lib/util/icons.ts +++ b/src/lib/util/icons.ts @@ -1,5 +1,5 @@ export const iconTiraya = - "M7.966 1.982a1.317 1.33 0 0 0-.799.62 1.317 1.33 0 0 0 .483 1.816l9.623 5.612-4.79 2.794A1.317 1.33 0 0 0 12 14.639a1.317 1.33 0 0 0 1.8.488l6.764-3.946a1.317 1.33 0 0 0 0-2.303l-11.6-6.763a1.317 1.33 0 0 0-.998-.133Zm-2.364 2.93a1.317 1.33 0 0 0-.659 1.151V19.59a1.317 1.33 0 0 0 1.317 1.33 1.317 1.33 0 0 0 1.317-1.33V8.366l4.791 2.794a1.317 1.33 0 0 0 1.798-.486 1.317 1.33 0 0 0-.48-1.818L6.918 4.913a1.317 1.33 0 0 0-1.317 0zm4.094 5.845a1.317 1.33 0 0 0-1.317 1.33v7.89a1.317 1.33 0 0 0 1.976 1.15l11.599-6.762a1.317 1.33 0 0 0 .48-1.816 1.317 1.33 0 0 0-1.797-.487l-9.624 5.61v-5.584a1.317 1.33 0 0 0-1.317-1.33Z"; + "M9.27 10.61a1.524 1.524 0 0 0-1.525 1.524v8.628a1.524 1.524 0 0 0 2.286 1.32l12.81-7.396a1.524 1.524 0 0 0 .558-2.082 1.524 1.524 0 0 0-2.082-.557l-10.524 6.076v-5.989A1.524 1.524 0 0 0 9.27 10.61 M7.342 1.016a1.52 1.52 0 0 0-.926.71 1.524 1.524 0 0 0 .558 2.082l10.525 6.076-5.187 2.995a1.524 1.524 0 0 0-.558 2.081 1.524 1.524 0 0 0 2.082.558l7.472-4.314a1.524 1.524 0 0 0 0-2.64L8.498 1.169a1.52 1.52 0 0 0-1.156-.152 M4.713 4.228a1.52 1.52 0 0 0-.762 1.32v14.791a1.524 1.524 0 0 0 1.524 1.524A1.524 1.524 0 0 0 7 20.34V8.187l5.186 2.994a1.524 1.524 0 0 0 2.082-.558 1.524 1.524 0 0 0-.558-2.081L6.237 4.228a1.52 1.52 0 0 0-1.524 0"; export const iconAlbumOutline = "m12 16.1q1.75 0 3-1.19t1.25-2.91q0-1.78-1.24-3.01t-3.01-1.24q-1.72 0-2.91 1.25t-1.19 3q0 1.72 1.19 2.91t2.91 1.19zm0-3.1q-0.425 0-0.712-0.288t-0.288-0.712 0.288-0.712 0.712-0.288 0.712 0.288 0.288 0.712-0.288 0.712-0.712 0.288zm0 9q-2.05 0-3.88-0.788t-3.19-2.15-2.15-3.19-0.788-3.88q0-2.08 0.788-3.9t2.15-3.18 3.19-2.14 3.88-0.788q2.08 0 3.9 0.788t3.18 2.14 2.14 3.18 0.788 3.9q0 2.05-0.788 3.88t-2.14 3.19-3.18 2.15-3.9 0.788zm0-1.5q3.55 0 6.02-2.49t2.48-6.01q0-3.55-2.48-6.02t-6.02-2.48q-3.52 0-6.01 2.48t-2.49 6.02q0 3.52 2.49 6.01t6.01 2.49z"; export const iconSearch = diff --git a/static/favicon.svg b/static/favicon.svg index 2b83b40..1c2de94 100644 --- a/static/favicon.svg +++ b/static/favicon.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/static/icon_circle.svg b/static/icon_circle.svg index 0ad0fac..fec6feb 100644 --- a/static/icon_circle.svg +++ b/static/icon_circle.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file