mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 18:06:08 -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:
@@ -1,13 +1,12 @@
|
||||
import discord
|
||||
from redbot.core.utils.chat_formatting import box
|
||||
|
||||
from redbot.core import checks, bank
|
||||
from redbot.core.i18n import CogI18n
|
||||
from discord.ext import commands
|
||||
from redbot.core import checks, bank, commands
|
||||
from redbot.core.i18n import Translator, cog_i18n
|
||||
|
||||
from redbot.core.bot import Red # Only used for type hints
|
||||
|
||||
_ = CogI18n('Bank', __file__)
|
||||
_ = Translator('Bank', __file__)
|
||||
|
||||
|
||||
def check_global_setting_guildowner():
|
||||
@@ -48,6 +47,7 @@ def check_global_setting_admin():
|
||||
return commands.check(pred)
|
||||
|
||||
|
||||
@cog_i18n(_)
|
||||
class Bank:
|
||||
"""Bank"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user