Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

Feature: Dynamically localize compass text - #949

Closed
friedbunny wants to merge 1 commit into
mapbox:masterfrom
friedbunny:localized-compass
Closed

friedbunny wants to merge 1 commit into
mapbox:masterfrom
friedbunny:localized-compass

Conversation

@friedbunny

Copy link
Copy Markdown
Contributor

Draw the compass text dynamically based on the user's device language. This adds CompassBlank.png at the three necessary scales.

I don't know what the localization plans are (and being pre-beta it's surely not a high priority), so this hardcodes the different localized strings rather than messing with anything more involved. Once localization gets on the roadmap this will have to be revisited.

Japanese/Chinese

Mapbox GL in Japanese

English/Default

Mapbox GL in English

Apple Maps in Japanese

Apple Maps in Japanese

... not sure why I've been so fixated on compasses, but hopefully this is useful. I also tossed in [email protected] for the hell of it.

@friedbunny

Copy link
Copy Markdown
Contributor Author

Oh, and this doesn't work in the simulator — I believe language is (mistakenly) always taken from the system, not from the iOS simulator.

@incanus

incanus commented Mar 6, 2015

Copy link
Copy Markdown
Contributor

Oh, interesting... So this hasn't come up in past with our iOS SDK. The image is actually cribbed from MapKit by use of UIKit-Artwork-Extractor. I'm going to close here for now, but the PR will stick around and we can revisit. Do you have a good sense @friedbunny what Maps.app does here?

@incanus incanus closed this Mar 6, 2015
@friedbunny

Copy link
Copy Markdown
Contributor Author

iOS 8 Maps follows this strategy (AFAIK) — I took the blanks from MapKit.framework. 😅

@incanus

incanus commented Mar 6, 2015

Copy link
Copy Markdown
Contributor

Cool, much appreciated and ❤️ the attention to detail. We don't yet have localization on the roadmap, but it will become increasingly important, including at the GL labels level. We'll always have this here, but I think closing for now rather than leaving open is a good move.

I WON'T FORGET U LOCALIZED COMPASS

@friedbunny

Copy link
Copy Markdown
Contributor Author

Sure thing, this is definitely not a priority. Just one of those little touches that puts a twinkle in my eye and doesn't trod anybody's toes too terribly.

And since I'm at it, perhaps I'll add the missing @3x resources in another PR — if those aren't going to be revamped.

@incanus

incanus commented Mar 6, 2015

Copy link
Copy Markdown
Contributor

And since I'm at it, perhaps I'll add the missing @3x resources in another PR — if those aren't going to be revamped.

If you have them from Apple, yeah. Per #843 we are going to do our style sprites differently but if we're copying Apple resources, I'm all for grabbing their @3x versions as well.

@incanus incanus mentioned this pull request Mar 6, 2015
@1ec5 1ec5 mentioned this pull request Mar 6, 2016
@1ec5 1ec5 mentioned this pull request Apr 21, 2016
13 of 14 tasks
@1ec5

1ec5 commented Jun 28, 2016

Copy link
Copy Markdown
Contributor

#4783 made the compass text localizable using a similar strategy as in this PR (but slightly more robust). However, no actual localizations have been added yet.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants