mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
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.
This commit is contained in:
parent
672652d780
commit
75a96ffa17
@ -201,24 +201,13 @@ class Plugin(callbacks.Plugin):
|
|||||||
|
|
||||||
authorInfo = contributorNicks[lnick]
|
authorInfo = contributorNicks[lnick]
|
||||||
contributions = contributors[authorInfo]
|
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)
|
fullName = getShortName(authorInfo)
|
||||||
if results:
|
|
||||||
return format(_('%s contributed %L to the %s plugin.'),
|
if contributions:
|
||||||
fullName, results, cb.name())
|
return format(_('%s contributed the following to %s: %s'),
|
||||||
|
fullName, cb.name(), ', '.join(contributions))
|
||||||
else:
|
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())
|
'plugin.') % (fullName, cb.name())
|
||||||
|
|
||||||
# First we need to check and see if the requested plugin is loaded
|
# First we need to check and see if the requested plugin is loaded
|
||||||
|
Loading…
Reference in New Issue
Block a user