bzr revid: olt@tinyerp.com-20090212100536-n19xn0kk6t258bxh
This commit is contained in:
Olivier Laurent
2009-02-12 11:05:36 +01:00
+2 -2
View File
@@ -59,7 +59,7 @@ class GettextAlias(object):
def __call__(self, source):
frame = inspect.stack()[1][0]
cr = frame.f_locals.get('cr')
lang = frame.f_locals.get('context', {}).get('lang', False)
lang = (frame.f_locals.get('context') or {}).get('lang', False)
if not (lang and cr):
return source
@@ -527,7 +527,7 @@ def trans_load_data(db_name, fileobj, fileformat, lang, strict=False, lang_name=
fail = True
for ln in get_locales(lang):
try:
locale.setlocale(locale.LC_ALL, ln)
locale.setlocale(locale.LC_ALL, str(ln))
fail = False
break
except locale.Error: