[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:
Dav
2022-02-16 01:25:21 +00:00
committed by GitHub
parent 9ab307c1ef
commit c6517d5087
8 changed files with 111 additions and 90 deletions

View File

@@ -336,15 +336,15 @@ class ModSettings(MixinMeta):
if not cur_setting:
await self.config.guild(guild).reinvite_on_unban.set(True)
await ctx.send(
_("Users unbanned with `{command}` will be reinvited.").format(
command=f"{ctx.clean_prefix}unban"
_("Users unbanned with {command} will be reinvited.").format(
command=inline(f"{ctx.clean_prefix}unban")
)
)
else:
await self.config.guild(guild).reinvite_on_unban.set(False)
await ctx.send(
_("Users unbanned with `{command}` will not be reinvited.").format(
command=f"{ctx.clean_prefix}unban"
_("Users unbanned with {command} will not be reinvited.").format(
command=inline(f"{ctx.clean_prefix}unban")
)
)
@@ -463,7 +463,7 @@ class ModSettings(MixinMeta):
msg = _(
"All name changes will no longer be tracked.\n"
"To delete existing name data, use {command}."
).format(command=f"`{ctx.clean_prefix}modset deletenames`")
).format(command=inline(f"{ctx.clean_prefix}modset deletenames"))
await self.config.track_all_names.set(enabled)
await ctx.send(msg)