From ae2cef58f825865ec0f8ca46f1511f87ca624a06 Mon Sep 17 00:00:00 2001 From: Chris Amico Date: Thu, 21 Nov 2024 15:30:34 -0500 Subject: [PATCH 1/3] Standardize on 'en', not 'en-US' as a language code, but register both --- src/hooks.server.ts | 2 +- src/lib/components/documents/Access.svelte | 2 +- src/lib/components/documents/BulkActions.svelte | 14 +++++++------- src/lib/i18n/index.js | 8 +++++--- 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/hooks.server.ts b/src/hooks.server.ts index 2108c89ca..ea34925dc 100644 --- a/src/hooks.server.ts +++ b/src/hooks.server.ts @@ -33,7 +33,7 @@ export const handleError = Sentry.handleErrorWithSentry(); /** @type {import('@sveltejs/kit').Handle} */ async function language({ event, resolve }) { const lang = - event.request.headers.get("accept-language")?.split(",")[0] ?? "en-US"; + event.request.headers.get("accept-language")?.split(",")[0] ?? "en"; if (lang) { locale.set(lang); diff --git a/src/lib/components/documents/Access.svelte b/src/lib/components/documents/Access.svelte index a07c21644..a8c106197 100644 --- a/src/lib/components/documents/Access.svelte +++ b/src/lib/components/documents/Access.svelte @@ -30,7 +30,7 @@