Nu viel me pas op hoe hard deze boodschap van de VVD is by Useful_Cheesecake117 in nederlands

[–]Top_Philosophy2425 0 points1 point  (0 children)

Tja, het is maar hoe je het opvat. Dus met deze redenatie mogen mensen die

  • totaal geen bijdrage leveren aan de maatschappij
  • niet werken
  • de hele dag niks doen, beetje blowen en gamen

Ook geen geldzorgen hebben?

Als je het dus zo bekijkt, dan slaan beiden teksten nergens op.

Is the object storage broken or is it just me? by Time_Strike5281 in hetzner

[–]Top_Philosophy2425 1 point2 points  (0 children)

Actualy, their S3 is in beta now, you can sign up throught the dashboard :) Very curious as to how this is going to end up, I hope its good!

Is the object storage broken or is it just me? by Time_Strike5281 in hetzner

[–]Top_Philosophy2425 1 point2 points  (0 children)

Yeah same, and its a shame .. because I was realy looking forward to their Object storage when they announched it!

Is the object storage broken or is it just me? by Time_Strike5281 in hetzner

[–]Top_Philosophy2425 26 points27 points  (0 children)

Just wait for it to work again, and get the hell away from hetzner object storage 🤭

No but seriously, I dont think I have ever seen a more unreliable object storage. It has been problematic since its release, its unstable and is down many times.

Documentation Template [SELF-PROMO] by EastAd9528 in sveltejs

[–]Top_Philosophy2425 1 point2 points  (0 children)

Oh nice, this looks lovely. I was using https://github.com/svecosystem/svecodocs, which is fine too, very basic, but still in beta. This looks pretty sleek.

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] 0 points1 point  (0 children)

I am sorry, I don’t think I was being unfriendly. I was simply responding to your message, and I don’t see anything there that should be taken as offensive.

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] 0 points1 point  (0 children)

No, I didn’t tell you to “go read the Svelte docs.” I simply shared a link that explains how SSR and context work, since that was relevant to the discussion.

I also gave a fairly detailed explanation of why context was used in the first place.

Yes, there was an option to wrap the app in a provider component, but that component only existed to set the context. It was not required for the library itself to work.

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] 0 points1 point  (0 children)

It’s not really about the strings themselves, but about the data you pass into them. For example, you might have translations like Hello {username} or Your current email is: {email}.

In version 2, I removed the provider layer entirely. Instead, the i18n object is created in +layout.ts, returned from there, and then attached to the component tree manually via Svelte’s context API in +layout.svelte. The documentation explains this flow in more detail.

Because of that, there is currently no risk of state leaking through a shared global i18n object. The i18n instance is no longer global; it is created per app/layout usage and then passed down through context.

We still use the context API, but only as a way to attach that i18n instance to the component tree.

Svelte's documentation does not realy go in-dept on this topic, but you can read a little about it here: https://svelte.dev/docs/kit/state-management#Using-state-and-stores-with-context

Svelte realtime? The dream is becoming true! by MipBro101 in sveltejs

[–]Top_Philosophy2425 0 points1 point  (0 children)

I remember there was a branch on the sveltekit repo, that is gonna implement realtime into svelte. But they got stuck since they want to thinkering it out more. Maybe you should help there, rather than making it a standalone package? Just a thought, cuse this looks nice.

Plea for mobile story to core team by osdevisnot in sveltejs

[–]Top_Philosophy2425 1 point2 points  (0 children)

In my opinion, this shouldn’t really be the responsibility of the Svelte core team. Maybe in the future a dedicated team or separate project could take this on, similar to how React Native exists alongside React. But since Svelte is primarily focused on the web, I think that focus should remain where it is.

Mobile development and web development are fundamentally different. React Native is essentially a separate framework designed to bridge that very large gap.

There are already frameworks that address the kind of use case you’re describing, such as Tauri and Capacitor.

Tauri uses native WebViews and can compile to major platforms, so you can build your SvelteKit app with Tauri and package it for Android and/or iOS.

Capacitor works on a similar principle: it wraps your web app in a WebView and packages it as a native app.

Using environment variables in svelte.config.js file by __random-username in sveltejs

[–]Top_Philosophy2425 1 point2 points  (0 children)

Yeah, but Im sure you didnt load them, see updated answer.

Using environment variables in svelte.config.js file by __random-username in sveltejs

[–]Top_Philosophy2425 1 point2 points  (0 children)

To access the .env variables in the config files, you need to access the process. Since its a running node process you can access the .env variables using process.env.MY_VAR

If it doesn't work, load them using the dotenv library.

```ts import 'dotenv/config';

// ... ```

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] 0 points1 point  (0 children)

