opral / inlang-paraglide-js

Tree-shakable i18n library build on the inlang ecosystem.
https://inlang.com/m/gerre34r/library-inlang-paraglideJs
22 stars 0 forks source link

Sveltekit Adapter - Regression with exclude path option #149

Closed janekprange closed 3 weeks ago

janekprange commented 3 weeks ago

Problem I upgraded @inlang/paraglide-sveltekit from version 0.8.1 to 0.9.5 and excluding paths no longer works on the server. On the client everything works fine, but the server hook handle redirects to the translated path anyway.

Solution As far as I can tell, changing https://github.com/opral/monorepo/blob/main/inlang/source-code/paraglide/paraglide-sveltekit/src/runtime/hooks/handle.ts:77 from if (lang !== langFromUrl) { to if (lang !== langFromUrl && !i18n.exclude(event.url.pathname)) { should fix this.

LorisSigrist commented 3 weeks ago

Thanks for the detailed report, will be fixing this!