Adding log information to events

This commit is contained in:
2015-01-18 17:19:39 -06:00
parent bd1b0b5e32
commit fd70bedc05
28 changed files with 204 additions and 41 deletions

View File

@@ -6,6 +6,9 @@ import locale
import gettext
import paths
import platform
import logging
log = logging.getLogger("languageHandler")
# A fix for the mac locales
#if platform.system() == 'Darwin':
@@ -116,6 +119,7 @@ def makePgettext(translations):
return pgettext
def setLanguage(lang):
log.debug("Setting language for: %s" % (lang,))
system = platform.system()
global curLang
try:
@@ -161,6 +165,7 @@ def setLanguage(lang):
trans=gettext.translation("twblue",fallback=True)
curLang="en"
trans.install(unicode=True)
log.debug("Current language: %s" % (curLang,))
# Install our pgettext function.
# __builtin__.__dict__["pgettext"] = makePgettext(trans)