From 47625490ce37d2da3e0bbe2b0d6b5b28aa067d24 Mon Sep 17 00:00:00 2001 From: wukko Date: Fri, 13 Sep 2024 21:25:27 +0600 Subject: [PATCH] web/settings/video: move codec names away from i18n --- web/i18n/en/settings.json | 3 --- web/src/routes/settings/video/+page.svelte | 8 +++++++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/web/i18n/en/settings.json b/web/i18n/en/settings.json index 3cf181a4..85c3d58b 100644 --- a/web/i18n/en/settings.json +++ b/web/i18n/en/settings.json @@ -30,9 +30,6 @@ "video.quality.description": "if preferred video quality isn't available, next best is picked instead.", "video.youtube.codec": "youtube video codec and container", - "video.youtube.codec.h264": "h264 (mp4)", - "video.youtube.codec.av1": "av1 (webm)", - "video.youtube.codec.vp9": "vp9 (webm)", "video.youtube.codec.description": "h264: best compatibility, average bitrate. max quality is 1080p. \nav1: best quality, efficiency, and bitrate. supports 8k & HDR. \nvp9: same quality & bitrate as av1, but file is approximately two times bigger. supports 4k & HDR.\n\nav1 and vp9 aren't as widely supported as h264.", "video.twitter.gif": "twitter/x", diff --git a/web/src/routes/settings/video/+page.svelte b/web/src/routes/settings/video/+page.svelte index 2cdaf976..38ce0d8d 100644 --- a/web/src/routes/settings/video/+page.svelte +++ b/web/src/routes/settings/video/+page.svelte @@ -8,6 +8,12 @@ import Switcher from "$components/buttons/Switcher.svelte"; import SettingsButton from "$components/buttons/SettingsButton.svelte"; import SettingsToggle from "$components/buttons/SettingsToggle.svelte"; + + const codecTitles = { + h264: "h264 (mp4)", + av1: "av1 (webm)", + vp9: "vp9 (webm)", + } - {$t(`settings.video.youtube.codec.${value}`)} + {codecTitles[value]} {/each}