mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-30 13:16:17 +00:00
Fix crash if translations are missing
This commit is contained in:
parent
188315735b
commit
ff8b5aca75
@ -912,8 +912,11 @@ def set_language(lang):
|
||||
set_env_variable('LANG', lang) # For OSX
|
||||
|
||||
translations_path = get_translations_path()
|
||||
ro = gettext.translation("deluge", localedir=translations_path, languages=[lang])
|
||||
ro.install()
|
||||
try:
|
||||
ro = gettext.translation("deluge", localedir=translations_path, languages=[lang])
|
||||
ro.install()
|
||||
except IOError, e:
|
||||
log.warn("IOError when loading translations: %s", e)
|
||||
|
||||
|
||||
# Initialize gettext
|
||||
|
Loading…
x
Reference in New Issue
Block a user