translator: additional help for google translate auto-detect failure
authorRaine Virta <rane@kapsi.fi>
Fri, 16 Apr 2010 14:36:28 +0000 (17:36 +0300)
committerRaine Virta <rane@kapsi.fi>
Fri, 16 Apr 2010 19:58:24 +0000 (22:58 +0300)
commit6ca0084780f82de5b4e06a2d242a9f9fd5bad63e
tree3c54204ecd300f8498bf8e9b1ea14b188761600b
parent868c594b7ce5d8e31524109af1ecb493699ee31f
translator: additional help for google translate auto-detect failure

When translate command is used without source language, "auto" as source
language is assumed. It means that google translator is used and we let
google figure out what the source language is.

Problem is that the google translator will fail if the system that the
bot is running on does not have the json gem installed. This commit
addresses that problem by showing more informative error message instead
of a weird "none of the translators supports auto to en translation".
data/rbot/plugins/translator.rb