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

If no ZIM found for a language then automatically make the search with other languages (kiwix-serve) #562

Open
kelson42 opened this issue Jun 29, 2022 · 10 comments

Comments

@kelson42
Copy link
Contributor

kelson42 commented Jun 29, 2022

Kiwix-serve welcome page search, per default, runs with the browser language. It’s not possible (for the moment), to make search in many chosen languages…. Or then with all of them.

Being a person which can read in many languages, I often search for a content language which is not in the language currently selected (most of the time, the language of my browser). Doing so, I get nonresult, then have to understand that the problem is the language filter and then change it.

Therefore, I propose, to display results in « other languages » as well, at least if no result is found. But maybe it would be good to do that all the time. From a UI point of view, we would have two sections of tiles:

  • X books in French
  • Y books in other languages
@kelson42
Copy link
Contributor Author

@juuz0 Do you have an opinion on this idea?

@juuz0
Copy link
Collaborator

juuz0 commented Jul 31, 2022

@kelson42 I think it's good and definitely useful (as I had the exact same problem as yours earlier).

Though, for the implementation, not too sure if we should be showing tiles straight away (feels like that sort of defeats the purpose of filter). Alternatively, how about showing a link after all related tiles end:
"X results found for term 'xyz' in other languages, click here to display them."
After that, display them (but I also feel these are extra clicks for the same thing as you suggested).

@kelson42
Copy link
Contributor Author

I don't it would defeat the purpose of language filter if we would "always" provide as well results in other languages. It is just that the language filter won't be strict, but kind of "prefered result".

I'm in favor to run the search for all languages also only if all tiles for the prefered language are already visible ; either from the beginning or after scrolling down.

Last point: in last section, the tiles for all languages should not be displayed, only for all languages without the prefered language.

@juuz0
Copy link
Collaborator

juuz0 commented Aug 1, 2022

Yeah okay I agree, should I start implementing it then? @kelson42

@kelson42
Copy link
Contributor Author

kelson42 commented Aug 1, 2022

@juuz0 Not sure. Would ne great, but don't know how complex it is.

@kelson42 kelson42 added this to the 3.4.0 milestone Aug 1, 2022
@mgautierfr
Copy link
Member

Could it be a sorting order (queried language first, other language after) instead of a true filter ?

@kelson42
Copy link
Contributor Author

@mgautierfr I don’t think so. Ultimatively we will probably have a language filter accepting many languages.

@kelson42 kelson42 modified the milestones: 3.3.1, 3.4.0 Sep 24, 2022
@juuz0
Copy link
Collaborator

juuz0 commented Feb 5, 2023

If this is still desirable, I can start working on this.

Extra:
This line got my attention,

Kiwix-serve welcome page search, per default, runs with the browser language. It’s not possible (for the moment), to make search in many chosen languages…. Or then with all of them.

Seems to be possible now (kiwix/libkiwix#841) - no possible way to do it through UI yet (which shouldn't be much hard again, multiple checkboxes? :> don't see an issue open for that though)

@mgautierfr
Copy link
Member

I think that search in multiple (selected) languages is a different issue.

Another solution to the current problem (the title of the issue is more a proposed solution to a problem than a description of the problem :) ) is that we could do the search in all language by default and propose a button search in <your language> only to help user filtering more the results.

@kelson42
Copy link
Contributor Author

kelson42 commented Feb 7, 2023

If this is still desirable, I can start working on this.

Yes. Let me rephrase this ticket:

  • We need the features
  • All the time (not only if no results in preselected language), but only if there is space to display these other books and if there is a language filter selected
  • For the moment you probably need to make two requests (one with the language filter, one without)
  • Visually we need a clear separation between the books with the language filter and the one without so first "For your language(s)" like today on the top and then "In other languages" below.

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