Talk:Sample driving instructions

From OpenStreetMap Wiki
Jump to: navigation, search

more stings

Before randomly translating it into every language, we should think about a complete list of strings that are required and tune those. From my head, the suggestion misses:

First of all: This was not random but the texts required for OpenRouteService and Traveling Salesman and are thus a good start. After all..you have to start somewhere. --MarcusWolschon 17:11, 25 February 2009 (UTC)
  • Drive straight on (% = main road)
   |
   |
 %%%---
   %
   %
  • when driving on the main road and there's nothing going to happen for the next 20 km the software could say this, e.g. "Dem <123 km> Straßenverlauf folgen" (or "follow main road for <123 km>"). This way the driver knows nothing is going to happen and that the navi isn't broken.
What about "Follow road (name)!" and "Follow road (name) for (distance)!"? --MarcusWolschon 17:11, 25 February 2009 (UTC)
I just added these two. --MarcusWolschon 09:16, 26 February 2009 (UTC)
  • Turn left then *immediately* turn right (% main road; * where you are and want to go to)
       *
       |
       |
   %%%%%%%%%%%%%%%%
           |
           |
           *
Any ideas how we could make combining 2 directions more generic? --MarcusWolschon 17:11, 25 February 2009 (UTC)

"Please mind the speed limit"

  • Please mind the speed limit
Nice idea. How to name it? Better include the limit? --MarcusWolschon 17:11, 25 February 2009 (UTC)
warning/maxspeed or similar, generic, derived from the OSM tags directly. --Stefanb 05:19, 28 February 2009 (UTC)

"Mind the tram"

  • Mind the tram (if crossing tram lines)
Contra --MarcusWolschon 17:11, 25 February 2009 (UTC)
Reasoning? It's not like because the translation is available all implementations have to use it. Especially people from one horse towns might like this feature because they're not used to having to mind the tram. Xeen 17:52, 1 March 2009 (UTC)

"You missed..."

  • "You missed the turn" / "You were supposed to take the exit 200 meters back, rerouting..." :) --Stefanb 05:19, 28 February 2009 (UTC)
I'd guess people would find that annoying - there's no need to mock them when it's the job of the navigator to a) give clear instructions b) work around user mistakes. Plain "Rerouting, please wait"? Alv 10:03, 28 February 2009 (UTC)
I second that, but would argue that no message is needed at all. Route calculation takes a few seconds only anyway, so better be quiet and just announce the next instructions once calculated. Xeen 17:52, 1 March 2009 (UTC)
On many devices and in many cases few seconds, that true. On some devices and/or with routes in the 400+ km range the calculation could take long enough to make the user wonder why's nothing happening. Alv 09:24, 2 March 2009 (UTC)

distances

  • Distance "field" missing: e.g. Turn right in 5 km / 500 m / now (whereas now probably needs to be a special one)
I think this will always be a number followed by a unit. We can however translate the units. (en: kph de: km/h) --MarcusWolschon 17:11, 25 February 2009 (UTC)
Some users might prefer (less exact) time units "soon", "in some minutes", "keep on A1 for 2 hours" --Stefanb 05:19, 28 February 2009 (UTC)
All the existing units I've used have those in the order "In 500 meters turn ..." and finally just "turn ...". Less exact time units sounds like good alternative, though. Alv 10:03, 28 February 2009 (UTC)
Good idea. I'll add it right away (and implement support for speaking these in my software in a few days.)

signposting

  • On highways, when they split (i.e. left two lanes goto Erbach and rightmost one to Michelstadt): "<A 123> Richtung <Michelstadt> nehmen, dazu <rechts> halten". No idea how that'd sound in English (it says: Follow A 123 to Michelstadt. To do so, drive on the right side)
how about "Keep right on A 123 to Michelstadt."? --Stefanb 05:19, 28 February 2009 (UTC)
  • Same when entering highways: "in 500 m rechts auf A 123 Richtung Köln abbiegen" (in 500 m turn right onto A 123 to Köln)
