Satoshi-Engineering / tip-cards

Lightning Tip Cards are a tip (or gift) card system, where you can fund tip cards via the lightning network and the gifted person can redeem the funded cards. The gifted person gets a short introduction to bitcoin and a lightning app recommendation to start their journey into the bitcoin rabbit hole.
MIT License
21 stars 10 forks source link

Hebrew fixes + suggestion to save locale choice in session storage #6

Closed oren-z0 closed 1 year ago

oren-z0 commented 1 year ago

Session storage is kept for page refreshes - but not if the browser tab is closed.

I also suggest that setLocale will do:

history.replaceState({}, document.title, location.pathname + "?lang=x");

And then as top priority in getPreferredLocale parse the query parameter lang.

Then if I share the page with non-techy friends, they will see the exact page that I'm seeing (the same page I intended to send them).

Lastly, it would be nice to have in the tip-cards set configuration page a radio button with to choices:

(where x is the name of the current language).

If the user chooses "Use language x", the QR code links will end with ?lang=x.

What do you think?

dr-erych commented 1 year ago

I think in order to make the usage of sessionStorage GDPR (EU law) compliant we would need to mention its usage somewhere in a "Privacy" section of the About page (or on a separate page). A cookie bar (requesting user consent) is for sure not needed, but I need to do some research what is necessary.

This was actually the reason why we didn't store the language in the first place. ;)

If we move the language to the URL only (which I think would be more elegant), we could omit the privacy policy.

dr-erych commented 1 year ago

I would say, let's omit the usage of sessionStorage entirely and only use the URL variant.

Instead of adding a get parameter, a path segment looks better in my eyes, this would require to alter the router configuration like described here: https://stackoverflow.com/questions/58240149/how-to-add-an-i18n-locale-prefix-in-vue-router-for-all-the-locales-except-for-th

oren-z0 commented 1 year ago

Yes, I guess you're right. Removing the last commit from the PR.