Google: Fix Python 3 compatibility of the @translate command.

This commit is contained in:
Valentin Lorentz 2013-02-01 17:12:03 +01:00
parent e45bce65e5
commit 21c17b8248

View File

@ -259,7 +259,7 @@ class Google(callbacks.PluginRegexp):
'?client=t&hl=en&sl=%s&tl=%s&multires=1'
'&otf=1&ssel=0&tsel=0&uptl=en&sc=1&text='
'%s' % (sourceLang, targetLang, text),
headers).read()
headers).read().decode('utf8')
while ',,' in result:
result = result.replace(',,', ',null,')