-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
DS-4466 REST API should obtain language settings from Client #2784
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Overall, the code here looks great @ddinuzzo ! The tests look good as well & do a good job of providing this works as expected for language-specific submission configurations (which is one of the main use cases). That said, I do have one minor request for JavaDocs inline below. Please update those JavaDocs before we can merge this.
...server-webapp/src/main/java/org/dspace/app/rest/repository/SubmissionFormRestRepository.java
Show resolved
Hide resolved
@tdonohue this should be ready to go now |
@ddinuzzo It seems there's no IT yet for the use case of multiple languages in header Can you add an IT with default locale English and the language header to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ddinuzzo
This looks good to me, I only found one use case that's not supported
If I set webui.supported.locales = en, de, nl
and I have submission forms in nl
but not in de
, and I use Accept-Language: de;q=0.9,nl;q=0.8,en;q=0.7
, this returns the English form (the default)
This is because it's assumed that all webui.supported.locales are available for each submission form, and I18nUtil.isSupportedLocale(current)
doesn't take into account whether there's a submission form for this language.
I don't see this as a blocking issue, but I would prefer a github issue would be created for this
This is at +2, merging |
References
Description
This PR add the general infrastructure needed to deal with the accept-language header from the client and test specific to proof that the submission definition are managed properly in a multi-lang environment. The implementation of the multilanguage support in the authority control is left outside as a major rework of this aspects is undergoing.
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
pom.xml
), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.