feat(i18n): add translations for info command

This commit is contained in:
Romain J 2021-01-20 17:29:16 +01:00
parent 30cc3ecad2
commit 5d585bf218
9 changed files with 85 additions and 37 deletions

View file

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2020-11-11 02:40+0100\n"
"POT-Creation-Date: 2021-01-19 14:42+0100\n"
"PO-Revision-Date: 2020-06-10 00:38+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@ -22,6 +22,6 @@ msgstr ""
msgid "Locale changed to {lang} successfully"
msgstr ""
#: tuxbot/cogs/Admin/admin.py:65
#: tuxbot/cogs/Admin/admin.py:61
msgid "List of available locales: "
msgstr ""

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2020-11-11 02:40+0100\n"
"POT-Creation-Date: 2021-01-19 14:42+0100\n"
"PO-Revision-Date: 2020-06-10 00:38+0200\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@ -23,6 +23,6 @@ msgstr ""
msgid "Locale changed to {lang} successfully"
msgstr "Langue changée pour {lang} avec succès"
#: tuxbot/cogs/Admin/admin.py:65
#: tuxbot/cogs/Admin/admin.py:61
msgid "List of available locales: "
msgstr "Liste des langues disponibles : "

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-01-19 14:42+0100\n"
"POT-Creation-Date: 2021-01-20 17:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View file

@ -28,13 +28,7 @@ class Custom(commands.Cog, name="Custom"):
async def cog_command_error(self, ctx, error):
if isinstance(error, commands.BadArgument):
await ctx.send(
_(
str(error),
ctx,
self.bot.config,
)
)
await ctx.send(_(str(error), ctx, self.bot.config))
# =========================================================================
# =========================================================================

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-01-19 14:42+0100\n"
"POT-Creation-Date: 2021-01-20 17:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -17,21 +17,21 @@ msgstr ""
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: tuxbot/cogs/Custom/custom.py:69
#: tuxbot/cogs/Custom/custom.py:63
#, python-brace-format
msgid "Locale changed for you to {lang} successfully"
msgstr ""
#: tuxbot/cogs/Custom/custom.py:76
#: tuxbot/cogs/Custom/custom.py:70
msgid "List of available locales: "
msgstr ""
#: tuxbot/cogs/Custom/custom.py:95
#: tuxbot/cogs/Custom/custom.py:89
#, python-brace-format
msgid "The alias `{alias}` is already defined for the command `{command}`"
msgstr ""
#: tuxbot/cogs/Custom/custom.py:123
#: tuxbot/cogs/Custom/custom.py:102
#, python-brace-format
msgid "The alias `{alias}` for the command `{command}` was successfully created"
msgstr ""
@ -41,11 +41,9 @@ msgid "Alias must be like `[command] | [alias]`"
msgstr ""
#: tuxbot/cogs/Custom/functions/converters.py:23
#, python-brace-format
msgid "Unknown command"
msgstr ""
#: tuxbot/cogs/Custom/functions/converters.py:26
#, python-brace-format
msgid "Command already exists"
msgstr ""

View file

@ -51,6 +51,22 @@ msgstr ""
msgid "__¶ Lines__"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:98
msgid "class"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:100
msgid "functions"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:102
msgid "coroutines"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:104
msgid "comments"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:105
msgid "__Latest changes__"
msgstr ""

View file

@ -52,7 +52,23 @@ msgstr "__:file_folder: Fichiers__"
#: tuxbot/cogs/Utils/utils.py:95
msgid "__¶ Lines__"
msgstr "__¶ Lignes__"
msgstr "__¶ Lines__"
#: tuxbot/cogs/Utils/utils.py:98
msgid "class"
msgstr "classes"
#: tuxbot/cogs/Utils/utils.py:100
msgid "functions"
msgstr "fonctions"
#: tuxbot/cogs/Utils/utils.py:102
msgid "coroutines"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:104
msgid "comments"
msgstr "commentaires"
#: tuxbot/cogs/Utils/utils.py:105
msgid "__Latest changes__"

View file

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: Tuxbot-bot\n"
"Report-Msgid-Bugs-To: rick@gnous.eu\n"
"POT-Creation-Date: 2021-01-19 14:42+0100\n"
"POT-Creation-Date: 2021-01-20 17:24+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -51,50 +51,66 @@ msgstr ""
msgid "__¶ Lines__"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:105
#: tuxbot/cogs/Utils/utils.py:98
msgid "class"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:100
msgid "functions"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:102
msgid "coroutines"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:104
msgid "comments"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:109
msgid "__Latest changes__"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:111
#: tuxbot/cogs/Utils/utils.py:115
msgid "__:link: Links__"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:116
#: tuxbot/cogs/Utils/utils.py:120
msgid "| [Invite]"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:131
#: tuxbot/cogs/Utils/utils.py:135
msgid "Contributors"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:187
#: tuxbot/cogs/Utils/utils.py:191
msgid "Invite"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:191
#: tuxbot/cogs/Utils/utils.py:195
msgid "Minimal"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:193
#: tuxbot/cogs/Utils/utils.py:197
msgid "The minimum permissions include the strict requirements for the proper functioning of all basics commands.\n"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:198 tuxbot/cogs/Utils/utils.py:210
#: tuxbot/cogs/Utils/utils.py:202 tuxbot/cogs/Utils/utils.py:214
msgid "[Add!]"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:203
#: tuxbot/cogs/Utils/utils.py:207
msgid "Admin"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:205
#: tuxbot/cogs/Utils/utils.py:209
msgid "All minimal permissions + extra permissions for admin commands such as kick and ban\n"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:233
#: tuxbot/cogs/Utils/utils.py:237
msgid "Unable to find `{}`"
msgstr ""
#: tuxbot/cogs/Utils/utils.py:241
#: tuxbot/cogs/Utils/utils.py:245
msgid "Unable to fetch lines for `{}`"
msgstr ""

View file

@ -94,10 +94,18 @@ class Utils(commands.Cog, name="Utils"):
e.add_field(
name=_("__¶ Lines__", ctx, self.bot.config),
value=f"{infos.get('total_lines')} "
f"*({infos.get('total_python_class')} class,"
f" {infos.get('total_python_functions')} functions,"
f" {infos.get('total_python_coroutines')} coroutines,"
f" {infos.get('total_python_comments')} comments)*",
f"*({infos.get('total_python_class')} "
+ _("class", ctx, self.bot.config)
+ ","
f" {infos.get('total_python_functions')} "
+ _("functions", ctx, self.bot.config)
+ ","
f" {infos.get('total_python_coroutines')} "
+ _("coroutines", ctx, self.bot.config)
+ ","
f" {infos.get('total_python_comments')} "
+ _("comments", ctx, self.bot.config)
+ ")*",
inline=True,
)