summaryrefslogtreecommitdiffstats
path: root/modules/translate.py
diff options
context:
space:
mode:
authorSean B. Palmer <sbp@aldebaran.local>2010-12-23 19:34:03 +0000
committerSean B. Palmer <sbp@aldebaran.local>2010-12-23 19:34:03 +0000
commit01cebd1ccc8e83dbbbe78d27ae1f4e14b206e5b7 (patch)
treea8298644ed9f9e5ef80c41f63fca8f13234e35cc /modules/translate.py
parent5ebe01386d46f0a3a50b2b02416d8e7ee222af7e (diff)
downloadbot-01cebd1ccc8e83dbbbe78d27ae1f4e14b206e5b7.tar.gz
bot-01cebd1ccc8e83dbbbe78d27ae1f4e14b206e5b7.tar.bz2
bot-01cebd1ccc8e83dbbbe78d27ae1f4e14b206e5b7.zip
HTTPS title support, and a minor encoding fix.
Diffstat (limited to 'modules/translate.py')
-rwxr-xr-xmodules/translate.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/translate.py b/modules/translate.py
index e637d01..d5ae41f 100755
--- a/modules/translate.py
+++ b/modules/translate.py
@@ -46,6 +46,8 @@ def tr(phenny, context):
if input != output:
msg = translate(phrase, input, output)
+ if isinstance(msg, str):
+ msg = msg.decode('utf-8')
if msg:
msg = web.decode(msg) # msg.replace('&#39;', "'")
msg = '"%s" (%s to %s, translate.google.com)' % (msg, input, output)