fix: skip if file is not found
This commit is contained in:
parent
a77093d6f6
commit
1f83fd8847
1 changed files with 2 additions and 0 deletions
|
|
@ -284,6 +284,8 @@ def get_translations_from_mo(lang, app):
|
|||
|
||||
locale_dir = get_locale_dir()
|
||||
mo_file = gettext.find(app, locale_dir, (lang,))
|
||||
if not mo_file:
|
||||
return translations
|
||||
with open(mo_file, "rb") as f:
|
||||
catalog = read_mo(f)
|
||||
for m in catalog:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue