diff options
author | 2019-10-19 17:24:58 +0200 | |
---|---|---|
committer | 2019-10-19 17:24:58 +0200 | |
commit | 99386234ac3aa72d5f81f6104f5f5945bdd6c1e5 (patch) | |
tree | 7f7babb2ca5ccd7a55bae47ebb561b81dd2ea35b | |
parent | Fix rule alias. (#537) (diff) |
Pluralize "infractions" as necessary.
-rw-r--r-- | bot/cogs/moderation/infractions.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bot/cogs/moderation/infractions.py b/bot/cogs/moderation/infractions.py index 592ead60f..e17a9844c 100644 --- a/bot/cogs/moderation/infractions.py +++ b/bot/cogs/moderation/infractions.py @@ -2,6 +2,7 @@ import logging import textwrap import typing as t from datetime import datetime +from gettext import ngettext import dateutil.parser import discord @@ -463,7 +464,8 @@ class Infractions(Scheduler, commands.Cog): "bot/infractions", params={"user__id": str(user.id)} ) - end_msg = f" ({len(infractions)} infractions total)" + total = len(infractions) + end_msg = f" ({total} infraction{ngettext('', 's', total)} total)" # Execute the necessary actions to apply the infraction on Discord. if action_coro: |