mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 20:14:51 +00:00
Fix crash if translations are missing
This commit is contained in:
parent
188315735b
commit
ff8b5aca75
1 changed files with 5 additions and 2 deletions
|
@ -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…
Add table
Reference in a new issue