mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-02 22:48:40 +00:00
Fix UnicodeDecodeError from 'deluge-console --help' with other languages
This commit is contained in:
parent
eb309813ea
commit
28fc325db9
1 changed files with 1 additions and 3 deletions
|
@ -73,9 +73,7 @@ try:
|
||||||
locale.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
locale.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
||||||
if hasattr(locale, "textdomain"):
|
if hasattr(locale, "textdomain"):
|
||||||
locale.textdomain("deluge")
|
locale.textdomain("deluge")
|
||||||
gettext.bindtextdomain("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n"), unicode=True)
|
||||||
gettext.textdomain("deluge")
|
|
||||||
gettext.install("deluge", pkg_resources.resource_filename("deluge", "i18n"))
|
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
from deluge.log import LOG as log
|
from deluge.log import LOG as log
|
||||||
log.error("Unable to initialize gettext/locale!")
|
log.error("Unable to initialize gettext/locale!")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue