Merge branch 'i18n' into l10n-fr

This commit is contained in:
Valentin Lorentz 2010-10-26 09:32:34 +02:00
commit a7eb72fc29
14 changed files with 15 additions and 24 deletions

View File

@ -36,7 +36,6 @@ import supybot.callbacks as callbacks
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Anonymous')
@internationalizeDocstring
class Anonymous(callbacks.Plugin):
"""This plugin allows users to act through the bot anonymously. The 'do'
command has the bot perform an anonymous action in a given channel, and
@ -102,6 +101,7 @@ class Anonymous(callbacks.Plugin):
irc.queueMsg(ircmsgs.action(channel, text))
irc.noReply()
do = wrap(do, ['inChannel', 'text'])
Anonymous = internationalizeDocstring(Anonymous)
Class = Anonymous

View File

@ -33,7 +33,6 @@ import supybot.ircutils as ircutils
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Dunno')
@internationalizeDocstring
class Dunno(plugins.ChannelIdDatabasePlugin):
"""This plugin was written initially to work with MoobotFactoids, the two
of them to provide a similar-to-moobot-and-blootbot interface for factoids.
@ -52,7 +51,7 @@ class Dunno(plugins.ChannelIdDatabasePlugin):
env = {'command': tokens[0]}
dunno = ircutils.standardSubstitute(irc, msg, dunno, env=env)
irc.reply(dunno, prefixNick=prefixNick)
Dunno = internationalizeDocstring(Dunno)
Class = Dunno

View File

@ -46,7 +46,6 @@ class MyFilterProxy(object):
def reply(self, s):
self.s = s
@internationalizeDocstring
class Filter(callbacks.Plugin):
"""This plugin offers several commands which transform text in some way.
It also provides the capability of using such commands to 'filter' the
@ -713,6 +712,7 @@ class Filter(callbacks.Plugin):
s = '%s \x02 \x02' % ''.join(map(lambda x: x.encode('utf-8'), turned))
irc.reply(s)
uniud = wrap(uniud, ['text'])
Filter = internationalizeDocstring(Filter)
Class = Filter

View File

@ -38,7 +38,6 @@ import supybot.callbacks as callbacks
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Internet')
@internationalizeDocstring
class Internet(callbacks.Plugin):
"""Add the help for "@help Internet" here."""
threaded = True
@ -161,7 +160,7 @@ class Internet(callbacks.Plugin):
ret += '%02x' % i
irc.reply(ret.upper())
hexip = wrap(hexip, ['ip'])
Internet = internationalizeDocstring(Internet)
Class = Internet

View File

@ -42,7 +42,6 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Later')
@internationalizeDocstring
class Later(callbacks.Plugin):
"""Used to do things later; currently, it only allows the sending of
nick-based notes. Do note (haha!) that these notes are *not* private
@ -181,7 +180,7 @@ class Later(callbacks.Plugin):
def _formatNote(self, when, whence, note):
return _('Sent %s: <%s> %s') % (self._timestamp(when), whence, note)
Later = internationalizeDocstring(Later)
Class = Later

View File

@ -35,7 +35,6 @@ import supybot.callbacks as callbacks
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Limiter')
@internationalizeDocstring
class Limiter(callbacks.Plugin):
"""In order to use this plugin, its config values need to be properly
setup. supybot.plugins.Limiter.enable needs to be set to True and
@ -70,7 +69,7 @@ class Limiter(callbacks.Plugin):
def doQuit(self, irc, msg):
for channel in irc.state.channels:
self._enforceLimit(irc, channel)
Limiter = internationalizeDocstring(Limiter)
Class = Limiter

View File

@ -288,7 +288,6 @@ class SqliteMoobotDB(object):
MoobotDB = plugins.DB('MoobotFactoids', {'sqlite': SqliteMoobotDB})
@internationalizeDocstring
class MoobotFactoids(callbacks.Plugin):
"""Add the help for "@help MoobotFactoids" here (assuming you don't implement a MoobotFactoids
command). This should describe *how* to use this plugin."""
@ -714,7 +713,7 @@ class MoobotFactoids(callbacks.Plugin):
(fact, key) = results
irc.reply(format('Random factoid: %q is %q', key, fact))
random = wrap(random, ['channeldb'])
MoobotFactoids = internationalizeDocstring(MoobotFactoids)
Class = MoobotFactoids

View File

@ -36,7 +36,6 @@ import supybot.callbacks as callbacks
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('NickCapture')
@internationalizeDocstring
class NickCapture(callbacks.Plugin):
"""This module constantly tries to take whatever nick is configured as
supybot.nick. Just make sure that's set appropriately, and thus plugin
@ -92,7 +91,7 @@ class NickCapture(callbacks.Plugin):
nick = self._getNick()
if nick:
self._sendNick(irc, nick)
NickCapture = internationalizeDocstring(NickCapture)
Class = NickCapture

