web: i18n system & navbar translations

dynamic page language and language dropdown!! finally!!
This commit is contained in:
wukko
2024-07-03 00:16:03 +06:00
parent d11874e57f
commit 9939f3b172
19 changed files with 229 additions and 37 deletions

View File

@@ -1,18 +1,21 @@
import { defaultLocale } from "$lib/i18n/translations";
import type { CobaltSettings } from "$lib/types/settings";
const defaultSettings: CobaltSettings = {
schemaVersion: 1,
accessibility: {
reduceAnimations: false,
reduceTransparency: false
reduceTransparency: false,
},
appearance: {
theme: "auto"
theme: "auto",
language: defaultLocale,
autoLanguage: true,
},
general: {
customProcessingEndpoint: "",
seenOnboarding: false,
seenSafetyWarning: false
seenSafetyWarning: false,
},
save: {
audioFormat: "mp3",
@@ -25,22 +28,11 @@ const defaultSettings: CobaltSettings = {
twitterGif: false,
videoQuality: "720",
youtubeVideoCodec: "h264",
youtubeDubBrowserLang: false
youtubeDubBrowserLang: false,
},
privacy: {
trafficAnalytics: true
}
trafficAnalytics: true,
},
}
export default defaultSettings;
export const settingArrays = {
appearance: {
theme: ["auto", "light", "dark"]
},
save: {
audioFormat: ["best", "mp3", "ogg", "wav", "opus"],
filenameStyle: ["classic", "basic", "pretty", "nerdy"],
videoQuality: ["max", "2160", "1440", "1080", "720", "480", "360", "240", "144"],
youtubeVideoCodec: ["h264", "av1", "vp9"],
},
}
export default defaultSettings;