difficult. As we still have no signposting-data in OSM at all, I guess this will have to wait. --MarcusWolschon 17:11, 25 February 2009 (UTC)
I don't see why we should postpone this just because there isn't data yet. Using the same argument this whole translation stuff would have to wait. Also, I don't see why it's impossible to determine for software where a highway leads – while this mightn't be always correct, it probably works most of the time (i.e. look for the next large city the highway passes). But adding signpost data sounds useful. Xeen 17:58, 1 March 2009 (UTC)
Note: "this whole translation stuff" wouldn't have to wait. I implemented an improved SimpleRouteDescriber -plugin for Traveling Salesman last weekend that uses these translations. --MarcusWolschon 08:14, 2 March 2009 (UTC)
I was wrong. We have at least a proposed relation "Designation_Signs". Tagwatch shows this not to be in use but that may change. I added some usefull texts and german translations for the case of (motorway-)exits. --MarcusWolschon 09:28, 2 March 2009 (UTC)

street-names

  • Special sentences when saying the street name are required, too (e.g. Turn right to Alexanderstraße)
ref and name are probably interchangeable: "Keep right on A 123 to Michelstadt." could as well be written as "Keep right on Alexanderstraße to Michelstadt." in most languages. Use whatever is available (or even combine them into "Alexanderstraße [A 123]")--Stefanb 05:19, 28 February 2009 (UTC)
There is no way you can gess the gender of the street-name, so it has to be "turn right to (name)" and "Links abbiegen auf (name)" like everyone else does. --MarcusWolschon 17:11, 25 February 2009 (UTC)
gramatical cases could also be considered (wikipedia:List_of_grammatical_cases), and adjust the street name accordingly (Slovenian: robotic "zavijte na 'Celovška cesta'" -> natural "zavijte na Celovško cesto" (Accusative case). Also tough one. :) --Stefanb 05:19, 28 February 2009 (UTC)

shorter/more precise sentences

  • Some sentences are way too long, e.g. the roundabout ones. We can certainly cut <please> here, clean instructions are preferable over blabla anyway. In German this works well with "Im Kreisverkehr, die 2. Abfahrt nehmen". No idea about English though.
sound good. --MarcusWolschon 17:11, 25 February 2009 (UTC)
  • some attention should be put into putting the most important information first: "Please, turn left into Alexanderstraße now" -> "Now turn left into Alexanderstraße" if language allows it without sounding silly.--Stefanb 05:19, 28 February 2009 (UTC)
good thinking. --MarcusWolschon 14:05, 28 February 2009 (UTC)

multiple plurals

It seems that there are languages with more then one plural forms and complex expressions when to apply them.

The aproach ngettext() uses is to have an expression alowing the operators ">,<,?:,==,>=,<=,%,+,-,&&,||" as well as braces and constants.


(excerpt from an email I got:)

Here is the plural formula for russian and some examples:

nplurals=3;
plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 ||
n%100>=20) ? 1 : 2);\n"

As you can see, there are two different plural forms + 1 for singular:

msgid "%i player connected"
msgid_plural "%i players connected"
msgstr[0] "%i игрок присоединился"
msgstr[1] "%i игрока присоединились"
msgstr[2] "%i игроков присоединились"

I guess we can do that via time/hour/plural[0-2] and time/hour/plural[formula]. My question is, what selection of operators can be easily implemented in languages like C, C++ and Java?--MarcusWolschon 17:00, 25 February 2009 (UTC)

I added a proposal how to collect translations with multiple plural forms here in the wiki. It is compatible with gettext(). What do you guys think? --MarcusWolschon 10:01, 4 March 2009 (UTC)
Seems fine, except that
  • a /singular translation isn't necesarry in that case, as that is already covered with gettext plural formulas for every language
  • formula is the same for whole language, so it doesn't need to be defined for each phrase.
I wrote Slovenian translation with plural formula to play with. --Stefanb 17:27, 6 March 2009 (UTC)
Indeed you can use the foruma-aproach to cover thr singular case as well but in most languages people need not concern themself with this formula at all if we keep the singular case. There are people not as used to boolean math as us software developers. --MarcusWolschon 13:20, 7 March 2009 (UTC)

other programs

The only way to get useful translations is to make a list of all possible phrases in english (and preferably a program taht uses those!) then use launchpad (or something similar) to do the actual translations. Translating without a program which uses those translations, it would be very hard to test the outcome to make sure it sounds sane in every language.

Navit is already being translated there, so that can serve as a (imperfect) pool of possible phrases: https://translations.launchpad.net/navit/trunk/+pots/navit/

and some specific driving instruction phrases including: road, turn, meter (4 plural forms in Slovenian!), soon, roundabout ...

--Stefanb 18:14, 25 February 2009 (UTC)

