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 tempfile
|
||||
import logging
|
||||
import locale
|
||||
|
||||
import config
|
||||
from contacts import Contacts
|
||||
|
@ -74,11 +75,11 @@ try:
|
|||
except:
|
||||
pass
|
||||
|
||||
LANG = os.getenv('LANG') # en_US, fr_FR, el_GR etc..
|
||||
if LANG:
|
||||
LANG = LANG[:2] # en, fr, el etc..
|
||||
else:
|
||||
LANG = locale.getdefaultlocale() # en_US, fr_FR, el_GR etc..
|
||||
if LANG is None:
|
||||
LANG = 'en'
|
||||
else:
|
||||
LANG = LANG[:2] # en, fr, el etc..
|
||||
|
||||
last_message_time = {} # list of time of the latest incomming message
|
||||
# {acct1: {jid1: time1, jid2: time2}, }
|
||||
|
|
Loading…
Reference in New Issue