mapbox / mapbox/mapbox-navigation-android
Locale mismatch between distance formatter and time formatter in SummaryBottomSheet and InstructionView
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 651
- Forks
- 321
- PR merge metrics
- No merged PRs in 30d
Description
**Mapbox Navigation SDK version:**
v1.1.0
### Steps to trigger behavior
1. Set system locale English
2. Query Directions API with setting other language like "ja"
3. Remaining distance is shown as imperial units (system locale) while remaining time is shown as "min" (Japanese locale)
### Expected behavior
Remaining distance and remaining time should use same locale.
### Details
- `DistanceFomatter` in `SummaryBottomSheet` is initialized [here](https://github.com/mapbox/mapbox-navigation-android/blob/master/libnavigation-ui/src/main/java/com/mapbox/navigation/ui/summary/SummaryBottomSheet.java#L238) with system locale.
- `DistanceFormetter` in `InstructionView` is initialized [here](https://github.com/mapbox/mapbox-navigation-android/blob/master/libnavigation-ui/src/main/java/com/mapbox/navigation/ui/instruction/InstructionView.java#L570) with system locale.
- `TimeFormatter` in `SummaryBottomSheet` is initialized [here](https://github.com/mapbox/mapbox-navigation-android/blob/master/libnavigation-ui/src/main/java/com/mapbox/navigation/ui/summary/SummaryModel.java#L36) with voiceLocale in response of directions API if possible.
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 with the formatter initialization points in libnavigation-ui/src/main/java/com/mapbox/navigation/ui/summary/SummaryBottomSheet.java, InstructionView.java, and SummaryModel.java. Reproduce the issue using an English system locale and a Directions API language of "ja". Done means the remaining distance and time use the same locale, with tests or verification covering that scenario.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- internationalization, mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100