-
Notifications
You must be signed in to change notification settings - Fork 13
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
Providing a translation for the given osm values #5
Comments
I can give you a hand on the implementation, but I will give @yohanboniface some time to answer, he did all the work on this leaflet plugin. For some weeks we also have a new information at the search results: |
So you agree that it would be best to change leaflet.photon and not the output of photon itself? |
Hm, that's difficult. On the one hand it would make sense to modify the output of photon, because the other features are translated too, like name, city, country ... On the other hand these classifications are immutable information similar to the osm_id. Imagine you want to display a house icon if So I would do it in the leaflet plugin. |
Ok that is good. That were the exactly same thoughts as I had. Do you maybe know an already established service for translating these key-value combinations? |
ok, this is not making our lives easier: I checked all possible osm key / value pairs that exist in nominatim, there are more than 30 thousands combinations: |
The osm website has a long list of translated descriptions for key/value pairs in their localization files. (e.g English version starts here, other languages are in the same directory). I'd love to see this part of the localizations move to their own project one day, so that it is easier to use them in other projects (and also to remove myself as a bottleneck in including new key/value pairs to be translated). There is an related issue here: openstreetmap/openstreetmap-website#80 |
@christophlingg Indeed, but with around 2000 of them most of the data is covered. The long tail are typos and oddities. |
To add to that: there are very few keys, so any key/value combinations that are unknown can be mapped to a general description for that key, e.g. amenity=blue_sky is sufficiently described by 'Amenity'. |
@Haves1001 if I get your correctly, I think the best approach is to provide a I'm not sure this kind of feature as to be in the Leaflet.Photon itself (in the sense that every one will have its own translation needs), as soon as the plugin gives you a way to take control of it. |
Mhh this really seems to be harder than expected. And I would agree @yohanboniface that the whole translation thing could be an overkill for the leaflet photon plugin itself. @lonvia , @christophlingg : Maybe the best approach would be to create some kind of new repository where you would use the localisation files from openstreetmap-website/.../locales to create some kind of library (Javascript, PHP ...)? |
I did use this plugin to implement a search on my leaflet map. I'm not totally sure if I should post this here or on the "main" photon github page.
As you can see on the following picture I am trying to display the information of the search result in german (and any other language the user wants to). Unfortunately all key which start with "osm_" (http://photon.komoot.de/api/?q=berlin&lang=de) won't be "translated".
I guess this is because they come directly from osm? I don't know what is the best approach to translate those values, but I definitely would like to use them in the search result, as the information that the shown result is a city might be essential for the user.
If you see a way how this could be resolved best, I would be glad to help/support with it.
The text was updated successfully, but these errors were encountered: