Skip to content
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

Time remaining in SummaryBottomSheet is always in English #1097

Closed
cmahopper opened this issue Jul 9, 2018 · 7 comments
Closed

Time remaining in SummaryBottomSheet is always in English #1097

cmahopper opened this issue Jul 9, 2018 · 7 comments

Comments

@cmahopper
Copy link

Android API: 27
Mapbox Navigation SDK version: 0.16.0-beta.1

Time remaining is not localized, it seems. It is always "X day(s) Y hr Z min" no matter what language is set on the device. This seems to be hardcoded in TimeUtils.java.

Maybe I've misunderstood something.

@danesfeder
Copy link
Contributor

Hey @cmahopper 👋 you're correct here - these Strings need to be extracted into our resources and then uploaded to Transifex for translation via contributors. Thanks for pointing this out!

@P-Zenker
Copy link

P-Zenker commented Sep 4, 2018

Hey @danesfeder,

I use
Android API: 28
Mapbox Navigation SDK version: 0.18.0

and it still seems not being localized - is that correct?

NavigationRoute.builder(this)
                .accessToken(Mapbox.getAccessToken())
                .language(Locale.GERMAN)
....

// Returns for example 5 hr 12 min
TimeFormatter.formatTimeRemaining(this.getApplication(), CUMapboxUtil.buildBeginningOfLegRouteProgress(directionsRoute).durationRemaining()));

@P-Zenker
Copy link

P-Zenker commented Sep 4, 2018

Your linked function gives the (correct formatted) arrival time.
I want the time remaining, like you can see in the screenshot

2018-09-04 19 39 21

But as you can see the time format is english and not german (5 Std., 12 Min.). On the other hand distance and arrivial time are correct.

Another screenshot to show the wrong remaining time format:
2018-09-04 19 57 49

@danesfeder
Copy link
Contributor

Ah I see now sorry about that @P-Zenker - we source those strings from Transifex https://www.transifex.com/mapbox/mapbox-navigation-sdk-for-android/ and it doesn't look like they have been translated for German just yet. Please feel free to contribute those translations and we will update them in the SDK!

@P-Zenker
Copy link

P-Zenker commented Sep 4, 2018

No problem - thanks. Translations done ;)

@danesfeder
Copy link
Contributor

@P-Zenker awesome thanks, I'll tag you in the PR that updates them

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants