web/audio-sub-language: refactor, prioritize popular languages
now the page with a picker won't freeze if intl can't recognize a language code & subtitle settings item will be localized. dub & sub now use their own arrays of languages (first one needs "original" as default and second one needs "none" as default).
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import settings from "$lib/state/settings";
|
||||
import { t } from "$lib/i18n/translations";
|
||||
import { namedYoutubeLanguages } from "$lib/settings/audio-sub-language";
|
||||
import { namedYoutubeDubLanguages } from "$lib/settings/audio-sub-language";
|
||||
|
||||
import { audioFormatOptions, audioBitrateOptions } from "$lib/types/settings";
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
import SettingsToggle from "$components/buttons/SettingsToggle.svelte";
|
||||
import SettingsDropdown from "$components/settings/SettingsDropdown.svelte";
|
||||
|
||||
const displayLangs = namedYoutubeLanguages();
|
||||
const displayLangs = namedYoutubeDubLanguages();
|
||||
</script>
|
||||
|
||||
<SettingsCategory sectionId="format" title={$t("settings.audio.format")}>
|
||||
|
||||
Reference in New Issue
Block a user