[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:
Tobotimus
2018-05-12 09:47:49 +10:00
committed by Kowlin
parent 1e60d1c265
commit 15ea5440a3
35 changed files with 575 additions and 259 deletions

View File

@@ -1,17 +1,16 @@
from pathlib import Path
import asyncio
from discord.ext import commands
from redbot.core import checks, RedContext
from redbot.core import checks, commands
from redbot.core.bot import Red
from redbot.core.i18n import CogI18n
from redbot.core.i18n import Translator, cog_i18n
from redbot.cogs.dataconverter.core_specs import SpecResolver
from redbot.core.utils.chat_formatting import box
_ = CogI18n('DataConverter', __file__)
_ = Translator('DataConverter', __file__)
@cog_i18n(_)
class DataConverter:
"""
Cog for importing Red v2 Data
@@ -22,7 +21,7 @@ class DataConverter:
@checks.is_owner()
@commands.command(name="convertdata")
async def dataconversioncommand(self, ctx: RedContext, v2path: str):
async def dataconversioncommand(self, ctx: commands.Context, v2path: str):
"""
Interactive prompt for importing data from Red v2