mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 20:53:13 -06:00
Merge pull request #251 from Menelion/geocode-i18n
Localize geocoding to the current language
This commit is contained in:
commit
cd596a6ad6
@ -40,6 +40,7 @@ import logging
|
||||
import webbrowser
|
||||
from mysc import localization
|
||||
import os
|
||||
import languageHandler
|
||||
|
||||
log = logging.getLogger("mainController")
|
||||
|
||||
@ -952,7 +953,7 @@ class Controller(object):
|
||||
if tweet["coordinates"] != None:
|
||||
x = tweet["coordinates"]["coordinates"][0]
|
||||
y = tweet["coordinates"]["coordinates"][1]
|
||||
address = geocoder.reverse_geocode(y, x)
|
||||
address = geocoder.reverse_geocode(y, x, language = languageHandler.curLang)
|
||||
if event == None: output.speak(address[0].__str__().decode("utf-8"))
|
||||
else: self.view.show_address(address[0].__str__().decode("utf-8"))
|
||||
else:
|
||||
@ -972,7 +973,7 @@ class Controller(object):
|
||||
if tweet["coordinates"] != None:
|
||||
x = tweet["coordinates"]["coordinates"][0]
|
||||
y = tweet["coordinates"]["coordinates"][1]
|
||||
address = geocoder.reverse_geocode(y, x)
|
||||
address = geocoder.reverse_geocode(y, x, language = languageHandler.curLang)
|
||||
dlg = commonMessageDialogs.view_geodata(address[0].__str__())
|
||||
else:
|
||||
output.speak(_(u"There are no coordinates in this tweet"))
|
||||
|
Loading…
Reference in New Issue
Block a user