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

Show highway names in users' language with gloss #618

Open
adamfranco opened this issue Dec 14, 2022 · 10 comments
Open

Show highway names in users' language with gloss #618

adamfranco opened this issue Dec 14, 2022 · 10 comments
Labels

Comments

@adamfranco
Copy link
Collaborator

Around the world there are many highways that have translated names tagged in OSM, but highway names are shown in Americana as the local name, which might not be understandable by the viewer, especially in cases where the script of the local language is not familiar to the viewer. As someone who doesn't read Hebrew, Arabic, or other non-latin scripts I'd expect to see my local language or at least a Latin scripts on road names.

Here's an example of the Armenian Patriarchate (openstreetmap.org) in Jerusalem, which has Hebrew script as the local name, but has many translations.
Armenian Patriarchate in Jerusalem.
Screen Shot 2022-12-14 at 11 36 28 AM

Location in Americana
Screen Shot 2022-12-14 at 11 36 50 AM

As with place labels, glossing with the local name strings would make the rendering useful for travelers so that can compare street signs while walking about while still relating the translated name to guidebooks or other materials translated into their language.

@adamfranco adamfranco changed the title Show highway names in user's language Show highway names in users' language with gloss Dec 14, 2022
@1ec5
Copy link
Collaborator

1ec5 commented Dec 14, 2022

#578 (comment) implemented language switching for road names, but OpenMapTiles only contains names in English, German, and the local language: openmaptiles/openmaptiles#769.

@1ec5 1ec5 added the openmaptiles A change is needed in OpenMapTiles to support this label Dec 14, 2022
@1ec5
Copy link
Collaborator

1ec5 commented Dec 14, 2022

Oh, looks like the localization functionality for streets has broken since that comment.

@ZeLonewolf
Copy link
Owner

That cited openmaptiles issue (769) is about removing the legacy name_en, name_de, etc., in favor of colon-separated name tags e.g. name:en, name:de, etc. If language name support is missing on roads but should be there, that needs to be a separate OMT ticket.

@1ec5
Copy link
Collaborator

1ec5 commented Dec 14, 2022

#619 fixes the regression introduced in #471 so that road name labels are once again localized in the user’s preferred language (as long as the user prefers English or German).

@1ec5
Copy link
Collaborator

1ec5 commented Dec 14, 2022

As with place labels, glossing with the local name strings would make the rendering useful for travelers so that can compare street signs while walking about while still relating the translated name to guidebooks or other materials translated into their language.

In fact, navigation applications that localize place names and POIs generally keep street names unlocalized for this reason. A gloss would make some sense for this style, which is not heavily focused on the real-time turn-by-turn navigation use case. If we simply set text-field to localizedNameWithLocalGloss, then the entire road name label could often get collided out by other things like route shields. As an alternative, we could add a separate symbol layer so it can participate independently in symbol collision. We would need to place the preferred-language name above the street line while placing the local-language name below the street line, but that could be confusing compared to an inline gloss.

@ZeLonewolf
Copy link
Owner

I just checked the tiles, and language tagging for streets does appear to be present:

image

@1ec5
Copy link
Collaborator

1ec5 commented Dec 19, 2022

All I see are the legacy name_en and name_de fields, but nothing corresponding to the name:ar tag on this way:

Ayalon South

@ZeLonewolf ZeLonewolf removed the openmaptiles A change is needed in OpenMapTiles to support this label Dec 20, 2022
@ZeLonewolf
Copy link
Owner

This is a planetiler bug, logged in onthegomap/planetiler#419

Our code should be using name:xx tags and not name_en / name_de, etc tags.

@ZeLonewolf
Copy link
Owner

Thanks @zstadler for pointing out the problem in #624.

@zstadler
Copy link

I should have known it is a Planetiler issue rather than an OpenMapTiles issue. Otherwise, Israel Hiking Map would have been in serious trouble...

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

No branches or pull requests

4 participants