mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-05 16:13:41 +00:00
Fix UnicodeDecodeError from 'deluge-console --help' with other languages
This commit is contained in:
parent
eb309813ea
commit
28fc325db9
@ -73,9 +73,7 @@ try:
|
||||
locale.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||
if hasattr(locale, "textdomain"):
|
||||
locale.textdomain("deluge")
|
||||
gettext.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||
gettext.textdomain("deluge")
|
||||
gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||
gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n"), unicode=True)
|
||||
except Exception, e:
|
||||
from deluge.log import LOG as log
|
||||
log.error("Unable to initialize gettext/locale!")
|
||||
|
Loading…
x
Reference in New Issue
Block a user