Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
BAH-3266 | Siva Reddy | Fetching concepts from default locale if no concepts in requested locale #235
BAH-3266 | Siva Reddy | Fetching concepts from default locale if no concepts in requested locale #235
Changes from all commits
9693e24
722e47f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Little confused .. should it not be that
Right now this seem to always return defaultlocale + locale from parameter
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.
@angshu : The API call sending the parameter
locale=fr
and originating from here.Since, we are passing locale from UI for this end point, I included passed locale and default locale.
As per your comment, can I remove param
locale
param in the API call here and update the end point locale calculation logic based on above comment ?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.
Not remove the locale param from the URL. If you look at API perspective, the above considerations are what I am saying should be applied. i.e take "locale" from parameter if supplied, else take the locale from user session & default locale.
The "getConcept()" takes params, so from the caller of this function, we should pass the "locale" (which is the current code).
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.
One way to do this - is from the getConcepts()
The above line should not use "$bahmniTranslate.use()" if locale is not specified through param.
Can you check how many places "conceptSetService.getConcepts()" is called in the UI code?
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.
@angshu we are using in few places.
In all the places, we are passing the params
name
andv
only.so, can I remove the line
params['locale'] = params['locale'] || $bahmniTranslate.use();
and updategetLocales(...)
based on supplied locale only or usersession locale and default locale.