Deluge community plugin fix

jbeez

Dabbler
Joined
Feb 9, 2015
Messages
48
This was annoying me, and im not sure who maintains this plugin but you get an error on startup, heres the fix(es).

For the end user
iocage console into your deluge jail as root
Code:
service deluge_web stop
sed -i '' -e "s/\=\'ngettext\'/\=\[\'ngettext\'\]/" /usr/local/lib/python3.8/site-packages/deluge/i18n/util.py
service deluge_web start



For the maintainer, create a new file /usr/local/etc/deluge_changeset_d6c96d.patch

Code:
--- a/deluge/i18n/util.py
+++ b/deluge/i18n/util.py
@@ -115,5 +115,5 @@
         kwargs = {} if not deluge.common.PY2 else {'unicode': True}

-        gettext.install(I18N_DOMAIN, translations_path, names='ngettext', **kwargs)
+        gettext.install(I18N_DOMAIN, translations_path, names=['ngettext'], **kwargs)
         builtins.__dict__['_n'] = builtins.__dict__['ngettext']


alter your post_install.sh file to include this line:
patch -F 0 /usr/local/lib/python3.8/site-packages/deluge/i18n/util.py /usr/local/etc/deluge_changeset_d6c96d.patch

Source: https://dev.deluge-torrent.org/changeset/d6c96d629183e8bab


Hope this helps!

p.s. made pull requests here: https://github.com/jsegaert/iocage-plugin-deluge-pip not sure if this is the official source for that but it sure looks like it.
 
Last edited:
Top