Skip to content
Snippets Groups Projects
Commit d4d8d826 authored by Olivier Laurent's avatar Olivier Laurent
Browse files

[MERGE]

bzr revid: olt@tinyerp.com-20090212100536-n19xn0kk6t258bxh
parents 41177863 4aa00ae6
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment