Fixing missing messages.json file (#3547)
This commit is contained in:
parent
ef59b6b650
commit
17c7ca239a
|
|
@ -23,11 +23,11 @@ def get_language_pack(locale):
|
|||
pack = ALL_LANGUAGE_PACKS.get(locale)
|
||||
if not pack:
|
||||
filename = DIR + '/{}/LC_MESSAGES/messages.json'.format(locale)
|
||||
with open(filename) as f:
|
||||
try:
|
||||
try:
|
||||
with open(filename) as f:
|
||||
pack = json.load(f)
|
||||
ALL_LANGUAGE_PACKS[locale] = pack
|
||||
except Exception:
|
||||
# Assuming english, client side falls back on english
|
||||
pass
|
||||
except Exception:
|
||||
# Assuming english, client side falls back on english
|
||||
pass
|
||||
return pack
|
||||
|
|
|
|||
Loading…
Reference in New Issue