kiwix-tools icon indicating copy to clipboard operation
kiwix-tools copied to clipboard

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

Open kelson42 opened this issue 2 years ago • 10 comments

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 avatar Jun 29 '22 15:06 kelson42

@juuz0 Do you have an opinion on this idea?

kelson42 avatar Jul 31 '22 07:07 kelson42

@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).

juuz0 avatar Jul 31 '22 14:07 juuz0

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.

kelson42 avatar Jul 31 '22 17:07 kelson42

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

juuz0 avatar Aug 01 '22 14:08 juuz0

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

kelson42 avatar Aug 01 '22 15:08 kelson42

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

mgautierfr avatar Aug 03 '22 12:08 mgautierfr

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

kelson42 avatar Aug 14 '22 16:08 kelson42

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 (https://github.com/kiwix/libkiwix/pull/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)

juuz0 avatar Feb 05 '23 23:02 juuz0

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.

mgautierfr avatar Feb 06 '23 11:02 mgautierfr

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.

kelson42 avatar Feb 07 '23 11:02 kelson42