You can use Traveling Salesman too. It has interchangable plugins for driving directions so it`s easy to test even different ways to do them. I can easily write an ant-task to generate property-files from these pages and I planned on adding a driving-direction -plugin to use them anyway (that`s one of the reasons why I started this page. I have use for this kind of information.).
The first link provides some nice translations that we may use as a starting-point. Navit indeed has an impressive list of translations. You may find them easier to access all in one place via SVN.
I tried some of your lower links to launchpad.net but there seems to be nothing there. All I get is "There are no messages that match this filtering.".
I do not think your statement that using lauchpad is "the only way to get useful translations". Please try to be more open and constructive. --MarcusWolschon 19:43, 25 February 2009 (UTC)
I said "launchpad (or something similar)" with main criteria being that it supports various plural forms and is widely accessible to translators into various languages. You need wide variety of people to cover as many languages as possible. Many of those will not be developers to jump hoops that some developer tools might impose (gettext, svn, building test program with their translation...). Wiki could work (widely accessible), but plural forms will mess up the easy to parse syntax (you'd basically have to reinvent plural expressions) and more importantly translators would have to learn that new syntax. --Stefanb 07:30, 26 February 2009 (UTC)
I am currently testing commons-gettext to see if how well gettext works for Java and C#. It that works fine I have no problem using the plural-syntax of gettext.
I suppose collecting the texts here in the wiki is the one place both developers and translators can actually find then.
If my tests work out, I may post an ant-script to generate .po and .properties -files from these pages.
For testing it may work to write an IRouteDescriber that reads this wiki-page at startup. You could test translations with just one click on a link (TS can run via Java webstart.) and selecting the right plugin in preferences+selecting the city to import from a list (both need to be done only once).
Do you think that would be simple enough? We should have ample supply of gpx-traces in OSM to test-run almost anything. --MarcusWolschon 09:10, 26 February 2009 (UTC)
I added a lot of the translations from navit into this wiki. --MarcusWolschon 14:29, 27 February 2009 (UTC)

Added these translations to Traveling Salesman

I improved the SimpleRouteDescriber in the latest SVN-version of Traveling Salesman to use these translations as a properties-file. You have to manually edit/add the .properties-files at the moment but you can test these translations. I also noted a first bug here in that you cannot use "meter" (or de_DE "Meter") but "meters" (de_DE "Metern") to get "200 meters". --MarcusWolschon 16:30, 28 February 2009 (UTC)

time/?

While translating these I was unsure of the context for the strings labeled as time/day/singular, time/day/plural etc; the translation for these would be different in different use cases. Are they to be used as in "in 5 minutes turn right" or "Route length is approx 5 minutes"? Alv 10:43, 4 March 2009 (UTC)

Seems to be "length approx 5 minute(s)" as used in openrouteservice.org, but could someone confirm this? Alv 10:57, 4 March 2009 (UTC)
The usual context would be the time you still have to drive to reach a destination. Some of the translations of these fields are copied from ORS --MarcusWolschon 11:37, 4 March 2009 (UTC)

Translating SI unit abreviations seems pointless

Translations like this (from Spanish):

units/kph "km/h"

units/ms "m/s"

units/km "km"

seem entirely pointless. Those abreviations don't need translating - they are global standards.

What may be useful is translations that tell you how to pronounce them:

units/kph "kilometers per hour"

units/ms "meters per second"

units/km "kilometers"

or:

units/kph "kilómetros por hora"

units/ms "metros por segundo"

units/km "kilómetros"

etc.

Not really, in Dutch, "km/h" usually becomes "km/u" since "uur" is Dutch for "hour" (although "km/h" is also used sometimes, but usually only in scientific contexts or by people who've had some science in their studies). Most people will just use "km/u" though. The online version of the most famous Dutch dictionary for example has an entry for km/u but not for km/h. --Eimai 15:07, 6 March 2009 (UTC)
While in english you write "kph" you write "km/h" in germany. It dos not hurt to have these when we already have "meter". --MarcusWolschon 13:18, 7 March 2009 (UTC)

Ordinal numbers vs. cardinal numbers

Not only exit one, exit two is needed, also first exit, second exit. Please devide the translations for "numbers" to "ordinal numbers" (1st, 2nd) and "cardinal numbers" (1, 2). --Lulu-Ann 14:24, 31 March 2009 (UTC)