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

Languages String does not return proper lang #70

Open
cedricdcc opened this issue Sep 9, 2024 · 4 comments
Open

Languages String does not return proper lang #70

cedricdcc opened this issue Sep 9, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@cedricdcc
Copy link
Contributor

When testing the webcomponent it was found for this html config :

<!DOCTYPE html>
<html>
<head>
        <title>Test vocab webcomponent</title>
        <script type="module" src="https://vocab.vliz.be/webcomponent/main.js"></script>
</head>

<body>
        <!-- The widget will be inserted here -->
        <div>
                <h1>Search</h1>
                <vocab-search-bar
                  search-endpoint="https://vocab.vliz.be/"
                  languages-string="nl"
                  >
                </vocab-search-bar>
               </body>
</html> 

The vocab that is loaded in are file dumps from DAMS.

It was found that this returned the concepts and showed them in english and not in the requested dutch.

@cedricdcc cedricdcc added the bug Something isn't working label Sep 9, 2024
@cedricdcc
Copy link
Contributor Author

Upon further inspection I found that the language string does filter on the lang tag , so when given nl the results returned only contained concept which had a nl string. It is weird though that the english version was still shown in the search field though instead of the dutch version of the concept.
image

@MikiDi
Copy link
Contributor

MikiDi commented Sep 12, 2024

Hi Cedric,
As you show here, the languages-string-attribute is currently only used as an input to the backend search operation.
The mode of display is independent from the provided languages-string and will always show all languages in the filter results box, and the first language result in the selected box.
Just to clarify what we're aiming for: Both in the filter-results box as in the select-box, you'd like to show only the label in the language corresponding to the provided languages-string. For the above example that would be:
selected box: Zuidpool stereo ...
filter results box: Zuidpool stereografisch
Is that correct?

@cedricdcc
Copy link
Contributor Author

Yes indeed so for this example instead of South Pole Stereographic it should have been zuidpool stereografisch

@nvdk
Copy link
Contributor

nvdk commented Nov 18, 2024

if this is resolved, can the issue be closed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants