Updated some translations; basic proxy support (needs testing)

This commit is contained in:
Manuel Cortez 2015-04-20 17:49:07 -05:00
parent be0253815f
commit 2880638241
30 changed files with 13792 additions and 12832 deletions

View File

@ -59,3 +59,9 @@ get_more_items = string(default="alt+win+pageup")
reverse_geocode = string(default="control+win+g") reverse_geocode = string(default="control+win+g")
view_reverse_geocode = string(default="control+win+shift+g") view_reverse_geocode = string(default="control+win+shift+g")
get_trending_topics = string(default="control+win+t") get_trending_topics = string(default="control+win+t")
[proxy]
server = string(default="")
port = string(default="")
user = string(default="")
password = string(default="")

View File

@ -5,8 +5,8 @@ if snapshot == False:
version = "0.80" version = "0.80"
update_url = 'http://twblue.es/updates/twblue_ngen.json' update_url = 'http://twblue.es/updates/twblue_ngen.json'
else: else:
version = "8" version = "9"
update_url = 'http://twblue.es/updates/snap.json' update_url = 'http://twblue.es/updates/snapshots_ngen.json'
author = u"Manuel Cortéz" author = u"Manuel Cortéz"
authorEmail = "manuel@manuelcortez.net" authorEmail = "manuel@manuelcortez.net"
copyright = u"copyright (C) 2013-2015, Manuel cortéz" copyright = u"copyright (C) 2013-2015, Manuel cortéz"

View File

@ -20,6 +20,7 @@ class globalSettingsController(object):
self.dialog = configuration.configurationDialog() self.dialog = configuration.configurationDialog()
self.create_config() self.create_config()
self.needs_restart = False self.needs_restart = False
self.is_started = True
def create_config(self): def create_config(self):
self.langs = languageHandler.getAvailableLanguages() self.langs = languageHandler.getAvailableLanguages()
@ -36,6 +37,11 @@ class globalSettingsController(object):
self.dialog.set_value("general", "use_invisible_shorcuts", config.app["app-settings"]["use_invisible_keyboard_shorcuts"]) self.dialog.set_value("general", "use_invisible_shorcuts", config.app["app-settings"]["use_invisible_keyboard_shorcuts"])
self.dialog.set_value("general", "disable_sapi5", config.app["app-settings"]["voice_enabled"]) self.dialog.set_value("general", "disable_sapi5", config.app["app-settings"]["voice_enabled"])
self.dialog.set_value("general", "hide_gui", config.app["app-settings"]["hide_gui"]) self.dialog.set_value("general", "hide_gui", config.app["app-settings"]["hide_gui"])
self.dialog.create_proxy()
self.dialog.set_value("proxy", "server", config.app["proxy"]["server"])
self.dialog.set_value("proxy", "port", config.app["proxy"]["port"])
self.dialog.set_value("proxy", "user", config.app["proxy"]["user"])
self.dialog.set_value("proxy", "password", config.app["proxy"]["password"])
self.dialog.realize() self.dialog.realize()
self.response = self.dialog.get_response() self.response = self.dialog.get_response()
@ -52,6 +58,13 @@ class globalSettingsController(object):
config.app["app-settings"]["ask_at_exit"] = self.dialog.get_value("general", "ask_at_exit") config.app["app-settings"]["ask_at_exit"] = self.dialog.get_value("general", "ask_at_exit")
config.app["app-settings"]["play_ready_sound"] = self.dialog.get_value("general", "play_ready_sound") config.app["app-settings"]["play_ready_sound"] = self.dialog.get_value("general", "play_ready_sound")
config.app["app-settings"]["speak_ready_msg"] = self.dialog.get_value("general", "speak_ready_msg") config.app["app-settings"]["speak_ready_msg"] = self.dialog.get_value("general", "speak_ready_msg")
if config.app["proxy"]["server"] != self.dialog.get_value("proxy", "server") or config.app["proxy"]["port"] != self.dialog.get_value("proxy", "port") or config.app["proxy"]["user"] != self.dialog.get_value("proxy", "user") or config.app["proxy"]["password"] != self.dialog.get_value("proxy", "password"):
if self.is_started == True:
self.needs_restart = True
config.app["proxy"]["server"] = self.dialog.get_value("proxy", "server")
config.app["proxy"]["port"] = self.dialog.get_value("proxy", "port")
config.app["proxy"]["user"] = self.dialog.get_value("proxy", "user")
config.app["proxy"]["password"] = self.dialog.get_value("proxy", "password")
config.app.write() config.app.write()
class accountSettingsController(globalSettingsController): class accountSettingsController(globalSettingsController):

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: TW Blue 0.50\n" "Project-Id-Version: TW Blue 0.50\n"
"POT-Creation-Date: 2014-12-10 23:20+Hora estándar central (México)\n" "POT-Creation-Date: 2014-12-10 23:20+Hora estándar central (México)\n"
"PO-Revision-Date: 2014-12-11 15:57+0100\n" "PO-Revision-Date: 2015-01-03 20:32+0300\n"
"Last-Translator: José Manuel Delicado Alcolea <jmdaweb@hotmail.com>\n" "Last-Translator: José Manuel Delicado Alcolea <jmdaweb@hotmail.com>\n"
"Language-Team: Mohammed Al Shara <mohammed@atexplorer.com>\n" "Language-Team: Mohammed Al Shara <mohammed@atexplorer.com>\n"
"Language: ar\n" "Language: ar\n"
@ -187,7 +187,7 @@ msgstr "تم تحديث مفضلات شخص ما"
#: ../src\extra\SoundsTutorial\gui.py:19 #: ../src\extra\SoundsTutorial\gui.py:19
msgid "The tweet has coordinates to determine its location" msgid "The tweet has coordinates to determine its location"
msgstr "" msgstr "يوجد في هذه التغريدة معلومات لتحديد الموقع"
#: ../src\extra\SoundsTutorial\gui.py:20 #: ../src\extra\SoundsTutorial\gui.py:20
msgid "There are no more tweets to read" msgid "There are no more tweets to read"
@ -332,10 +332,12 @@ msgid ""
"Are you sure you want to delete this user from the database? This user will " "Are you sure you want to delete this user from the database? This user will "
"not appear on the autocomplete results anymore." "not appear on the autocomplete results anymore."
msgstr "" msgstr ""
"هل أنت متأكد من رغبتك في حذف هذا المستخدم من قاعدة البيانات؟ لن يظهر "
"المستخدم في قائمة التعبءة التلقائية بعد هذا."
#: ../src\extra\autocompletionUsers\manage.py:38 #: ../src\extra\autocompletionUsers\manage.py:38
msgid "Confirm" msgid "Confirm"
msgstr "" msgstr "تأكيد"
#: ../src\extra\autocompletionUsers\settings.py:24 #: ../src\extra\autocompletionUsers\settings.py:24
msgid "" msgid ""
@ -347,35 +349,35 @@ msgstr ""
#: ../src\extra\autocompletionUsers\wx_manage.py:7 #: ../src\extra\autocompletionUsers\wx_manage.py:7
msgid "Manage Autocomplete users database" msgid "Manage Autocomplete users database"
msgstr "" msgstr "إدارة قاعدة بيانات التعبئة التلقائية"
#: ../src\extra\autocompletionUsers\wx_manage.py:10 #: ../src\extra\autocompletionUsers\wx_manage.py:10
msgid "Editing TWBlue users database" msgid "Editing TWBlue users database"
msgstr "" msgstr "يتم تحرير قاعدة بيانات المستخديم للبرنامج"
#: ../src\extra\autocompletionUsers\wx_manage.py:11 #: ../src\extra\autocompletionUsers\wx_manage.py:11
msgid "Name" msgid "Name"
msgstr "" msgstr "الإسم"
#: ../src\extra\autocompletionUsers\wx_manage.py:11 #: ../src\extra\autocompletionUsers\wx_manage.py:11
msgid "Username" msgid "Username"
msgstr "" msgstr "إسم المستخدم"
#: ../src\extra\autocompletionUsers\wx_manage.py:14 #: ../src\extra\autocompletionUsers\wx_manage.py:14
msgid "Add user" msgid "Add user"
msgstr "" msgstr "إضف مستخدم"
#: ../src\extra\autocompletionUsers\wx_manage.py:15 #: ../src\extra\autocompletionUsers\wx_manage.py:15
msgid "Remove user" msgid "Remove user"
msgstr "" msgstr "إحذف مستخدم"
#: ../src\extra\autocompletionUsers\wx_manage.py:36 #: ../src\extra\autocompletionUsers\wx_manage.py:36
msgid "Add user to database" msgid "Add user to database"
msgstr "" msgstr "إضف المستخدم إلى قاعدة البيانات"
#: ../src\extra\autocompletionUsers\wx_manage.py:36 #: ../src\extra\autocompletionUsers\wx_manage.py:36
msgid "Twitter username" msgid "Twitter username"
msgstr "" msgstr "إسم مستخدم تويتر"
#: ../src\extra\autocompletionUsers\wx_manage.py:42 #: ../src\extra\autocompletionUsers\wx_manage.py:42
#: ../src\gui\dialogs\configuration.py:248 ../src\gui\main.py:234 #: ../src\gui\dialogs\configuration.py:248 ../src\gui\main.py:234
@ -402,7 +404,7 @@ msgstr "إضف مستخدمون من صفحة الأصدقاء"
#: ../src\extra\autocompletionUsers\wx_settings.py:13 #: ../src\extra\autocompletionUsers\wx_settings.py:13
msgid "See the users list" msgid "See the users list"
msgstr "" msgstr "إعرض قائمة المستخدمين"
#: ../src\extra\autocompletionUsers\wx_settings.py:25 #: ../src\extra\autocompletionUsers\wx_settings.py:25
msgid "Done" msgid "Done"
@ -1013,11 +1015,11 @@ msgstr "&إظهر المستخدمين"
#: ../src\gui\buffers\menus.py:126 #: ../src\gui\buffers\menus.py:126
msgid "&Tweet about this trend" msgid "&Tweet about this trend"
msgstr "" msgstr "&التغريد حول هذا الموضوع"
#: ../src\gui\buffers\menus.py:129 #: ../src\gui\buffers\menus.py:129
msgid "&Show item" msgid "&Show item"
msgstr "" msgstr "&إعرض العنصر"
#: ../src\gui\buffers\panels.py:28 #: ../src\gui\buffers\panels.py:28
msgid "Announce" msgid "Announce"
@ -1070,6 +1072,7 @@ msgstr "إسأل قبل الخروج من البرنامج؟"
#: ../src\gui\dialogs\configuration.py:58 #: ../src\gui\dialogs\configuration.py:58
msgid "Use invisible interface's keyboard shorcuts on the GUI" msgid "Use invisible interface's keyboard shorcuts on the GUI"
msgstr "" msgstr ""
"إستخدم مفاتيح الإختصار الخاصة بالواجهة المخفية في واجهة التطبيق الظاهرة؟"
#: ../src\gui\dialogs\configuration.py:61 #: ../src\gui\dialogs\configuration.py:61
msgid "Relative times" msgid "Relative times"
@ -1323,7 +1326,7 @@ msgstr "إبلاغ برسائل غير مرغوب بها"
#: ../src\gui\dialogs\follow.py:52 #: ../src\gui\dialogs\follow.py:52
msgid "Ignore tweets from this client" msgid "Ignore tweets from this client"
msgstr "" msgstr "تجاهل التغريدات من هذا التطبيق"
#: ../src\gui\dialogs\follow.py:64 ../src\gui\dialogs\search.py:40 #: ../src\gui\dialogs\follow.py:64 ../src\gui\dialogs\search.py:40
#: ../src\gui\dialogs\trending.py:50 ../src\gui\dialogs\utils.py:39 #: ../src\gui\dialogs\trending.py:50 ../src\gui\dialogs\utils.py:39
@ -1341,7 +1344,7 @@ msgstr "لقد قمت بإلغاء كتم %s"
#: ../src\gui\dialogs\follow.py:142 #: ../src\gui\dialogs\follow.py:142
msgid "You can't ignore direct messages" msgid "You can't ignore direct messages"
msgstr "" msgstr "لا يمكن تجاهل الرسائل الخاصة"
#: ../src\gui\dialogs\lists.py:36 #: ../src\gui\dialogs\lists.py:36
msgid "Lists manager" msgid "Lists manager"
@ -1530,7 +1533,7 @@ msgstr "المرسل إليه"
#: ../src\gui\dialogs\message.py:318 #: ../src\gui\dialogs\message.py:318
msgid "Men&tion all" msgid "Men&tion all"
msgstr "" msgstr "ذكر الجميع"
#: ../src\gui\dialogs\message.py:345 #: ../src\gui\dialogs\message.py:345
msgid "Tweet - %i characters " msgid "Tweet - %i characters "
@ -1694,7 +1697,7 @@ msgstr "البحث"
#: ../src\gui\main.py:74 #: ../src\gui\main.py:74
msgid "View &trending topics" msgid "View &trending topics"
msgstr "" msgstr "إعرض المواضيع المتداولة"
#: ../src\gui\main.py:76 #: ../src\gui\main.py:76
msgid "&Lists manager" msgid "&Lists manager"
@ -2052,7 +2055,7 @@ msgstr "فحص التحديثات الجديدة"
#: ../src\issueReporter\gui.py:30 #: ../src\issueReporter\gui.py:30
msgid "Translation" msgid "Translation"
msgstr "" msgstr "الترجمة"
#: ../src\issueReporter\gui.py:31 #: ../src\issueReporter\gui.py:31
msgid "always" msgid "always"
@ -2060,7 +2063,7 @@ msgstr "دائما"
#: ../src\issueReporter\gui.py:31 #: ../src\issueReporter\gui.py:31
msgid "have not tried" msgid "have not tried"
msgstr "" msgstr "لم تحاول"
#: ../src\issueReporter\gui.py:31 #: ../src\issueReporter\gui.py:31
msgid "random" msgid "random"
@ -2331,15 +2334,15 @@ msgstr "يحمل العناصر السابقة في أي صفحة"
#: ../src\keystrokeEditor\constants.py:45 #: ../src\keystrokeEditor\constants.py:45
msgid "Get location of any tweet" msgid "Get location of any tweet"
msgstr "" msgstr "إحصل على موقع أي تغريدة"
#: ../src\keystrokeEditor\constants.py:46 #: ../src\keystrokeEditor\constants.py:46
msgid "Displays the tweet's location in a dialog" msgid "Displays the tweet's location in a dialog"
msgstr "" msgstr "يعرض موقع التغريدة في صندوق حوار"
#: ../src\keystrokeEditor\constants.py:47 #: ../src\keystrokeEditor\constants.py:47
msgid "Creates a buffer for displaying trends for a desired place" msgid "Creates a buffer for displaying trends for a desired place"
msgstr "" msgstr "ينشء صفحة لعرض التغريدات المتداولة حول المكان المرغوب به"
#: ../src\keystrokeEditor\gui.py:10 #: ../src\keystrokeEditor\gui.py:10
msgid "Keystroke editor" msgid "Keystroke editor"

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: TW Blue 0.44\n" "Project-Id-Version: TW Blue 0.44\n"
"POT-Creation-Date: 2014-12-10 23:20+Hora estándar central (México)\n" "POT-Creation-Date: 2014-12-10 23:20+Hora estándar central (México)\n"
"PO-Revision-Date: 2014-12-21 07:01-0600\n" "PO-Revision-Date: 2014-12-10 23:36-0600\n"
"Last-Translator: Manuel Cortéz <manuel@manuelcortez.net>\n" "Last-Translator: Manuel Cortéz <manuel@manuelcortez.net>\n"
"Language-Team: Manuel Cortez <info@twblue.com.mx>\n" "Language-Team: Manuel Cortez <info@twblue.com.mx>\n"
"Language: es\n" "Language: es\n"
@ -2655,7 +2655,7 @@ msgstr "feb"
#: ../src\twitter\compose.py:87 #: ../src\twitter\compose.py:87
msgid "mar" msgid "mar"
msgstr "mar" msgstr "marAmárico"
#: ../src\twitter\compose.py:88 #: ../src\twitter\compose.py:88
msgid "apr" msgid "apr"
@ -2663,7 +2663,7 @@ msgstr "abr"
#: ../src\twitter\compose.py:89 #: ../src\twitter\compose.py:89
msgid "may" msgid "may"
msgstr "may" msgstr "mayMayo"
#: ../src\twitter\compose.py:90 #: ../src\twitter\compose.py:90
msgid "jun" msgid "jun"

Binary file not shown.

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@ -2,7 +2,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: TW Blue 0.50\n" "Project-Id-Version: TW Blue 0.50\n"
"POT-Creation-Date: 2014-12-10 23:20+Hora estándar central (México)\n" "POT-Creation-Date: 2014-12-10 23:20+Hora estándar central (México)\n"
"PO-Revision-Date: 2014-12-12 17:53+0100\n" "PO-Revision-Date: 2015-01-28 11:22+0100\n"
"Last-Translator: Chris Leo Mameli <llajta2012@gmail.com>\n" "Last-Translator: Chris Leo Mameli <llajta2012@gmail.com>\n"
"Language-Team: Manuel Cortez <info@twblue.com.mx>\n" "Language-Team: Manuel Cortez <info@twblue.com.mx>\n"
"Language: it\n" "Language: it\n"
@ -1867,7 +1867,7 @@ msgstr "Ricerca"
#: ../src\gui\main.py:305 #: ../src\gui\main.py:305
msgid "Timelines" msgid "Timelines"
msgstr "Linea temporale" msgstr "Linee temporali di..."
#: ../src\gui\main.py:308 ../src\gui\main.py:747 #: ../src\gui\main.py:308 ../src\gui\main.py:747
msgid "Timeline for %s" msgid "Timeline for %s"

Binary file not shown.

View File

@ -6,7 +6,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: Tw Blue 0.50\n" "Project-Id-Version: Tw Blue 0.50\n"
"POT-Creation-Date: 2014-12-10 23:20+Hora estándar central (México)\n" "POT-Creation-Date: 2014-12-10 23:20+Hora estándar central (México)\n"
"PO-Revision-Date: 2014-12-11 19:52+0100\n" "PO-Revision-Date: 2014-12-17 22:07+0100\n"
"Last-Translator: Paweł Masarczyk <pawelmasarczyk@gmail.com>\n" "Last-Translator: Paweł Masarczyk <pawelmasarczyk@gmail.com>\n"
"Language-Team: Paweł Masarczyk <pawelmasarczyk@gmail.com>\n" "Language-Team: Paweł Masarczyk <pawelmasarczyk@gmail.com>\n"
"Language: pl\n" "Language: pl\n"
@ -1727,7 +1727,7 @@ msgstr "Wybierz link"
#: ../src\gui\main.py:66 #: ../src\gui\main.py:66
msgid "S&witch account" msgid "S&witch account"
msgstr "S&z kontem" msgstr "&Przełącz konto"
#: ../src\gui\main.py:68 #: ../src\gui\main.py:68
msgid "&Update profile" msgid "&Update profile"

Binary file not shown.

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import config
from requests.auth import HTTPProxyAuth
from twitter import compose, utils from twitter import compose, utils
from twython import TwythonStreamer from twython import TwythonStreamer
from pubsub import pub from pubsub import pub
@ -8,7 +10,14 @@ log = original_logger.getLogger("TimelinesStream")
class timelinesStreamer(TwythonStreamer): class timelinesStreamer(TwythonStreamer):
def __init__(self, app_key, app_secret, oauth_token, oauth_token_secret, timeout=300, retry_count=None, retry_in=10, client_args=None, handlers=None, chunk_size=1, session=None): def __init__(self, app_key, app_secret, oauth_token, oauth_token_secret, timeout=300, retry_count=None, retry_in=10, client_args=None, handlers=None, chunk_size=1, session=None):
self.session = session self.session = session
super(timelinesStreamer, self).__init__(app_key, app_secret, oauth_token, oauth_token_secret, timeout=60, retry_count=None, retry_in=180, client_args=None, handlers=None, chunk_size=1) args = None
if config.app["proxy"]["server"] != "" and config.app["proxy"]["port"] != "":
args = {"proxies": {"http": "http://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"]),
"https": "https://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"])}}
if config.app["proxy"]["user"] != "" and config.app["proxy"]["password"] != "":
auth = HTTPProxyAuth(config.app["proxy"]["user"], config.app["proxy"]["password"])
args["auth"] = auth
super(timelinesStreamer, self).__init__(app_key, app_secret, oauth_token, oauth_token_secret, timeout=60, retry_count=None, retry_in=180, client_args=args, handlers=None, chunk_size=1)
def on_error(self, status_code, data): def on_error(self, status_code, data):
log.debug("%s: %s" % (status_code, data)) log.debug("%s: %s" % (status_code, data))

View File

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import config
from requests.auth import HTTPProxyAuth
from twitter import utils from twitter import utils
from twython import TwythonStreamer from twython import TwythonStreamer
from pubsub import pub from pubsub import pub
@ -6,8 +8,15 @@ import logging as original_logger
log = original_logger.getLogger("MainStream") log = original_logger.getLogger("MainStream")
class streamer(TwythonStreamer): class streamer(TwythonStreamer):
def __init__(self, app_key, app_secret, oauth_token, oauth_token_secret, sessionObject, *args, **kwargs): def __init__(self, app_key, app_secret, oauth_token, oauth_token_secret, sessionObject, *a, **kw):
super(streamer, self).__init__(app_key, app_secret, oauth_token, oauth_token_secret, *args, **kwargs) args = None
if config.app["proxy"]["server"] != "" and config.app["proxy"]["port"] != "":
args = {"proxies": {"http": "http://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"]),
"https": "https://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"])}}
if config.app["proxy"]["user"] != "" and config.app["proxy"]["password"] != "":
auth = HTTPProxyAuth(config.app["proxy"]["user"], config.app["proxy"]["password"])
args["auth"] = auth
super(streamer, self).__init__(app_key, app_secret, oauth_token, oauth_token_secret, client_args=args, *a, **kw)
self.session = sessionObject self.session = sessionObject
self.muted_users = self.session.db["muted_users"] self.muted_users = self.session.db["muted_users"]
# self.blocked_users = [] # self.blocked_users = []

View File

@ -1,4 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from requests.auth import HTTPProxyAuth
import config
import random import random
import BaseHTTPServer import BaseHTTPServer
import webbrowser import webbrowser
@ -6,10 +8,17 @@ from twython import Twython, TwythonError
from keys import keyring from keys import keyring
import authorisationHandler import authorisationHandler
class twitter(object): class twitter(object):
def login(self, user_key, user_secret, verify_credentials): def login(self, user_key, user_secret, verify_credentials):
if config.app["proxy"]["server"] != "" and config.app["proxy"]["port"] != "":
args = {"proxies": {"http": "http://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"]),
"https": "https://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"])}}
if config.app["proxy"]["user"] != "" and config.app["proxy"]["password"] != "":
auth = HTTPProxyAuth(config.app["proxy"]["user"], config.app["proxy"]["password"])
args["auth"] = auth
self.twitter = Twython(keyring.get("api_key"), keyring.get("api_secret"), user_key, user_secret, client_args=args)
else:
self.twitter = Twython(keyring.get("api_key"), keyring.get("api_secret"), user_key, user_secret) self.twitter = Twython(keyring.get("api_key"), keyring.get("api_secret"), user_key, user_secret)
if verify_credentials == True: if verify_credentials == True:
self.credentials = self.twitter.verify_credentials() self.credentials = self.twitter.verify_credentials()
@ -18,6 +27,14 @@ class twitter(object):
authorisationHandler.logged = False authorisationHandler.logged = False
port = random.randint(30000, 66000) port = random.randint(30000, 66000)
httpd = BaseHTTPServer.HTTPServer(('127.0.0.1', port), authorisationHandler.handler) httpd = BaseHTTPServer.HTTPServer(('127.0.0.1', port), authorisationHandler.handler)
if config.app["proxy"]["server"] != "" and config.app["proxy"]["port"] != "":
args = {"proxies": {"http": "http://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"]),
"https": "https://{0}:{1}".format(config.app["proxy"]["server"], config.app["proxy"]["port"])}}
if config.app["proxy"]["user"] != "" and config.app["proxy"]["password"] != "":
auth = HTTPProxyAuth(config.app["proxy"]["user"], config.app["proxy"]["password"])
args["auth"] = auth
twitter = Twython(keyring.get("api_key"), keyring.get("api_secret"), auth_endpoint='authorize', client_args=args)
else:
twitter = Twython(keyring.get("api_key"), keyring.get("api_secret"), auth_endpoint='authorize') twitter = Twython(keyring.get("api_key"), keyring.get("api_secret"), auth_endpoint='authorize')
auth = twitter.get_authentication_tokens("http://127.0.0.1:{0}".format(port,)) auth = twitter.get_authentication_tokens("http://127.0.0.1:{0}".format(port,))
webbrowser.open_new_tab(auth['auth_url']) webbrowser.open_new_tab(auth['auth_url'])

View File

@ -3,6 +3,7 @@ import baseDialog
import wx import wx
import logging as original_logger import logging as original_logger
import application import application
class general(wx.Panel, baseDialog.BaseWXDialog): class general(wx.Panel, baseDialog.BaseWXDialog):
def __init__(self, parent, languages): def __init__(self, parent, languages):
super(general, self).__init__(parent) super(general, self).__init__(parent)
@ -28,6 +29,37 @@ class general(wx.Panel, baseDialog.BaseWXDialog):
sizer.Add(self.hide_gui, 0, wx.ALL, 5) sizer.Add(self.hide_gui, 0, wx.ALL, 5)
self.SetSizer(sizer) self.SetSizer(sizer)
class proxy(wx.Panel, baseDialog.BaseWXDialog):
def __init__(self, parent):
super(proxy, self).__init__(parent)
sizer = wx.BoxSizer(wx.VERTICAL)
lbl = wx.StaticText(self, wx.NewId(), _(u"Proxy server: "))
self.server = wx.TextCtrl(self, -1)
serverBox = wx.BoxSizer(wx.HORIZONTAL)
serverBox.Add(lbl, 0, wx.ALL, 5)
serverBox.Add(self.server, 0, wx.ALL, 5)
sizer.Add(serverBox, 0, wx.ALL, 5)
lbl = wx.StaticText(self, wx.NewId(), _(u"Port: "))
self.port = wx.TextCtrl(self, wx.NewId())
portBox = wx.BoxSizer(wx.HORIZONTAL)
portBox.Add(lbl, 0, wx.ALL, 5)
portBox.Add(self.port, 0, wx.ALL, 5)
sizer.Add(portBox, 0, wx.ALL, 5)
lbl = wx.StaticText(self, wx.NewId(), _(u"User: "))
self.user = wx.TextCtrl(self, wx.NewId())
userBox = wx.BoxSizer(wx.HORIZONTAL)
userBox.Add(lbl, 0, wx.ALL, 5)
userBox.Add(self.user, 0, wx.ALL, 5)
sizer.Add(userBox, 0, wx.ALL, 5)
lbl = wx.StaticText(self, wx.NewId(), _(u"Password: "))
self.password = wx.TextCtrl(self, wx.NewId(), style=wx.TE_PASSWORD)
passwordBox = wx.BoxSizer(wx.HORIZONTAL)
passwordBox.Add(lbl, 0, wx.ALL, 5)
passwordBox.Add(self.password, 0, wx.ALL, 5)
sizer.Add(serverBox, 0, wx.ALL, 5)
self.SetSizer(sizer)
class generalAccount(wx.Panel, baseDialog.BaseWXDialog): class generalAccount(wx.Panel, baseDialog.BaseWXDialog):
def __init__(self, parent): def __init__(self, parent):
super(generalAccount, self).__init__(parent) super(generalAccount, self).__init__(parent)
@ -206,6 +238,10 @@ class configurationDialog(baseDialog.BaseWXDialog):
self.notebook.AddPage(self.general, _(u"General")) self.notebook.AddPage(self.general, _(u"General"))
self.general.SetFocus() self.general.SetFocus()
def create_proxy(self):
self.proxy = proxy(self.notebook)
self.notebook.AddPage(self.proxy, _(u"Proxy"))
def create_general_account(self): def create_general_account(self):
self.general = generalAccount(self.notebook) self.general = generalAccount(self.notebook)
self.notebook.AddPage(self.general, _(u"General")) self.notebook.AddPage(self.general, _(u"General"))

View File

@ -5,7 +5,7 @@
msgid "" msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 2015-03-25 04:43+Hora estándar central (México)\n" "POT-Creation-Date: 2015-04-15 20:24+Hora de verano central (México)\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -36,9 +36,9 @@ msgstr ""
#: ../doc\strings.py:118 ../doc\strings.py:124 ../doc\strings.py:127 #: ../doc\strings.py:118 ../doc\strings.py:124 ../doc\strings.py:127
#: ../doc\strings.py:130 ../doc\strings.py:133 ../doc\strings.py:136 #: ../doc\strings.py:130 ../doc\strings.py:133 ../doc\strings.py:136
#: ../doc\strings.py:148 ../doc\strings.py:151 ../doc\strings.py:160 #: ../doc\strings.py:148 ../doc\strings.py:151 ../doc\strings.py:160
#: ../doc\strings.py:163 ../doc\strings.py:166 ../doc\strings.py:180 #: ../doc\strings.py:163 ../doc\strings.py:166 ../doc\strings.py:181
#: ../doc\strings.py:183 ../doc\strings.py:190 ../doc\strings.py:193 #: ../doc\strings.py:184 ../doc\strings.py:191 ../doc\strings.py:194
#: ../doc\strings.py:204 ../doc\strings.py:207 #: ../doc\strings.py:205 ../doc\strings.py:208
msgid "" msgid ""
"\n" "\n"
msgstr "" msgstr ""
@ -52,7 +52,7 @@ msgid "## Warning!"
msgstr "" msgstr ""
#: ../doc\strings.py:16 #: ../doc\strings.py:16
msgid "You're reading documentation produced for a program still in development. The object of this manual is explaining some details of the operation of the program. Bear in mind that as the software is in the process of active development, parts of this document may change in the near future, so it is advisable to keep an eye on it from time to time to avoid missing too much out." msgid "You're reading documentation produced for a program still in development. The object of this manual is to explain some details of the operation of the program. Bear in mind that as the software is in the process of active development, parts of this document may change in the near future, so it is advisable to keep an eye on it from time to time to avoid missing too much out."
msgstr "" msgstr ""
#: ../doc\strings.py:19 #: ../doc\strings.py:19
@ -140,7 +140,7 @@ msgid "If all went well, the application will start playing sounds, indicating y
msgstr "" msgstr ""
#: ../doc\strings.py:66 #: ../doc\strings.py:66
msgid "When the process is finished,the program will play another sound, and the screen reader will say \"ready\"." msgid "When the process is finished, the program will play another sound, and the screen reader will say \"ready\"."
msgstr "" msgstr ""
#: ../doc\strings.py:69 #: ../doc\strings.py:69
@ -152,7 +152,7 @@ msgid "The easiest way to describe the graphical user interface of TWBlue is say
msgstr "" msgstr ""
#: ../doc\strings.py:75 #: ../doc\strings.py:75
msgid "In the tree view are inserted buffers which are lists to manage the processed data. When you configure a new session on TWBlue and start it, your account is the root of the tree view. Inside of it are created many buffers. Every one of them may contain some of the items which TWBlue works with: Tweets, direct messages, users, trends or events. According to the buffer you were, you will be able to make different actions with these items." msgid "In the tree view are inserted buffers which are lists to manage the processed data. When you configure a new session on TWBlue and start it, your account is the root of the tree view. Inside of it many buffers are created. Each one of them may contain some of the items which TWBlue works with: Tweets, direct messages, users, trends or events. According to the buffer you were, you will be able to make different actions with these items."
msgstr "" msgstr ""
#: ../doc\strings.py:78 #: ../doc\strings.py:78
@ -212,7 +212,7 @@ msgid "* Trending Topics: a trend buffer shows the top ten most used terms in a
msgstr "" msgstr ""
#: ../doc\strings.py:96 #: ../doc\strings.py:96
msgid "If there's a URL on a tweet TW Blue will try to open it when you press enter on it. If there are several, it will show you a list with all of them so you choose the one you want. If you're on the followers or friends buffer, the enter key will show you additional information on them." msgid "If there's a URL on a tweet, TW Blue will try to open it when you press enter on it. If there are several, it will show you a list with all of them so you choose the one you want. If you're on the followers or friends buffer, the enter key will show you additional information about them."
msgstr "" msgstr ""
#: ../doc\strings.py:99 #: ../doc\strings.py:99
@ -220,7 +220,7 @@ msgid "If you press control-enter, TW Blue will try to play the audio from the f
msgstr "" msgstr ""
#: ../doc\strings.py:102 #: ../doc\strings.py:102
msgid "Also, you will hear a sound when you see any tweet containing geographical information. You can see someone's location by selecting the option \"view address\" from the tweet menu on the menu bar." msgid "You will also hear a sound when you see any tweet containing geographical information. You can see someone's location by selecting the option \"view address\" from the tweet menu on the menu bar."
msgstr "" msgstr ""
#: ../doc\strings.py:105 #: ../doc\strings.py:105
@ -275,6 +275,10 @@ msgstr ""
msgid "##### Application menu" msgid "##### Application menu"
msgstr "" msgstr ""
#: ../doc\strings.py:138
msgid "* Session manager: Opens a window with all the sessions configured in TWBlue, where you can add new sessions or delete the ones you've already created."
msgstr ""
#: ../doc\strings.py:139 #: ../doc\strings.py:139
msgid "* Update profile: opens a dialogue box where you can update your information on Twitter: name, location, URL and bio. If you have already set this up the fields will be prefilled with the existing information. Also, you can upload a photo to your profile." msgid "* Update profile: opens a dialogue box where you can update your information on Twitter: name, location, URL and bio. If you have already set this up the fields will be prefilled with the existing information. Also, you can upload a photo to your profile."
msgstr "" msgstr ""
@ -304,7 +308,7 @@ msgid "* Edit keystrokes: It opens a dialog where you can see and re edit the in
msgstr "" msgstr ""
#: ../doc\strings.py:147 #: ../doc\strings.py:147
msgid "* Quit: asks whether you want to exit the program. If the answer is yes, it shuts the application down. Unless you wish TWBlue asks you for confirmation before exiting, uncheck the checkbox from the preferences dialogue." msgid "* Quit: asks whether you want to exit the program. If the answer is yes, it shuts the application down. If you wish TWBlue not to ask you for confirmation before exiting, uncheck the checkbox from the preferences dialogue."
msgstr "" msgstr ""
#: ../doc\strings.py:150 #: ../doc\strings.py:150
@ -324,7 +328,7 @@ msgid "* Remove tweet from favourites: removes the tweet from your favourites, b
msgstr "" msgstr ""
#: ../doc\strings.py:156 #: ../doc\strings.py:156
msgid "* Show tweet: opens up a dialogue box where you can read the tweet, direct message, friend or follower under focus. You can read the text with the cursors. It's the same dialogue box used to write tweets on." msgid "* Show tweet: opens up a dialogue box where you can read the tweet, direct message, friend or follower under focus. You can read the text with the arrow keys. It's the same dialogue box used to write tweets on."
msgstr "" msgstr ""
#: ../doc\strings.py:157 #: ../doc\strings.py:157
@ -348,7 +352,7 @@ msgid "* Follow: Follows a user. This means you'll see his/her tweets on your ma
msgstr "" msgstr ""
#: ../doc\strings.py:169 #: ../doc\strings.py:169
msgid "* Unfollow: it does not stop following a user, which causes you nor being able to see his/her tweets on your main timeline neither interchanging direct messages." msgid "* Unfollow: Stops following a user, which causes you not being able to see his/her tweets on your main timeline neither interchanging direct messages."
msgstr "" msgstr ""
#: ../doc\strings.py:170 #: ../doc\strings.py:170
@ -363,92 +367,100 @@ msgstr ""
msgid "* Report as spam: It suggests twitter this user is performing prohibited practices on the social network." msgid "* Report as spam: It suggests twitter this user is performing prohibited practices on the social network."
msgstr "" msgstr ""
#: ../doc\strings.py:173
msgid "* Block: Blocks a user. This forces the user to unfollow you ."
msgstr ""
#: ../doc\strings.py:174 #: ../doc\strings.py:174
msgid "* Direct message: same action as the button." msgid "* Unblock: Stops blocking a user."
msgstr "" msgstr ""
#: ../doc\strings.py:175 #: ../doc\strings.py:175
msgid "* Direct message: same action as the button."
msgstr ""
#: ../doc\strings.py:176
msgid "* Add to List: In order to see someone's tweets in one or more of your lists, you must add them first. This option will open a dialog where you can select the user you wish to add. Next, you will be asked to select the list you wish to add them to. Afterwards, the list will contain a new member and their tweets will show up there." msgid "* Add to List: In order to see someone's tweets in one or more of your lists, you must add them first. This option will open a dialog where you can select the user you wish to add. Next, you will be asked to select the list you wish to add them to. Afterwards, the list will contain a new member and their tweets will show up there."
msgstr "" msgstr ""
#: ../doc\strings.py:177 #: ../doc\strings.py:178
msgid "* View user profile: opens up a dialogue box to choose the user whose profile you want to browse." msgid "* View user profile: opens up a dialogue box to choose the user whose profile you want to browse."
msgstr "" msgstr ""
#: ../doc\strings.py:178 #: ../doc\strings.py:179
msgid "* Timeline: opens up a dialogue box to choose whose user you want a timeline for. Create it by pressing enter. If you try it with a user that has no tweets, the program will fail. If you try creating an already existing timeline the program will warn you and will not create it again." msgid "* Timeline: Lets you open a user's timeline by choosing the user in a dialog box. It is created when you press enter. If you try it with a user that has no tweets, the program will fail. If you try creating an already existing timeline the program will warn you and will not create it again."
msgstr "" msgstr ""
#: ../doc\strings.py:179 #: ../doc\strings.py:180
msgid "* View favourites: Opens a buffer where you can see what tweets have been favorited by a particular user." msgid "* View favourites: Opens a buffer where you can see what tweets have been favorited by a particular user."
msgstr "" msgstr ""
#: ../doc\strings.py:182 #: ../doc\strings.py:183
msgid "##### Buffer menu" msgid "##### Buffer menu"
msgstr "" msgstr ""
#: ../doc\strings.py:186 #: ../doc\strings.py:187
msgid "* Mute buffer: Mutes notifications of a particular buffer so you will not hear when new tweets arrive." msgid "* Mute buffer: Mutes notifications of a particular buffer so you will not hear when new tweets arrive."
msgstr "" msgstr ""
#: ../doc\strings.py:187 #: ../doc\strings.py:188
msgid "* autoread tweets for this buffer: When enabled, the screen reader or SAPI 5 (if enabled) will read the text of incoming tweets. Please note that this could get rather chatty if there are a lot of incoming tweets." msgid "* autoread tweets for this buffer: When enabled, the screen reader or SAPI 5 (if enabled) will read the text of incoming tweets. Please note that this could get rather chatty if there are a lot of incoming tweets."
msgstr "" msgstr ""
#: ../doc\strings.py:188 #: ../doc\strings.py:189
msgid "* Clear buffer: Deletes all items from the buffer." msgid "* Clear buffer: Deletes all items from the buffer."
msgstr "" msgstr ""
#: ../doc\strings.py:189 #: ../doc\strings.py:190
msgid "* Remove buffer: dismiss the list you're on." msgid "* Remove buffer: dismiss the list you're on."
msgstr "" msgstr ""
#: ../doc\strings.py:192 #: ../doc\strings.py:193
msgid "##### Help menu" msgid "##### Help menu"
msgstr "" msgstr ""
#: ../doc\strings.py:195 #: ../doc\strings.py:196
msgid "* Documentation: opens up this file, where you can read some useful program concepts." msgid "* Documentation: opens up this file, where you can read some useful program concepts."
msgstr "" msgstr ""
#: ../doc\strings.py:196 #: ../doc\strings.py:197
msgid "* What's new in this version?: opens up a document with the list of changes from the current version down to the first." msgid "* What's new in this version?: opens up a document with the list of changes from the current version down to the first."
msgstr "" msgstr ""
#: ../doc\strings.py:197
msgid "* Check for updates: every time you open the program it automatically checks for new versions. If there are, it will ask you if you want to download it. If you accept, it will do so, after which it will install it and ask you to let it restart itself, which it does automatically. This item checks for new updates without having to restart the application."
msgstr ""
#: ../doc\strings.py:198 #: ../doc\strings.py:198
msgid "* Report a bug: opens up a dialogue box to report a bug by filling a couple of fields. Pressing enter will send the report. If the operation doesn't succeed the program will show a warning." msgid "* Check for updates: every time you open the program it automatically checks for new versions. If there is any, it will ask you if you want to download it. If you accept, it will do so, after which it will install it and ask you to let it restart itself, which it does automatically. This item checks for new updates without having to restart the application."
msgstr "" msgstr ""
#: ../doc\strings.py:199 #: ../doc\strings.py:199
msgid "* TW Blue's website: visit our [home page](http://twblue.es) where you can find all relevant information and downloads for TW Blue and become a part of the community." msgid "* Report a bug: opens up a dialogue box to report a bug by filling a couple of fields. Pressing enter will send the report. If the operation doesn't succeed the program will show a warning."
msgstr "" msgstr ""
#: ../doc\strings.py:200 #: ../doc\strings.py:200
msgid "* About TW Blue: shows the credits of the program." msgid "* TW Blue's website: visit our [home page](http://twblue.es) where you can find all relevant information and downloads for TW Blue and become a part of the community."
msgstr "" msgstr ""
#: ../doc\strings.py:201 #: ../doc\strings.py:201
msgid "* About TW Blue: shows the credits of the program."
msgstr ""
#: ../doc\strings.py:202
msgid "" msgid ""
"...\n" "...\n"
msgstr "" msgstr ""
#: ../doc\strings.py:203 #: ../doc\strings.py:204
msgid "## Contact" msgid "## Contact"
msgstr "" msgstr ""
#: ../doc\strings.py:206 #: ../doc\strings.py:207
msgid "If what's explained in this document is not enough, if you want to collaborate in some other way, or if you simply want to get in touch with the application developer, follow the Twitter account [@tw_blue2](https://twitter.com/tw_blue2) or [@manuelcortez00.](https://twitter.com/manuelcortez00) You can also visit [our website](http://twblue.com.mx)" msgid "If what's explained in this document is not enough, if you want to collaborate in some other way, or if you simply want to get in touch with the application developer, follow the Twitter account [@tw_blue2](https://twitter.com/tw_blue2) or [@manuelcortez00.](https://twitter.com/manuelcortez00) You can also visit [our website](http://twblue.com.mx)"
msgstr "" msgstr ""
#: ../doc\strings.py:209 #: ../doc\strings.py:210
msgid "---" msgid "---"
msgstr "" msgstr ""
#: ../doc\strings.py:210 #: ../doc\strings.py:211
msgid "Copyright \302\251 2013-2015. Manuel Cort\303\251z" msgid "Copyright \302\251 2013-2015. Manuel Cort\303\251z"
msgstr "" msgstr ""

File diff suppressed because it is too large Load Diff