mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Added a warning about languages that depend strongly on multi-byte characters.
This commit is contained in:
parent
eea46d874a
commit
3566b12b29
@ -99,6 +99,8 @@ class Babelfish(callbacks.Privmsg):
|
||||
"""<from-language> [to] <to-language> <text>
|
||||
|
||||
Returns <text> translated from <from-language> into <to-language>.
|
||||
Beware that translating to or from languages that use multi-byte
|
||||
characters may result in some very odd results.
|
||||
"""
|
||||
if len(args) >= 2 and args[1] == 'to':
|
||||
args.pop(1)
|
||||
@ -112,8 +114,7 @@ class Babelfish(callbacks.Privmsg):
|
||||
irc.error('I do not speak any other languages.')
|
||||
return
|
||||
else:
|
||||
irc.error('I only speak %s.' % utils.commaAndify(langs,
|
||||
And='or'))
|
||||
irc.error('I only speak %s.' % utils.commaAndify(langs))
|
||||
return
|
||||
translation = babelfish.translate(text, fromLang, toLang)
|
||||
irc.reply(translation)
|
||||
|
Loading…
Reference in New Issue
Block a user