[i18n] Basic Implementation (#948)

* Initial commit

* Beginning of working i18n

* Add some translation files

* Add more strings to translate

* Update and add some more translations

* Update spanish translation

* Update french translation

* Add alias translation templates

* Add bank translations

* Add economy translations

* Add general translations

* Add image translations

* Add core translations
This commit is contained in:
Will
2017-08-26 18:54:51 -04:00
committed by GitHub
parent 3d76f3a787
commit 118df46630
25 changed files with 1875 additions and 245 deletions

View File

@@ -1,6 +1,7 @@
from discord.ext import commands
from core.utils.chat_formatting import box, pagify
from core import checks
from core.i18n import CogI18n
import asyncio
import discord
import traceback
@@ -18,6 +19,8 @@ Notice:
https://github.com/Rapptz/RoboDanny/blob/master/cogs/repl.py
"""
_ = CogI18n("Dev", __file__)
class Dev:
"""Various development focused utilities"""
@@ -159,11 +162,11 @@ class Dev:
}
if ctx.channel.id in self.sessions:
await ctx.send('Already running a REPL session in this channel. Exit it with `quit`.')
await ctx.send(_('Already running a REPL session in this channel. Exit it with `quit`.'))
return
self.sessions.add(ctx.channel.id)
await ctx.send('Enter code to execute or evaluate. `exit()` or `quit` to exit.')
await ctx.send(_('Enter code to execute or evaluate. `exit()` or `quit` to exit.'))
def msg_check(m):
return m.author == ctx.author and m.channel == ctx.channel and \
@@ -228,7 +231,7 @@ class Dev:
except discord.Forbidden:
pass
except discord.HTTPException as e:
await ctx.send('Unexpected error: `{}`'.format(e))
await ctx.send(_('Unexpected error: `{}`').format(e))
@commands.command()
@checks.is_owner()