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

RestController doesn't handle content language #882

Closed
joelit opened this issue Aug 15, 2019 · 2 comments · Fixed by #900
Closed

RestController doesn't handle content language #882

joelit opened this issue Aug 15, 2019 · 2 comments · Fixed by #900
Milestone

Comments

@joelit
Copy link
Contributor

joelit commented Aug 15, 2019

While WebController uses content language as its parameter, the functionality is missing from RestController, probably by accident. This caused some issues when getting external labels through mappings function.

At which URL did you encounter the problem?

http://api.dev.finto.fi/rest/v1/yso-paikat/mappings?uri=http%3A%2F%2Fwww.yso.fi%2Fonto%2Fyso%2Fp94080&clang=fi

Even though trying to set the content language with 'clang', the wikidata link is returned in a rangom language, this case in Greek.

@osma
Copy link
Member

osma commented Oct 24, 2019

I don't think this is a problem. In the REST API, the "lang" parameter actually specifies the content language, because there's no UI in REST. I know this isn't entirely consistent with the URL parameters of the UI, but that's because the REST API was created before the separation of UI vs content language. In any case, I don't think there is a need for a separate "clang" parameter in the REST API.

@osma
Copy link
Member

osma commented Oct 24, 2019

The original reported problem (getting a random language for the wikidata link) is of course a valid issue but I think it can be solved without introducing a clang parameter in the REST API, simply by making sure the lang parameter gets passed correctly.

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

Successfully merging a pull request may close this issue.

2 participants