mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-22 02:37:57 -05:00
[V3 i18n] Internationalise help for commands and cogs (#1143)
* Framework for internationalised command help * Translator for class docstring of cog * Remove references to old context module * Use CogManagerUI as PoC * Replace all references to RedContext * Rename CogI18n object to avoid confusion * Update docs * Update i18n docs. * Store translators in list instead of dict * Change commands module to package, updated refs in cogs * Updated docs and more references in cogs * Resolve syntax error * Update from merge
This commit is contained in:
@@ -20,7 +20,7 @@ from .cog_manager import CogManager
|
||||
from . import (
|
||||
Config,
|
||||
i18n,
|
||||
RedContext,
|
||||
commands,
|
||||
rpc
|
||||
)
|
||||
from .help_formatter import Help, help as help_
|
||||
@@ -193,7 +193,7 @@ class RedBase(BotBase, RpcMethodMixin):
|
||||
admin_role = await self.db.guild(member.guild).admin_role()
|
||||
return any(role.id in (mod_role, admin_role) for role in member.roles)
|
||||
|
||||
async def get_context(self, message, *, cls=RedContext):
|
||||
async def get_context(self, message, *, cls=commands.Context):
|
||||
return await super().get_context(message, cls=cls)
|
||||
|
||||
def list_packages(self):
|
||||
|
||||
Reference in New Issue
Block a user