Added a warning about languages that depend strongly on multi-byte characters.

This commit is contained in:
Jeremy Fincher 2004-09-30 08:26:22 +00:00
parent eea46d874a
commit 3566b12b29

View File

@ -99,6 +99,8 @@ class Babelfish(callbacks.Privmsg):
"""<from-language> [to] <to-language> <text> """<from-language> [to] <to-language> <text>
Returns <text> translated from <from-language> into <to-language>. 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': if len(args) >= 2 and args[1] == 'to':
args.pop(1) args.pop(1)
@ -112,8 +114,7 @@ class Babelfish(callbacks.Privmsg):
irc.error('I do not speak any other languages.') irc.error('I do not speak any other languages.')
return return
else: else:
irc.error('I only speak %s.' % utils.commaAndify(langs, irc.error('I only speak %s.' % utils.commaAndify(langs))
And='or'))
return return
translation = babelfish.translate(text, fromLang, toLang) translation = babelfish.translate(text, fromLang, toLang)
irc.reply(translation) irc.reply(translation)