From e4f636334d1d298e3be99b52d196136cd902cb76 Mon Sep 17 00:00:00 2001 From: botvid Date: Thu, 6 Feb 2025 22:56:29 +0100 Subject: [PATCH] =?UTF-8?q?n=C3=A5t=20slags=20paraglide=20proof=20of=20con?= =?UTF-8?q?cept?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.d.ts | 4 ++++ src/components/dashboard.svelte | 1 + src/lib/i18n.ts | 8 +++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/app.d.ts b/src/app.d.ts index 1c8a9fc..4ddb66d 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -1,8 +1,12 @@ +import type { AvailableLanguageTag } from "../../lib/paraglide/runtime" +import type { ParaglideLocals } from "@inlang/paraglide-sveltekit" // See https://svelte.dev/docs/kit/types#app.d.ts // for information about these interfaces declare global { namespace App { interface Locals { + paraglide: ParaglideLocals, + user: import('$lib/server/auth').SessionValidationResult['user']; session: import('$lib/server/auth').SessionValidationResult['session']; } diff --git a/src/components/dashboard.svelte b/src/components/dashboard.svelte index 2395ed1..e33ca5b 100644 --- a/src/components/dashboard.svelte +++ b/src/components/dashboard.svelte @@ -5,6 +5,7 @@ import * as Dialog from '$lib/components/ui/dialog'; import { Input } from '$lib/components/ui/input'; import { Label } from '$lib/components/ui/label'; + import * as m from '$lib/paraglide/messages.js'; import Import from './import/import.svelte'; export let open; diff --git a/src/lib/i18n.ts b/src/lib/i18n.ts index d038f59..0a67acb 100644 --- a/src/lib/i18n.ts +++ b/src/lib/i18n.ts @@ -1,3 +1,5 @@ -import * as runtime from '$lib/paraglide/runtime'; -import { createI18n } from '@inlang/paraglide-sveltekit'; -export const i18n = createI18n(runtime); +// file initialized by the Paraglide-SvelteKit CLI - Feel free to edit it +import { createI18n } from "@inlang/paraglide-sveltekit" +import * as runtime from "$lib/paraglide/runtime.js" + +export const i18n = createI18n(runtime)