From 9d3c1e6e8b3cb86eff62f89105bf5b38c591f106 Mon Sep 17 00:00:00 2001 From: James Vega Date: Thu, 8 Apr 2004 14:09:46 +0000 Subject: [PATCH] commaAndify(..., And='or') --- plugins/Babelfish.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/plugins/Babelfish.py b/plugins/Babelfish.py index 588de0580..0f00d737a 100644 --- a/plugins/Babelfish.py +++ b/plugins/Babelfish.py @@ -103,8 +103,9 @@ class Babelfish(callbacks.Privmsg): try: (fromLang, toLang) = self._getLang(fromLang, toLang) if not fromLang or not toLang: - irc.error('I do not speak %s.' % utils.commaAndify( - self.registryValue('disabledLanguages'))) + langs = self.registryValue('disabledLanguages') + irc.error('I do not speak %s.' % utils.commaAndify(langs, + And='or')) return translation = babelfish.translate(text, fromLang, toLang) irc.reply(translation) @@ -132,8 +133,9 @@ class Babelfish(callbacks.Privmsg): irc.error('One language must be English.') return if not fromLang or not toLang: - irc.error('I do not speak %s.' % utils.commaAndify( - self.registryValue('disabledLanguages'))) + langs = self.registryValue('disabledLanguages') + irc.error('I do not speak %s.' % utils.commaAndify(langs, + And='or')) return translations = babelfish.babelize(text, fromLang, toLang) irc.reply(translations[-1])