-
Notifications
You must be signed in to change notification settings - Fork 2
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
Add localization param #2
Conversation
Reviewer's Guide by SourceryThis pull request adds a 'localization' parameter to the OpenStreetMapAutocomplete component, allowing the component to support different languages. The 'localization' parameter is added to the Props interface, given a default value of 'en', and incorporated into the geocoding URL to set the 'accept-language' parameter. Additionally, the 'localization' parameter is added to the dependency array of the useCallback hook. File-Level Changes
Tips
|
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.
Hey @Amirsz01 - I've reviewed your changes - here's some feedback:
Overall Comments:
- Consider leaving the default value for 'localization' as undefined instead of 'en', allowing the OpenStreetMap API to handle the default language.
- The parameter name 'localization' might be too broad. Consider renaming it to 'language' for more specificity.
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment to tell me if it was helpful.
Looks good to me, thanks @Amirsz01 for the PR |
@Amraneze Can you update Readme and create new release for npm package? |
Summary by Sourcery
This pull request introduces a new 'localization' parameter to the OpenStreetMapAutocomplete component, allowing users to specify the language for search results from OpenStreetMap.