Bug 247339 - [Patch] Routing in Marble gives xls:lang error message
Summary: [Patch] Routing in Marble gives xls:lang error message
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandriva RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: marble-bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-11 09:23 UTC by Karl Ove Hufthammer
Modified: 2010-08-13 22:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karl Ove Hufthammer 2010-08-11 09:23:31 UTC
Version:           unspecified (using KDE 4.5.0) 
OS:                Linux

When trying to use the routing feature in Marble, I get the following error message when clicking ‘Get Directions’:

  Sorry, a problem occurred when calculating the route.
  Try adjusting start and destination points.

When clicking ‘Show details’ in this dialogue, I get the following error message:

  Sorry, a problem occurred when calculating the route.
  Try adjusting start and destination points.

This is using the Norwegian Nynorsk (‘nn’) locale.

Reproducible: Always




OS: Linux (i686) release 2.6.33.5-desktop586-2mnb
Compiler: gcc
Comment 1 Dennis Nienhüser 2010-08-11 10:02:46 UTC
Sounds like OpenRouteService does not have translations for norwegian and reports an error. I'll try to reproduce it and see if I can have it fall back to english in that case.

As a workaround till then, try switching Marble's language to english (Help => Switch Application Language).
Comment 2 Karl Ove Hufthammer 2010-08-11 16:39:46 UTC
Yes, switching the UI language helped (I started Marble with ‘LC_ALL=C marble’).

I’m also a translator of KDE into Norwegian Nynorsk, and it would be nice if the language code(s) tried was localisable. For instance, for Norwegian Nynorsk as the UI language, the preferred language list would for example be ‘nn, no, nb, da, en-GB, en’. If ‘nn’ doesn’t work, fall back to ‘no’. If ‘no’ doesn’t work, fall back to ‘nb’, etc. (‘no’ should not really be used a language code, but some applications do use it, so it should be included.) Or the list could perhaps be taken from the locale settings, but then ’no’ would be excluded.

(The same is true for the Wikipedia support in Marble, BTW, where the list would be ‘nn.wikipedia.org, no.wikipedia.org, da.wikipedia.org, en.wikipedia.org. But here the locale settings can’t be used, as some Wikipedia sites use the country code, not the language code.)
Comment 3 Dennis Nienhüser 2010-08-11 23:01:13 UTC
Patch is in http://reviewboard.kde.org/r/4987/

I'm using "en" as the only fallback there. A more flexible approach needs more thoughts.

@Karl Ove: If you are willing to contribute translations to [1] then the fallback shouldn't be needed for Norwegian Nynorsk in the future.

[1] http://wiki.openstreetmap.org/wiki/OpenRouteService/Instructions
Comment 4 Dennis Nienhüser 2010-08-13 22:46:05 UTC
SVN commit 1163352 by nienhueser:

The language code to generate instructions for is taken from the system locale in Marble. ORS does not handle all locales and reports an error if it does not know one. Currently Marble informs the user about the problem with an error dialog. The patch changes this to catch the error early and generate a new request with english as the fallback language code. This way routes are retrieved, although not localized.
RB: 4987
BUG: 247339



 M  +32 -10    OrsRoutingProvider.cpp  
 M  +6 -0      OrsRoutingProvider.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1163352