From 4d6a7e8ba4660f8861de8c8b0f1b45a205b5c738 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Thu, 29 Sep 2022 18:08:43 +0800 Subject: refactor: Transition back to non-namespaced i18n --- apps/kit/src/routes/(main)/+layout.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'apps/kit/src/routes/(main)/+layout.ts') diff --git a/apps/kit/src/routes/(main)/+layout.ts b/apps/kit/src/routes/(main)/+layout.ts index f673067..13837be 100644 --- a/apps/kit/src/routes/(main)/+layout.ts +++ b/apps/kit/src/routes/(main)/+layout.ts @@ -1,19 +1,9 @@ import type { Locales } from "$lib/i18n/i18n-types"; -import { loadLocaleAsync, loadNamespaceAsync } from "$lib/i18n/i18n-util.async"; +import { loadLocaleAsync } from "$lib/i18n/i18n-util.async"; import type { LayoutLoad } from "./$types"; export const load: LayoutLoad<{ locale: Locales }> = async ({ url, params }) => { let lang = "en" as Locales; await loadLocaleAsync(lang); - - if (url.pathname.startsWith("/sign-in")) { - await loadNamespaceAsync(lang, "sign-in"); - } - if (url.pathname.startsWith("/sign-up")) { - await loadNamespaceAsync(lang, "sign-up"); - } - if (url.pathname.startsWith("/reset-password")) { - await loadNamespaceAsync(lang, "reset-password"); - } return { locale: lang }; -}; \ No newline at end of file +}; -- cgit v1.3