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