mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-30 21:26:02 +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
|
set_env_variable('LANG', lang) # For OSX
|
||||||
|
|
||||||
translations_path = get_translations_path()
|
translations_path = get_translations_path()
|
||||||
|
try:
|
||||||
ro = gettext.translation("deluge", localedir=translations_path, languages=[lang])
|
ro = gettext.translation("deluge", localedir=translations_path, languages=[lang])
|
||||||
ro.install()
|
ro.install()
|
||||||
|
except IOError, e:
|
||||||
|
log.warn("IOError when loading translations: %s", e)
|
||||||
|
|
||||||
|
|
||||||
# Initialize gettext
|
# Initialize gettext
|
||||||
|
Loading…
x
Reference in New Issue
Block a user