Locale: Deal with locale initialisation more safely
This commit is contained in:
@@ -34,8 +34,8 @@ import Configuration
|
|||||||
import Exceptions
|
import Exceptions
|
||||||
|
|
||||||
import locale
|
import locale
|
||||||
lang=locale.getdefaultlocale()[0][0:2]
|
(lang, charset) = locale.getdefaultlocale()
|
||||||
if lang=="en":
|
if lang = None or lang == "en":
|
||||||
def _(string): return string
|
def _(string): return string
|
||||||
else:
|
else:
|
||||||
import gettext
|
import gettext
|
||||||
|
|||||||
Reference in New Issue
Block a user