diff --git a/src/callbacks.py b/src/callbacks.py index 8f9cdf53d..35bd21973 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -852,8 +852,11 @@ class NestedCommandsIrcProxy(ReplyIrcProxy): allowedLength = conf.get(conf.supybot.reply.mores.length, target) if not allowedLength: # 0 indicates this. - allowedLength = 450 - len(self.irc.prefix) + allowedLength = 470 - len(self.irc.prefix) allowedLength -= len(msg.nick) + # The '(XX more messages)' may have not the same + # length in the current locale + allowedLength -= len(_('(XX more messages)')) maximumMores = conf.get(conf.supybot.reply.mores.maximum, target) maximumLength = allowedLength * maximumMores @@ -866,7 +869,7 @@ class NestedCommandsIrcProxy(ReplyIrcProxy): # In case we're truncating, we add 20 to allowedLength, # because our allowedLength is shortened for the # "(XX more messages)" trailer. - s = s[:allowedLength+20] + s = s[:allowedLength+len(_('(XX more messages)'))] # There's no need for action=self.action here because # action implies noLengthCheck, which has already been # handled. Let's stick an assert in here just in case. diff --git a/src/conf.py b/src/conf.py index b9ec624ce..521a944fd 100644 --- a/src/conf.py +++ b/src/conf.py @@ -611,9 +611,9 @@ registerChannelValue(supybot.commands.nested, 'pipeSyntax', example: 'bot: foo | bar'."""))) registerGroup(supybot.commands, 'defaultPlugins', - orderAlphabetically=True, help="""Determines what commands have default + orderAlphabetically=True, help=_("""Determines what commands have default plugins set, and which plugins are set to be the default for each of those - commands.""") + commands.""")) registerGlobalValue(supybot.commands.defaultPlugins, 'importantPlugins', registry.SpaceSeparatedSetOfStrings( ['Admin', 'Channel', 'Config', 'Misc', 'Owner', 'Plugin', 'User'],