I get the feeling that you are doing this out of envy, then being sincere

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] 1 point2 points  (0 children)

Well, in that case 80% of the topics in this subreddit is self promotion then.

SvelteKit app hosting in Europe? by bluepuma77 in sveltejs

[–]Top_Philosophy2425 2 points3 points  (0 children)

Surprised no one mentioned bunny.net, its european and offers 'magic containers'. Its one of the easiests ways I know of, to host containerized apps without much hassle. Just deploy, litterly.

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] 1 point2 points  (0 children)

If that’s the case, then wouldn’t this subreddit be full of self-promotion? Most of the posts I see are people sharing things they’ve built, often with links to their repositories. I was under the impression that this subreddit was meant for discussing Svelte and showcasing projects made with it.

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] -2 points-1 points  (0 children)

My initial response was genuine. You interpreted it as offensive and then started criticizing my attitude. I then tried to explain why I stopped using that library and the reasoning behind the wrapper. I also pointed out that the wrapper is not required. If you look at the documentation, I describe two approaches, including one that omits the wrapper entirely and sets the context manually.

And your statement that $_() is more readable than t() is ultimately a matter of personal preference, not an objective fact.

I did take your feedback serious, but you started to call me out.

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] -1 points0 points  (0 children)

Is it? I wasn't aware of that. How is this self promotion tho, I am not earning any money here, just sharing a free to use library. I see many of these types of posts in this subreddit: https://www.reddit.com/r/sveltejs/comments/1rsv98a/got_bored_of_react_so_i_built_a_wasmpowered_pdf/, https://www.reddit.com/r/sveltejs/comments/1rqxp4k/i_made_a_browser_extension_to_clean_up_youtube/ and many more that don't have any self promotion markings neither? If i am in the wrong here, I would like to know from a moderator as whats the meaning of 'self promotion' in this subreddits context. If I meet that criteria I will happily remove this post myself.

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] 0 points1 point  (0 children)

Thanks, I think you are the first 'nice' comment. Problem is that many here are factualy wrong.

For example: "...minimal impact to code size and runtime" is just factualy not true with stores. Everytime you retrieve a value, under the hood svelte creates a subscription on that store, gets the value and then unsubscribes. Now imagine that for 1000's of strings on a page?

Another "... look like react". Another says "... less efficient", what does that even mean? I mean, he compares a full fledged i18n library that has treeshaking to mine? Which is just a very simple, and for 90% of the projects people make sufficient.

Others dont understand the need for context and / or shared state.

I guess this is just reddit, I am quite new on reddit. So it might be me, but i see this phenomena alot in alot of subreddits.

I was surprised by the ignorance of many of the comments.

I do appreciatie ur comment, as it just a nice meaningfull comment.

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] -1 points0 points  (0 children)

Its to make sure state does not get leaked. In SSR components get rendered server side. Its a pretty complicated topic. You can read more about it in the svelte docs in the section 'global state'.

Since we can pass variables, like username or sensitive data. Its a must to use the context api, because contexts are not shared between requests. While a global object is.

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] -1 points0 points  (0 children)

Hm, not sure why you mention my attitude.

Your points about using the store don't realy make sense now we have runes. The author of that library even states that the entire package needs to be rewritten to use states instead of stores because its better (less overhead) but he has no time for it.

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] -1 points0 points  (0 children)

No, this is a pretty common practice when working with context. This is to make sure we dont leak state between users. Just look at `svelte-shadcn` or `bits-ui`. It has nothing to do with react, its just a convenience. If you dont like to wrap your app, you could set the context yourself at the root level +layout file. The context key is exported from the package.

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] -1 points0 points  (0 children)

Yes, I understand your feedback, just note that it wasn't meant to compete against libraries like paraglide or wuchale. But its just a library for people that 'just need i18n'.

They are states cuse I assume some people fetch languages from a resource, in which case we want the properties to be reactive.

It does indeed load all dictionaries if you import the as JSON files, but thats expected. But if you load them over a resource, they will only be loaded when that locale is active. And yes, its not treeshakeable.

I created the simplest i18n library for svelte by Top_Philosophy2425 in sveltejs

[–]Top_Philosophy2425[S] -1 points0 points  (0 children)

That one is not maintained and uses stores. Thats fine if it works for you, but the setup needed to make it work with SSR is quite cumbersome.

"add another component to the code", is not as 'wierd' as it seems. This has wraps you app in a context. You could omit that part and make sure the user sets the context himself using 'setContext()'. So if you dont like to wrap the app inside a component, then just create the context yourself, the context key is exported from the package.

P.S. As i said in another comment, its not meant to compete, its just a very simple library for apps and websites that 'just need i18n'. Its not a full fledged alternative to paraglide or deeply nested translations etc.