web/settings/video: move codec names away from i18n

This commit is contained in:
wukko 2024-09-13 21:25:27 +06:00
parent 9c2babfc1b
commit 47625490ce
No known key found for this signature in database
GPG key ID: 3E30B3F26C7B4AA2
2 changed files with 7 additions and 4 deletions

View file

@ -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",

View file

@ -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)",
}
</script>
<SettingsCategory
@ -41,7 +47,7 @@
settingId="youtubeVideoCodec"
settingValue={value}
>
{$t(`settings.video.youtube.codec.${value}`)}
{codecTitles[value]}
</SettingsButton>
{/each}
</Switcher>