mapbox-navigation-android
mapbox-navigation-android copied to clipboard
Locale mismatch between distance formatter and time formatter in SummaryBottomSheet and InstructionView
Mapbox Navigation SDK version: v1.1.0
Steps to trigger behavior
- Set system locale English
- Query Directions API with setting other language like "ja"
- 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
@JunDai can you take a look at this when you have a chance? 🙏
it's related to the fix of https://github.com/mapbox/mapbox-navigation-android/issues/1990 I can check more soon.
@OttyLab - thanks for using our SDK and reporting this issue.
Did you find this issue when you were using our NavigationView
component? I would guess you were using the InstructionView
and SummaryBottomSheet
stand-alone widgets in your layout? In this case, there is an API setDistanceFormatter
that would allow you to pass in a distanceFormatter during runtime.
I will revisit this piece and see if we can unify the locale for those three places.
@JunDai
Thanks, you are right. This is caused when I do NOT use NavigationVew
and do NOT set DistanceFormatter
by myself. (NavigationView
set both formatter by using voice unit and there's no problem)
Therefore this is a feature request rather than a bug ticket. If SDK provides a way to set up both formatter in one place, it's straightforward.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.