From 6629c8d48fe270e01d5e7afc0c6713c9193d876d Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 19 Nov 2010 17:10:47 +0100 Subject: [PATCH 1/2] Add @reloadlocale to Owner plugin --- plugins/Owner/plugin.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/Owner/plugin.py b/plugins/Owner/plugin.py index 73d2707a1..e825de208 100644 --- a/plugins/Owner/plugin.py +++ b/plugins/Owner/plugin.py @@ -42,6 +42,7 @@ else: import supybot.log as log import supybot.conf as conf +import supybot.i18n as i18n import supybot.utils as utils import supybot.world as world import supybot.ircdb as ircdb @@ -599,6 +600,12 @@ class Owner(callbacks.Plugin): self.reload(irc, msg, [plugin.name()]) # This makes the replySuccess. unrename = wrap(unrename, ['plugin']) + def reloadlocale(self, irc, msg, args): + """takes no argument + + Reloads the locale of the bot.""" + i18n.reloadLocales() + irc.replySuccess() Class = Owner From 13b194a4fec17dffcf5877e98b9e229759d5d7c0 Mon Sep 17 00:00:00 2001 From: Valentin Lorentz Date: Fri, 26 Nov 2010 23:19:05 +0100 Subject: [PATCH 2/2] Fix internationalisation bug in Config plugin --- plugins/Config/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/Config/plugin.py b/plugins/Config/plugin.py index 6ad3bdf8e..8f669dc76 100644 --- a/plugins/Config/plugin.py +++ b/plugins/Config/plugin.py @@ -156,7 +156,7 @@ class Config(callbacks.Plugin): Searches for in the current configuration variables. """ L = [] - for (name, _) in conf.supybot.getValues(getChildren=True): + for (name, x) in conf.supybot.getValues(getChildren=True): if word in name.lower(): possibleChannel = registry.split(name)[-1] if not ircutils.isChannel(possibleChannel):