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

Search results are questionable. #359

Open
JohnMcLear opened this issue Apr 2, 2020 · 4 comments
Open

Search results are questionable. #359

JohnMcLear opened this issue Apr 2, 2020 · 4 comments

Comments

@JohnMcLear
Copy link

JohnMcLear commented Apr 2, 2020

Shouldn searching for "english" return

"English", "English (British)"

or at least

"English", "British English"```

?

Currently it just returns "English".
@amire80
Copy link
Contributor

amire80 commented Apr 2, 2020

It does return British English if it is one of the possible languages. For example, if you select the user interface language in Wikipedia, searching for English will show "British English", "Canadian English", "English", "Patois" (Jamaican), and "Ænglisc" (Old English). The language list is initialized separately for each instance, and the whole list is not always shown. Some instances include British English and some don't.

@amire80 amire80 closed this as completed Apr 2, 2020
@JohnMcLear
Copy link
Author

JohnMcLear commented Apr 2, 2020

image

image

I don't just open issues for fun y'know ;)

@amire80 amire80 reopened this Apr 2, 2020
@amire80
Copy link
Contributor

amire80 commented Apr 2, 2020

Oh drat. Sorry. I know why: Because on Wikipedia we also use the search service, which is separate from this jquery package.

@Nikerabbit
Copy link
Member

Amir is right, the jquery.uls library only providers rudimentary prefix matching by default. You can supply the searchAPI parameter, e.g. https://www.mediawiki.org/w/api.php?action=languagesearch&format=json&formatversion=2.

You can also implement your own backend. We could also implement word-matching client side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants