feature/build (#1)
Some checks failed
CI / build-and-test (push) Has been cancelled
CI / build-and-test (pull_request) Has been cancelled

Co-authored-by: Tobias Klemp <tobias.klemp@v-office.com>
Reviewed-on: #1
This commit was merged in pull request #1.
This commit is contained in:
2026-01-01 18:55:05 +01:00
parent 42080520bf
commit 74b6092838
34 changed files with 1070 additions and 499 deletions

View File

@@ -6,8 +6,22 @@
Tolgee,
DevTools,
FormatSimple,
type TolgeeStaticData,
} from '@tolgee/svelte'
import { TopBar } from '$lib/components/ui/topBar'
import { env } from '$env/dynamic/public'
import type { Snippet } from 'svelte'
let { children, data }: { data: TolgeeStaticData; children: Snippet } =
$props()
function getLang(lang: string) {
return async (): Promise<Record<string, any>> => {
const res = await fetch(`/lang/${lang}`)
const translations = await res.json()
return translations
}
}
const tolgee = Tolgee()
.use(DevTools())
@@ -16,14 +30,14 @@
language: 'de',
// for development
apiUrl: import.meta.env.VITE_TOLGEE_API_URL,
apiKey: import.meta.env.VITE_TOLGEE_API_KEY,
apiUrl: env.PUBLIC_TOLGEE_API_URL,
apiKey: env.PUBLIC_TOLGEE_API_KEY,
// for production
staticData: {},
staticData: {
de: data['de'] ?? getLang('de'),
},
})
let { children } = $props()
</script>
<svelte:head>