ask locale module to do the job of detecting LANG; this now works in Windows. thanks Stian for testing
This commit is contained in:
parent
9acbb49937
commit
c1c48d9210
|
@ -27,6 +27,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import tempfile
|
import tempfile
|
||||||
import logging
|
import logging
|
||||||
|
import locale
|
||||||
|
|
||||||
import config
|
import config
|
||||||
from contacts import Contacts
|
from contacts import Contacts
|
||||||
|
@ -74,11 +75,11 @@ try:
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
LANG = os.getenv('LANG') # en_US, fr_FR, el_GR etc..
|
LANG = locale.getdefaultlocale() # en_US, fr_FR, el_GR etc..
|
||||||
if LANG:
|
if LANG is None:
|
||||||
LANG = LANG[:2] # en, fr, el etc..
|
|
||||||
else:
|
|
||||||
LANG = 'en'
|
LANG = 'en'
|
||||||
|
else:
|
||||||
|
LANG = LANG[:2] # en, fr, el etc..
|
||||||
|
|
||||||
last_message_time = {} # list of time of the latest incomming message
|
last_message_time = {} # list of time of the latest incomming message
|
||||||
# {acct1: {jid1: time1, jid2: time2}, }
|
# {acct1: {jid1: time1, jid2: time2}, }
|
||||||
|
|
Loading…
Reference in New Issue