mapbox / mapbox/MapboxGeocoder.swift
GeocodeOptions.locale loses script and country codes
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 133
- Forks
- 46
- PR merge metrics
- No merged PRs in 30d
Description
GeocodeOptions only passes along the bare language code to the Geocoding API. For example, even if the system locale is Traditional Chinese (Hong Kong) and the developer sets the locale property to Locale.current, the language query parameter ends up being zh instead of zh-Hant-HK. GeocodeOptions should pass along the entire locale identifier; it would be API’s responsibility to strip any components it doesn’t need or understand.
/cc @apendleton
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in MapboxGeocoder/MBGeocodeOptions.swift around line 101, where GeocodeOptions passes the locale to the Geocoding API. Trace how the locale becomes the language query parameter and verify that a locale such as zh-Hant-HK remains intact. Done means the full locale identifier is passed rather than only its bare language code.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100