Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Paraglide Adapter SvelteKit doesn't work with Svelte 5 #2270

Closed
LorisSigrist opened this issue Feb 21, 2024 · 2 comments · Fixed by #2277
Closed

[bug] Paraglide Adapter SvelteKit doesn't work with Svelte 5 #2270

LorisSigrist opened this issue Feb 21, 2024 · 2 comments · Fixed by #2277
Assignees
Labels
scope: inlang/paraglide-js Related to source-code/sdk-js. type: bug Something isn't working

Comments

@LorisSigrist
Copy link
Member

LorisSigrist commented Feb 21, 2024

Problem

From Discord:

The problem is: right after clicking on the language selector anchor, the URL is updated correctly, but not the translation text, then after changing it once again it applies the old language.
Ex.
pnpm run dev -> EN (default) -> Click the "ES" selector -> ES (with English text) -> Click the "EN" selector -> EN (with Spanish text)

Expected behavior

No response

Reproduction

Our Example, but with Svelte 5 instead of Svelte 4

Other information

No response

@LorisSigrist LorisSigrist added type: bug Something isn't working scope: inlang/paraglide-js Related to source-code/sdk-js. labels Feb 21, 2024
@LorisSigrist LorisSigrist self-assigned this Feb 21, 2024
@LorisSigrist
Copy link
Member Author

I identified the issue.
Svelte 5 (unintentionally) changed the behaviour of the {#key} block & moved it in the update order. This caused the language-rerenders to happen before the language state was properly updated.

Will be fixed in the next release!

@LorisSigrist
Copy link
Member Author

LorisSigrist commented Feb 22, 2024

I opened an issue on the svelte repo, since Svelte 5 is supposed to be backwards compatible:

sveltejs/svelte#10597

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
scope: inlang/paraglide-js Related to source-code/sdk-js. type: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant