mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-05 17:02:32 -05:00
[Core/Core Cogs] Prevent translation errors and use formatting utils (#5435)
* Use proper syntax for inline formatting in core_commands * use proper formating utils in core and core cogs wherever reasonable * tests are awesome * ensure "(continued)" is translated in help.py * add colons to translatable strings for easier context comprehension by translators * Thx flame :) Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com> * good point Co-authored-by: Dav <dav@mail.stopdavabuse.de> Co-authored-by: Flame442 <34169552+Flame442@users.noreply.github.com>
This commit is contained in:
@@ -564,19 +564,13 @@ class Mutes(VoiceMutes, commands.Cog, metaclass=CompositeMetaClass):
|
||||
else:
|
||||
message = f"{title}\n>>> "
|
||||
message += reason
|
||||
message += (f"\n{bold(_('Moderator:'))} {moderator_str}") if show_mod else ""
|
||||
message += (
|
||||
_("\n**Moderator**: {moderator}").format(moderator=moderator_str)
|
||||
if show_mod
|
||||
else ""
|
||||
)
|
||||
message += (
|
||||
_("\n**Until**: {until}\n**Duration**: {duration}").format(
|
||||
until=until_str, duration=duration_str
|
||||
)
|
||||
(f"\n{bold(_('Until:'))} {until_str}\n{bold(_('Duration:'))} {duration_str}")
|
||||
if duration
|
||||
else ""
|
||||
)
|
||||
message += _("\n**Guild**: {guild_name}").format(guild_name=guild.name)
|
||||
message += f"\n{bold(_('Guild:'))} {guild.name}"
|
||||
try:
|
||||
await user.send(message)
|
||||
except discord.Forbidden:
|
||||
|
||||
Reference in New Issue
Block a user