Get twitter's supported languages for allowing filters by lang #102

This commit is contained in:
Manuel Cortez 2017-11-12 23:39:45 -06:00
parent 54cb099007
commit a5e1686af6
3 changed files with 7 additions and 8 deletions

View File

@ -15,4 +15,5 @@ copyright = u"Copyright (C) 2013-2017, Manuel cortéz."
description = unicode(name+" is an app designed to use Twitter simply and efficiently while using minimal system resources. This app provides access to most Twitter features.") description = unicode(name+" is an app designed to use Twitter simply and efficiently while using minimal system resources. This app provides access to most Twitter features.")
translators = [u"Manuel Cortéz (English)", u"Mohammed Al Shara, Hatoun Felemban (Arabic)", u"Francisco Torres (Catalan)", u"Manuel cortéz (Spanish)", u"Sukil Etxenike Arizaleta (Basque)", u"Jani Kinnunen (finnish)", u"Rémy Ruiz (French)", u"Juan Buño (Galician)", u"Steffen Schultz (German)", u"Zvonimir Stanečić (Croatian)", u"Robert Osztolykan (Hungarian)", u"Christian Leo Mameli (Italian)", u"Riku (Japanese)", u"Paweł Masarczyk (Polish)", u"Odenilton Júnior Santos (Portuguese)", u"Florian Ionașcu, Nicușor Untilă (Romanian)", u"Natalia Hedlund, Valeria Kuznetsova (Russian)", u"Aleksandar Đurić (Serbian)", u"Burak Yüksek (Turkish)"] translators = [u"Manuel Cortéz (English)", u"Mohammed Al Shara, Hatoun Felemban (Arabic)", u"Francisco Torres (Catalan)", u"Manuel cortéz (Spanish)", u"Sukil Etxenike Arizaleta (Basque)", u"Jani Kinnunen (finnish)", u"Rémy Ruiz (French)", u"Juan Buño (Galician)", u"Steffen Schultz (German)", u"Zvonimir Stanečić (Croatian)", u"Robert Osztolykan (Hungarian)", u"Christian Leo Mameli (Italian)", u"Riku (Japanese)", u"Paweł Masarczyk (Polish)", u"Odenilton Júnior Santos (Portuguese)", u"Florian Ionașcu, Nicușor Untilă (Romanian)", u"Natalia Hedlund, Valeria Kuznetsova (Russian)", u"Aleksandar Đurić (Serbian)", u"Burak Yüksek (Turkish)"]
url = u"https://twblue.es" url = u"https://twblue.es"
report_bugs_url = "https://github.com/manuelcortez/twblue/issues" report_bugs_url = "https://github.com/manuelcortez/twblue/issues"
supported_languages = []

View File

@ -1,7 +0,0 @@
# -*- coding: utf-8 -*-
from wxUI.dialogs import filters
class filterController(object):
def __init__(self):
self.dialog = filters.filterDialog()
self.dialog.get_response()

View File

@ -277,6 +277,11 @@ class Session(object):
self.db["utc_offset"] = f["time_zone"]["utc_offset"] self.db["utc_offset"] = f["time_zone"]["utc_offset"]
except KeyError: except KeyError:
self.db["utc_offset"] = -time.timezone self.db["utc_offset"] = -time.timezone
# Get twitter's supported languages and save them in a global variable
#so we won't call to this method once per session.
if len(application.supported_languages) == 0:
application.supported_languages = self.twitter.twitter.get_supported_languages()
print application.supported_languages
self.get_lists() self.get_lists()
self.get_muted_users() self.get_muted_users()
self.settings.write() self.settings.write()