L10n.py: Make safer
This commit is contained in:
parent
02aa42a987
commit
692cd4e6e4
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user