Project-OSRM / osrm-text-instructions

Text instructions from OSRM route responses
BSD 2-Clause "Simplified" License
87 stars 61 forks source link

Some maneuver types rely on default modifier #240

Open 1ec5 opened 6 years ago

1ec5 commented 6 years ago

The continue, end of road, fork, merge, and new name maneuver types have no subkey left or right, so (for example) a fork to the left ends up relying on the default subkey. This presents a problem for languages such as Finnish, in which the word for “left” or “right” varies according to context.

Fixing this issue will add a number of strings for each language to translate. Ideally, we’d use a more flexible translation file format, but for now we can add the strings anyways. Languages that don’t need these extra strings can use translation memory to minimize work.

/cc @akikoskinen @yuryleb @danpaz

yuryleb commented 6 years ago

The little step in good direction IMHO. Actually I'd like even to stop using modifier keyword at all to have completed phrases for each maneuver type with names/destinations substitution only. Perhaps this increases total number of phrases but makes all them much more easily translatable than now - all they will have 'finished' context with no dependencies to other phrases/words (I mean modifier values) those could require other words order or different words at all.

For example, now Russian phrases should use 'generic' Двигайтесь verb (Go) with modifier keyword but actually it's better to use other verbs depending on modifier value (Поверните for turns and Развернитесь for u-turn) and even split two-words modifiers like sharp left or slight left and place the verb between them (currently Russian modifier strings have no two words values as should be to avoid this problem).