From d7da0b4081e811a4ff9b296042fe1ff15fe56c6f Mon Sep 17 00:00:00 2001 From: Dav Date: Sun, 20 Sep 2020 22:39:44 +0000 Subject: [PATCH] [Mod] Pluralize properly in userinfo (#4397) * Pluralize properly in userinfo * black * totally didn't forget roles * Almost seems like you have a point there... Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Yes... right... this one too Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> * Yes, yes we do. Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> Co-authored-by: jack1142 <6032823+jack1142@users.noreply.github.com> --- redbot/cogs/mod/names.py | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/redbot/cogs/mod/names.py b/redbot/cogs/mod/names.py index cf247a7f4..087055c38 100644 --- a/redbot/cogs/mod/names.py +++ b/redbot/cogs/mod/names.py @@ -245,15 +245,25 @@ class ModInfo(MixinMeta): data.add_field(name=_("Joined Discord on"), value=created_on) data.add_field(name=_("Joined this server on"), value=joined_on) if role_str is not None: - data.add_field(name=_("Roles"), value=role_str, inline=False) + data.add_field( + name=_("Roles") if len(roles) > 1 else _("Role"), value=role_str, inline=False + ) if names: # May need sanitizing later, but mentions do not ping in embeds currently val = filter_invites(", ".join(names)) - data.add_field(name=_("Previous Names"), value=val, inline=False) + data.add_field( + name=_("Previous Names") if len(names) > 1 else _("Previous Name"), + value=val, + inline=False, + ) if nicks: # May need sanitizing later, but mentions do not ping in embeds currently val = filter_invites(", ".join(nicks)) - data.add_field(name=_("Previous Nicknames"), value=val, inline=False) + data.add_field( + name=_("Previous Nicknames") if len(nicks) > 1 else _("Previous Nickname"), + value=val, + inline=False, + ) if voice_state and voice_state.channel: data.add_field( name=_("Current voice channel"),