L10n.py: Make safer
This commit is contained in:
+2
-2
@@ -18,8 +18,8 @@
|
||||
import locale
|
||||
def pass_through(to_translate): return to_translate
|
||||
|
||||
lang=locale.getdefaultlocale()[0][0:2]
|
||||
if lang=="en":
|
||||
(lang, charset) = locale.getdefaultlocale()
|
||||
if lang==None or lang[:2]=="en":
|
||||
translation=pass_through
|
||||
else:
|
||||
import gettext
|
||||
|
||||
Reference in New Issue
Block a user