Le 16/10/2017 à 11:11, Dirk Hohndel a écrit :

On Oct 16, 2017, at 4:39 AM, Stefan Fuchs <sfu...@gmx.de 
<mailto:sfu...@gmx.de>> wrote:
During testing I also recognizeds.th <http://s.th/>. else around this "Reverse GPS 
lookup"
to retrieve the country name from the GPS position:
Windows:
Function works in general but returns the country name in English language
(while I run Subsurface in German).
I'm really surprised because I thought this already worked for me returning
German country names.
that's a separate issue.

core/divesitehelpers.cpp
ReverseGeoLookupThread::run()

has supported languages for a while but i have only seen this in english
if you have started getting the lack of translations just now it could
be an issue with the 3rd party providers.
I currently try to fix this. Maybe the syntax of the provider changed:
http://www.geonames.org/export/JSON-webservices.html

:-(

Breaking APIs of web services... not nice

It seems to be now "lang=de" what we need and currently we pass 
"language=de_DE".
Changing the "language" to "lang" is a no-brainer but how can I teach the 
uiLanguage() function to return the short language string? Or shall I simply truncate it?

Yes, the first two letters are the language, then you get a dash or underscore, 
then the country.
Some languages do not have the country modifier at all.

Be careful, it seems that some languages are 3 letters: nds_DE (=low german),  
mai (=Maithili), maybe more?


Guillaume


Linux:
This function is still grayed out after moving the marker. This may be
linked to the general issue of moving the marker. If I copy&paste
coordinates then the button gets active and returns again English names like
under Windows.

the reverse-lookup button being grayed out for new dive sites, is also
a separate issue.
i can confirm that.
I think I easily fixed this. Will send a PR...


Thanks

/D


_______________________________________________
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

_______________________________________________
subsurface mailing list
subsurface@subsurface-divelog.org
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to