From 75a96ffa176ca2cb07cfa7b9ae68def73ca4aa2d Mon Sep 17 00:00:00 2001 From: James Lu Date: Sat, 19 Oct 2019 11:17:35 -0700 Subject: [PATCH] Plugin: show individual contributions in 'contributors [nick]' as a list Remove special handling of one word contributions as commands, which was never clearly documented and is prone to false positives. --- plugins/Plugin/plugin.py | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/plugins/Plugin/plugin.py b/plugins/Plugin/plugin.py index ff97244d4..95a88e727 100644 --- a/plugins/Plugin/plugin.py +++ b/plugins/Plugin/plugin.py @@ -201,24 +201,13 @@ class Plugin(callbacks.Plugin): authorInfo = contributorNicks[lnick] contributions = contributors[authorInfo] - - (nonCommands, commands) = utils.iter.partition(lambda s: ' ' in s, - contributions) - results = [] - if commands: - s = _('command') - if len(commands) > 1: - s = utils.str.pluralize(s) - results.append(format(_('the %L %s'), commands, s)) - if nonCommands: - results.append(format(_('the %L'), nonCommands)) - fullName = getShortName(authorInfo) - if results: - return format(_('%s contributed %L to the %s plugin.'), - fullName, results, cb.name()) + + if contributions: + return format(_('%s contributed the following to %s: %s'), + fullName, cb.name(), ', '.join(contributions)) else: - return _('%s has no specific listed contributions to the %s ' + return _('%s did not list any specific contributions to the %s ' 'plugin.') % (fullName, cb.name()) # First we need to check and see if the requested plugin is loaded