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

Select language is not persistent enough #208

Open
kelson42 opened this issue Jun 26, 2024 · 4 comments
Open

Select language is not persistent enough #208

kelson42 opened this issue Jun 26, 2024 · 4 comments

Comments

@kelson42
Copy link
Contributor

If I pick French in language selector at https://library.kiwix.org/viewer#ted_mul_blockchain_2024-06/, then it works. But if I click on the topbar button to go to the homepage of my ZIM, the Inloose my language selection, it should not.

@benoit74
Copy link
Collaborator

This information is stored in a query parameter, so definitely not persistent at all.

I think we should store this information:

  • ideally in a kind of browser store
    • local storage ? cookie ?
    • I'm not sure what is going to work properly on the various readers we have
  • at least in a URL fragment (easy, and more resilient than the query parameter which is known to be dropped by kiwix-serve for instance)
    • this is pretty easy to implement and allows to not loose the information when navigating the site (currently when we click the "TED" logo we trick the thing by going back in the navigator history ... which is working only because it is not yet possible to navigate from one video to the next one)
    • but this does not help to not loose the information when going back home with kiwix-serve button (and probably other buttons in other readers)

@rgaudin do you have any information on which kind of storage should be used for proper operation across kiwix readers? Or should I create a test ZIM with this to confirm what is working?

@rgaudin
Copy link
Member

rgaudin commented Jul 2, 2024

Well without implementation spec/reqs, it's hard to know (I know I repeat myself).
I am not sure about the actual answer to your question. Clearly deserves assessment and documentation.
Cookie is the reglar safest over HTTP but on readers using a custom scheme it might not be enabled.
LocalStorage support is very wide and we use it already in nautilus across readers so that should be OK but there's no guarantee

@kelson42
Copy link
Contributor Author

kelson42 commented Jul 3, 2024

Cookies should work, otherwise this is a bug.

@benoit74
Copy link
Collaborator

benoit74 commented Jul 4, 2024

Let's rely on local storage for now, see openzim/overview#39 (comment)

@benoit74 benoit74 added this to the 3.1.0 milestone Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants