German and croatian are added to language handler, message logs format has changed to partially fix #5

This commit is contained in:
Manuel Cortez 2015-03-16 19:24:27 -06:00
parent ca9f5b0c30
commit 85a7ffc8eb
3 changed files with 6 additions and 5 deletions

View File

@ -165,7 +165,7 @@ def setLanguage(lang):
trans=gettext.translation("twblue",fallback=True) trans=gettext.translation("twblue",fallback=True)
curLang="en" curLang="en"
trans.install(unicode=True) trans.install(unicode=True)
log.debug("Current language: %s" % (curLang,)) # log.debug(u"Current language: %s" % (curLang,))
# Install our pgettext function. # Install our pgettext function.
# __builtin__.__dict__["pgettext"] = makePgettext(trans) # __builtin__.__dict__["pgettext"] = makePgettext(trans)
@ -191,11 +191,13 @@ def langToWindowsLocale(lang):
languages = {"en": "eng", languages = {"en": "eng",
"ar": "ara", "ar": "ara",
"ca": "cat", "ca": "cat",
"de": "deu",
"es": "esp", "es": "esp",
"fi": "fin", "fi": "fin",
"fr": "fre_FRA", "fr": "fre_FRA",
"gl": "glc", "gl": "glc",
"eu": "euq", "eu": "euq",
"hr": "hrv",
"hu": "hun", "hu": "hun",
"it": "ita", "it": "ita",
"pl": "plk", "pl": "plk",

View File

@ -6,10 +6,10 @@ import sys
APP_LOG_FILE = 'debug.log' APP_LOG_FILE = 'debug.log'
ERROR_LOG_FILE = "error.log" ERROR_LOG_FILE = "error.log"
MESSAGE_FORMAT = u"%(asctime)s %(name)s %(levelname)s: %(message)s" MESSAGE_FORMAT = "%(asctime)s %(name)s %(levelname)s: %(message)s"
DATE_FORMAT = u"%b %d, %Y %H:%M:%S" DATE_FORMAT = u"%d/%m/%Y %H:%M:%S"
formatter = logging.Formatter(MESSAGE_FORMAT, datefmt=DATE_FORMAT) formatter = logging.Formatter(MESSAGE_FORMAT.decode("utf-8"), datefmt=DATE_FORMAT)
requests_log = logging.getLogger("requests") requests_log = logging.getLogger("requests")
requests_log.setLevel(logging.WARNING) requests_log.setLevel(logging.WARNING)

View File

@ -59,4 +59,3 @@ class URLStream(BaseStream):
flags = flags | self.flags_for(three_d=three_d, autofree=autofree, decode=decode) flags = flags | self.flags_for(three_d=three_d, autofree=autofree, decode=decode)
handle = bass_call(BASS_StreamCreateURL, url, offset, flags, self.downloadproc, user) handle = bass_call(BASS_StreamCreateURL, url, offset, flags, self.downloadproc, user)
super(URLStream, self).__init__(handle) super(URLStream, self).__init__(handle)