[OSM-dev] Improve the Driving Instructions ... - more flexible grammar

marcus.wolschon at googlemail.com marcus.wolschon at googlemail.com
Thu Mar 5 08:56:30 GMT 2009


On Thu, 05 Mar 2009 10:06:43 +0200, Eddy Petrișor
<eddy.petrisor at gmail.com> wrote:
> Pascal Neis a scris:
>> Hi,
>> to improve the driving instructions on openrouteservice.org I put
>> all my languages/translations with a template in the Wiki.
>> See http://wiki.openstreetmap.org/wiki/OpenRouteService/Instructions
>> 
>> atm there are the following translations:
>> # de_DE - German
>> # de_DE_dialects - German dialects
>> # en_EN - English
>> # nl_NL - Dutch
>> # fr_FR - French
>> # es_ES - Spanish
>> # it_IT - Italien
>> # se_SE - Swedish
>> 
>> Feel free to modify or to create new proposals for any language you 
>> liked ...
> 
> Your proposal assumes that every language of the earth follows the same
> topic and word order as the English language which is incorrect.
> 
> Your attempt is doomed to fail if you'll try to constraint the world
> into your wolrd view.

Hello Eddy,

the aproach on
http://wiki.openstreetmap.org/wiki/Sample_driving_instructions
with MessageFormats (phrases with markers where to insert
text-constants) seems to work fine and is what gettext and
the i18n-aproach in Java are using.

We have run into issues with the posibility of languages having
multiple plural forms and adopted the solution gettext() is using.
One simple expression to return the index of the plural form to use
based on the number.

In the case of finish
http://wiki.openstreetmap.org/wiki/Talk:Sample_driving_instructions/fi_FI
we encountered the issue that
a) spoken and written instructions may differ
 (ignored for now)
b) numbers/counts may differ based on what they refer to.
 (worked around for this one case but may come up again)

Marcus




More information about the dev mailing list