Reverse geo lookup - set button active and language

Stefan Fuchs sfuchs at gmx.de
Mon Oct 16 01:39:00 PDT 2017


Hello Lubomir,

Am 15.10.2017 um 21:32 schrieb Lubomir I. Ivanov:
>
>
>> During testing I also recognized 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

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?


>> 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...

Best regards
Stefan

-- 

Stefan Fuchs
E-Mail: sfuchs at gmx.de <mailto:sfuchs at gmx.de>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20171016/5404023b/attachment.html>


More information about the subsurface mailing list