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
Routing directions mentioning that roads are unnamed #904
Comments
|
All directions come directly from the upstream routing engine. |
|
So opening a issue at repository osrm-backend might be more expedient? Might this be configuration problem or are you getting directions directly from a OSRM server? I'm asking because OSRM is not listing "unnamed" in their frontend. |
|
We're using the project-osrm.org server. |
|
It looks we are deliberately saying "unnamed" when the server doesn't provide a name while the OSRM UI leaves the name out - see https://github.com/openstreetmap/openstreetmap-website/blob/master/app/assets/javascripts/index/directions/osrm.js#L72. |
|
I don't think mentioning the fact that the road has no name is a problem as such, but I've changed it to say |
|
I'm not sure if tomhughes@1729a68 causes some regressions here or if it's something completely different. At least when requesting route instructions with locale set to German, street names are no longer shown. English version looks ok, though. On a second thought, all the translations except for English are lacking the variable Some reference screenshots: Link to query: http://www.openstreetmap.org/directions?engine=osrm_car&route=51.5216%2C6.9292%3B51.4572%2C7.0115 |
|
@mmd-osm the translations likely need updating. |
|
Would it be complete nonsense to fall back to the old behaviour unless |
|
No it wouldn't be nonsense, it would be a lot of work. What I should really have done is to change the translation names, so that it would fallback to english until they were retranslated, but again it was a lot of work. |
|
Thanks, I'm getting your point. I don't seem to find a way in the I18n lib to deal with missing variable names. I can only think of some crazy workarounds like the following (not tested) or even checking for var name = s[1] ? "<b>" + s[1] + "</b>" : I18n.t('javascripts.directions.instructions.unnamed');
if (instCodes[0] === "11" && instCodes[1]) {
instText += I18n.t('javascripts.directions.instructions.roundabout_with_exit', { exit: instCodes[1], name: name } );
} else {
var transl1 = I18n.t(TURN_INSTRUCTIONS[instCodes[0]], { name: name });
var transl2 = I18n.t(TURN_INSTRUCTIONS[instCodes[0]]);
if (transl1 === transl2) // fallback to legacy mode where name variable is missing
instText += transl2 + " " + name;
else
instText += transl1;
} |
|
No, we are not doing anything crazy like that - apart from anything else we would never be able to remove it. The old way was technically buggy anyway, because different language may need to put the road name in different places - glueing strings together is bad for i18n. |
|
I've pushed d28ae2a now to rename the strings. |
|
Thanks a lot! The fallback to English looks way better now. |


Directions made by car routes with OSRM are explicitly calling streets without names "unnamed".
see live: http://bit.ly/1FHR6O9
Unsure if this is a OSRM issue, but seems to be a frontend thing. osrm.at and osrm.at frontend2 is not mentioning unnamed roads.
this is confusing users (read some comments about this) and doesn't provide any valuable information
The text was updated successfully, but these errors were encountered: