openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.11k stars 907 forks source link

OSRM routing directions displayed in English regardless of 'ru' setting in user profile or HTTP Accept-Language #1047

Closed d1g closed 8 years ago

d1g commented 8 years ago

Client-side issue but I'm not sure if this is right place to report this bug.

Case 1 (en user, ok):

  1. open account settings (current route /user/xxx/account, user-agnostic route here would be more useful btw)
  2. set 'Preferred Languages' to 'en'
  3. open http://www.openstreetmap.org/directions?engine=osrm_car&route=48.85715%2C2.33652%3B48.85652%2C2.33818
  4. "Directions" is in English. "Turn left onto" is also in English

Case 2 (fr user, ok):

  1. same
  2. set 'Langues préférées' to 'fr'
  3. same
  4. "Itinéraire" is in French. "Tourner à gauche sur" is also in French

Case 3 (ru user, bug):

  1. same
  2. set 'Предпочитаемые языки:' to 'ru'
  3. same
  4. "Маршрут" is in Russian. "Turn left onto" is in English (!), expected: "Примите влево на"

Link to OSRM query.

d1g commented 8 years ago

Also, setting preferred languages to 'RU', 'ru_RU' or 'ru_ru' results in 'en' page ('Directions', but not 'Маршрут'). Probably we want less error-prone input field for 'preferred languages' (multiselect)

tomhughes commented 8 years ago

Well do translations actually exist for those strings? If they don't we will fall back to english...

tomhughes commented 8 years ago

As I suspected there is no translation present for that string in our Russian locale.

See http://wiki.openstreetmap.org/wiki/Website_Internationalization#How_to_translate for more information on how to help out with translation.

Language matching follows normal HTTP rules, and there shouldn't normally be any need to edit that field at all as we capture it from the browser when you sign up.

d1g commented 8 years ago

no translation present for that string in our Russian locale.

@tomhughes, well but http://map.project-osrm.org/ was translated in Russian (and 25 languages in total). Wouldn't it be better to reuse strings from project-osrm?

Well do translations actually exist for those strings? no translation present for that string in our Russian locale.

Do you mean in source code or translation platform? "Turn left onto" was translated 7 days ago.

tomhughes commented 8 years ago

No, it can take a few weeks before translations are pushed back to openstreetmap and there hasn't been a sync for a about a month now, probably because people have been away over the summer.

d1g commented 8 years ago

and there hasn't been a sync for a about a month now, probably because people have been away over the summer

@tomhughes, does it mean that you are not the person responsible for this and we cannot update strings sooner? Is there anything we can do about it?

tomhughes commented 8 years ago

No, the TranslateWiki folks push the changes from their end.

d1g commented 8 years ago

@tomhughes, thanks for info! Probably it should be stated at http://wiki.openstreetmap.org/wiki/Website_Internationalization#How_to_translate