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

Concept types in the search box are shown as URIs, not labels #1254

Closed
jarmosaarikko opened this issue Dec 2, 2021 · 3 comments · Fixed by #1284
Closed

Concept types in the search box are shown as URIs, not labels #1254

jarmosaarikko opened this issue Dec 2, 2021 · 3 comments · Fixed by #1284
Assignees
Labels
Milestone

Comments

@jarmosaarikko
Copy link

At which URL did you encounter the problem?

https://dev.finto.fi/lajisto/fi/

What steps will reproduce the problem?

  1. go to the search box and type "kissa"
  2. you will see a dropdown list with the label and its type
  3. the lajisto.MX -type label is shown in English irrespective of the used language

What is the expected output? What do you see instead?

Show the lajisto.MX -labels in Finnish or Swedish when these languages are chosen

What browser did you use? (eg. Firefox, Chrome, Safari, Internet explorer)

Chrome

@joelit joelit added the question label Dec 2, 2021
@joelit
Copy link
Contributor

joelit commented Dec 2, 2021

Hi, no label is shown for the type of "kissa" - that is the URI of the concept type you are seeing. Maybe the data should include skos labels for classes, as now they look like this:

lajisto:MX.species
  rdfs:label "Art"@sv, "Laji"@fi, "Species"@en ;
  a owl:Class .

@osma
Copy link
Member

osma commented Dec 2, 2021

The data is correct AFAICT. For RDFS/OWL classes like these, the expected label property to use is rdfs:label as is used here. YSO does the same. Yet for some reason it is not showing up in the Skosmos search autocomplete box:

kuva

The type labels are shown correctly on the search result page though:

kuva

@osma osma changed the title lajisto.MX -type names in the search box are shown in English lajisto concept types in the search box are shown as URIs, not labels Dec 2, 2021
@osma osma added bug and removed question labels Mar 1, 2022
@osma osma added this to the Next Tasks milestone Mar 1, 2022
@osma osma self-assigned this Mar 1, 2022
@osma
Copy link
Member

osma commented Mar 1, 2022

I think I found the reason - it's related to handling of URI namespace prefixes in the REST method search as well as in JS code handling the autocomplete box. I will prepare a PR once I've got a clean fix...

@osma osma changed the title lajisto concept types in the search box are shown as URIs, not labels Concept types in the search box are shown as URIs, not labels Mar 2, 2022
@miguelvaara miguelvaara modified the milestones: Next Tasks, 2.14 Mar 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

4 participants