diff options
author | Yaohan Chen <yaohan.chen@gmail.com> | 2010-05-21 15:59:29 -0400 |
---|---|---|
committer | Yaohan Chen <yaohan.chen@gmail.com> | 2010-05-21 16:10:31 -0400 |
commit | 027b6965f5abf5d05a95d4dc627f19a71b7a7076 (patch) | |
tree | 2fa7911bba8b32e82c3bc39b970bd2b4d9617cfd /data/rbot/contrib/plugins/vandale.rb | |
parent | 43fe51c5e5bfc40a6db95f3d4ee93958ed1081a2 (diff) |
translator: connect to sites only when necessary
Previously the translation services in the plugin would connect to their
respective websites on initialize. Now they will only do this when the first
time they are used. WorldLingo still connects on initialialize in order to list
the supported language pairs, but the Mechanize object is not saved here, so
the connection should be closed after initialize, and only reopened if
translation by WorldLingo is requested later.
Previously the services are assumed to fail if they raise any Exception in
initialize, and in that case the service is disabled, and its command as well
as the help translate [failed] commands state this. Now this exception catch is
done for any do_translate method call.
Diffstat (limited to 'data/rbot/contrib/plugins/vandale.rb')
0 files changed, 0 insertions, 0 deletions