View File

@ -38,7 +38,6 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Plugin')
@internationalizeDocstring
class Plugin(callbacks.Plugin):
"""This plugin exists to help users manage their plugins. Use 'plugin
list' to list the loaded plugins; use 'plugin help' to get the description
@ -233,6 +232,7 @@ class Plugin(callbacks.Plugin):
nick = ircutils.toLower(nick)
irc.reply(buildPersonString(module))
contributors = wrap(contributors, ['plugin', additional('nick')])
Plugin = internationalizeDocstring(Plugin)
Class = Plugin

View File

@ -35,7 +35,6 @@ import supybot.ircutils as ircutils
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Praise')
@internationalizeDocstring
class Praise(plugins.ChannelIdDatabasePlugin):
"""Praise is a plugin for ... well, praising things. Feel free to add
your own flavor to it by customizing what praises it gives. Use "praise
@ -89,6 +88,7 @@ class Praise(plugins.ChannelIdDatabasePlugin):
text += format(' (#%i)', praise.id)
irc.reply(text, action=True)
praise = wrap(praise, ['channeldb', optional('id'), 'text'])
Praise = internationalizeDocstring(Praise)
Class = Praise

View File

@ -58,7 +58,6 @@ def getFeedName(irc, msg, args, state):
state.args.append(callbacks.canonicalName(args.pop(0)))
addConverter('feedName', getFeedName)
@internationalizeDocstring
class RSS(callbacks.Plugin):
"""This plugin is useful both for announcing updates to RSS feeds in a
channel, and for retrieving the headlines of RSS feeds via command. Use
@ -333,8 +332,8 @@ class RSS(callbacks.Plugin):
irc.replySuccess()
remove = wrap(remove, ['feedName'])
@internationalizeDocstring
class announce(callbacks.Commands):
@internationalizeDocstring
def list(self, irc, msg, args, channel):
"""[<channel>]
@ -441,7 +440,7 @@ class RSS(callbacks.Plugin):
title, link, desc, when)
irc.reply(utils.str.normalizeWhitespace(response))
info = wrap(info, [first('url', 'feedName')])
RSS = internationalizeDocstring(RSS)
Class = RSS

View File

@ -33,7 +33,6 @@ from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Reply')
@internationalizeDocstring
class Reply(callbacks.Plugin):
"""This plugins contains a few commands that construct various types of
replies. Some bot owners would be wise to not load this plugin because it
@ -80,6 +79,7 @@ class Reply(callbacks.Plugin):
"""
irc.reply(text, prefixNick=True)
reply = wrap(reply, ['text'])
Reply = internationalizeDocstring(Reply)
Class = Reply

View File

@ -43,7 +43,6 @@ import supybot.callbacks as callbacks
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Services')
@internationalizeDocstring
class Services(callbacks.Plugin):
"""This plugin handles dealing with Services on networks that provide them.
Basically, you should use the "password" command to tell the bot a nick to
@ -548,7 +547,7 @@ class Services(callbacks.Plugin):
else:
irc.reply(_('I\'m not currently configured for any nicks.'))
nicks = wrap(nicks, [('checkCapability', 'admin')])
Services = internationalizeDocstring(Services)
Class = Services

View File

@ -34,7 +34,6 @@ import supybot.ircutils as ircutils
from supybot.i18n import PluginInternationalization, internationalizeDocstring
_ = PluginInternationalization('Success')
@internationalizeDocstring
class Success(plugins.ChannelIdDatabasePlugin):
"""This plugin was written initially to work with MoobotFactoids, the two
of them to provide a similar-to-moobot-and-blootbot interface for factoids.
@ -76,7 +75,7 @@ class Success(plugins.ChannelIdDatabasePlugin):
# so this seems like the only way to do it.
self.target = msg.args[0]
return msg
Success = internationalizeDocstring(Success)
Class = Success