[i18n] User-facing string pass over admin, alias and audio

This commit is contained in:
Toby Harradine
2018-08-16 10:10:03 +10:00
parent aa8c9c350e
commit 3a20c11331
5 changed files with 439 additions and 366 deletions

View File

@@ -1,5 +1,8 @@
import discord
from redbot.core import commands
from redbot.core.i18n import Translator
_ = Translator("AdminConverters", __file__)
class MemberDefaultAuthor(commands.Converter):
@@ -19,7 +22,7 @@ class SelfRole(commands.Converter):
async def convert(self, ctx: commands.Context, arg: str) -> discord.Role:
admin = ctx.command.instance
if admin is None:
raise commands.BadArgument("Admin is not loaded.")
raise commands.BadArgument(_("The Admin cog is not loaded."))
conf = admin.conf
selfroles = await conf.guild(ctx.guild).selfroles()
@@ -28,5 +31,5 @@ class SelfRole(commands.Converter):
role = await role_converter.convert(ctx, arg)
if role.id not in selfroles:
raise commands.BadArgument("The provided role is not a valid selfrole.")
raise commands.BadArgument(_("The provided role is not a valid selfrole."))
return role