mapbox / mapbox/MapboxGeocoder.swift

GeocodeOptions.locale loses script and country codes

Open
#109 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.