Skip to content
This repository has been archived by the owner on Jan 14, 2024. It is now read-only.

Commit

Permalink
feat: add lang indicator to url
Browse files Browse the repository at this point in the history
  • Loading branch information
sunxyw committed Nov 27, 2023
1 parent 79db661 commit 79fd9f5
Show file tree
Hide file tree
Showing 83 changed files with 393 additions and 232 deletions.
1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ module.exports = {
groups: ['builtin', 'external', 'internal', 'parent', 'sibling', 'index', 'object', 'type'],
pathGroups: [
{ pattern: '$lib/**', group: 'internal' },
{ pattern: '$i18n/**', group: 'internal' },
{ pattern: '$app/**', group: 'external' },
{ pattern: '$env/**', group: 'external' }
],
Expand Down
6 changes: 0 additions & 6 deletions .idea/jsLibraryMappings.xml

This file was deleted.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"@histoire/plugin-svelte": "^0.17.4",
"@iconify/svelte": "^3.1.4",
"@inlang/paraglide-js": "1.0.0-prerelease.9",
"@inlang/paraglide-js-adapter-vite": "1.0.0-prerelease.1",
"@macfja/svelte-persistent-store": "^2.4.1",
"@melt-ui/pp": "^0.1.4",
"@melt-ui/svelte": "^0.61.1",
Expand Down
199 changes: 170 additions & 29 deletions patches/[email protected]

Large diffs are not rendered by default.

100 changes: 74 additions & 26 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 0 additions & 6 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { sitemapHook } from 'sveltekit-sitemap';
import { createTRPCHandle } from 'trpc-sveltekit';

import authHook from '$lib/auth/hook.server';
import { localePreference, resolveFirstAvailableLocale } from '$lib/shared/i18n';
import * as seoSites from '$lib/shared/seo/sites';
import supabaseHook from '$lib/shared/supabase/hook.server';
import { createContext } from '$lib/trpc/context';
Expand All @@ -24,11 +23,6 @@ import type { Handle } from '@sveltejs/kit';
export const handle: Handle = sequence(
/*Sentry.sentryHandle(),*/
async ({ event, resolve }) => {
const langs = event.request.headers.get('accept-language')?.split(',');
if (langs) {
localePreference.set(resolveFirstAvailableLocale(langs));
}

return resolve(event, {
filterSerializedResponseHeaders: (name) => !name.startsWith('x-')
});
Expand Down
8 changes: 0 additions & 8 deletions src/lib/shared/i18n/ParaglideJsSvelteKitProviderCsr.svelte

This file was deleted.

Loading

0 comments on commit 79fd9f5

Please sign in to comment.