mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Google: Handle empty results in translate.
This commit is contained in:
parent
85ee37c162
commit
67e5b55c1a
@ -267,7 +267,10 @@ class Google(callbacks.PluginRegexp):
|
||||
except:
|
||||
language = 'unknown'
|
||||
|
||||
if data[0]:
|
||||
return (''.join(x[0] for x in data[0]), language)
|
||||
else:
|
||||
return (_('No translations found.'), language)
|
||||
|
||||
@internationalizeDocstring
|
||||
def translate(self, irc, msg, args, sourceLang, targetLang, text):
|
||||
|
Loading…
Reference in New Issue
Block a user