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

Extend strings with explicit 'ref' template #153

Open
yuryleb opened this issue Sep 12, 2017 · 3 comments
Open

Extend strings with explicit 'ref' template #153

yuryleb opened this issue Sep 12, 2017 · 3 comments

Comments

@yuryleb
Copy link
Contributor

yuryleb commented Sep 12, 2017

It's just question to discuss - currently OSRMTI contains implicit logic to concatenate {way_name} and {ref} together to use as new {way_name} value further.

Recent #148 'Make parentheses around ref localizable' tries to make this concatenation more public and localizable but IMHO it would be better to have special templates when both {way_name} and {ref} are available for the maneuver, say:

        "continue": {
            "default": {
                "default": "Turn {modifier}",
                "name": "Turn {modifier} to stay on {way_name}",
                "name and ref": "Turn {modifier} to stay on {way_name} ({ref})",
                "destination": "Turn {modifier} towards {destination}",
                "exit": "Turn {modifier} onto {way_name}"
            },

or even this TTS-friendly way 😉

        "continue": {
            "default": {
                "default": "Turn {modifier}",
                "name": "Turn {modifier} to stay on {way_name}",
                "name and ref": "Turn {modifier} to stay on {way_name}, route {ref}",
                "destination": "Turn {modifier} towards {destination}",
                "exit": "Turn {modifier} onto {way_name}"
            },

What do you think about this?

@1ec5
Copy link
Member

1ec5 commented Sep 12, 2017

ref can already contain a prefix, as in SR 123. ("SR" stands for "state route" in this case.) So adding "route" can be redundant. It's worth noting that the way name in destination can also have a ref, although we don't get it in structured form at the moment: Project-OSRM/osrm-backend#3329. The downside to inlining the name-ref combination is that we'll contribute to a combinatoric increase in the number of strings to translate. But if there's a use case beyond prepending "route", then that may become necessary.

@yuryleb
Copy link
Contributor Author

yuryleb commented Sep 12, 2017

OK, but this is US-specific 😉 Most European routes are just number(s). English name-ref template could really have just parentheses around ref but other languages could "pronounce" this much more extended (or just replace parentheses to language-specific separators).

And yes, this increases resources for 20-30 strings more. Is this the problem?

@1ec5
Copy link
Member

1ec5 commented Sep 12, 2017

There are prefixed route numbers in most European countries in OpenStreetMap – 🇬🇧🇩🇪🇦🇹 and the E roads come to mind. But you’re right that many countries have just bare numbers like 123a in the ref tags. I agree that it would be nice to add something like “route” in front of such values.

@hdaymon hdaymon added the silver label Oct 6, 2017
@hdaymon hdaymon removed the silver label Jan 4, 2018
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