mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
commaAndify(..., And='or')
This commit is contained in:
parent
c75e8b5137
commit
9d3c1e6e8b
@ -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])
|
||||
|
Loading…
Reference in New Issue
Block a user